-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipeline coordinate stack (push and pop operations) #1250
Conversation
|
I am aware of this. That is the reason for this section not using
Yes. I am still playing around with this so I might change things. In any case I will make sure to describe the behaviour thoroughly in the documentation.
So was I but as you are well aware axis ordering is tricky, so I opted for the the generic |
b435d6a
to
8938bba
Compare
As mentioned elsewhere, I am having a hard time understanding why that happens. It works alright when substituting @rouault can you offer a bit of guidance?
|
|
Does that mean that I need to add another function similiar to |
Hum, actually looking at how buildHelmertTransformation() works, and is called, to determine if the source/target CRS are geographic or geocentric, it appears to be broken. projinfo "+proj=pipeline +step +proj=cart +ellps=GRS80 +step +proj=helmert +x=1000 +y=2000 +z=3000 +step +proj=cart +ellps=GRS80 +inv" (ie your string without push and pop) returns geographic CRS as source and target CRS, whereas they should be geocentric really. But even if that was fixed, when you add the push/pop parameters into the equation, then you're in a awkward situation where you have 2D-specific parameters with geocentric CRS... I'm more and more thinking that any attempt to construct a "proper" ISO19111 CoordinateOperation using EPSG-based operations from a PROJ string is doomed to failure. This was a nice try from me, but experience just shows it can't work reliably. So I just think you could:
|
That's valuable insight. As I am understanding the mechanics of your code better and better I start to get convinced that it may be simpler overall to handle push and pop as distinct operations instead of as part of the pipeline (as you also suggested from the start, obviously more enlightened than me). It seems to fit in better with the genericity of the various formatters. I guess it is a lot simpler to create a WKT2 concatenated operation from a PROJ pipeline string that handles push/pop as single steps instead of adding extra complexity to the concept of the pipeline (which WKT2 can't express). |
039d8db
to
71803b7
Compare
So... Clang (at least on osx) is fine with my code while GCC crashes. When compiled with GCC the following results in a segfault
but it doesn't when compiled with Clang. The crash happens when I push to the stack here: Have I not initialized the stack correctly? |
This commit introduces the concept of a pipeline coordinate stack in which components of coordinates can be saved and loaded from. This makes it possible to moved values from one step of a pipeline to another, effectively overwriting parts of the output from a given step.
No, I hadn't. Let's try with a more dynamic approach this time. Works locally now. |
I am now happy with this PR. @rouault any comments? |
Looks good to me. I'm going to continue it with the ISO19111 part to map the EPSG Helmert 2D operations on this. |
Great. I'll merge this right away then. |
Push and pop operations which can be helpful in some transformations.
closes #1249
closes #1227