You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the problem is the first step incorrectly contains an unexpected +R parameter: +step +inv +proj=cart +R=6378137
This transform step should use the ellipsoid definition from EPSG:4978 (WGS84), and not include the +R value, which should only apply to the ESRI:104199 transform step. I expected this first step to be something like: +step +inv +proj=cart +ellps=WGS84
Expected Output
I would expect to see a transform pipeline similar to:
In fact, if I manually construct a transform with this first step corrected (and remove the axisswap), then I get an output that exactly matches the expected output from PROJ4:
I've studied this and my conclusion is that PROJ 4.9 or PROJ9 are both correct & incorrect at the same time, or said otherwise provide arbitrary results. This is just a ill-defined problem given there is no known datum transformation between WGS 84 (used by EPSG:4978) and D_WGS_1984_Major_Auxiliary_Sphere.
The difference come from the fact that PROJ 4.9 and PROJ9 use totally different logic to compute coordinate operations.
In PROJ 4.9, a null-datum transformation was done in the geographic coordinate space, that is the input cartesian coordinates were converted into geographic ones (in WGS 84 datum), then those geographic coordinates were considered as the same in the target datum (WGS_1984_Major_Auxiliary_Sphere), and then converted to the output CRS (this step being a no-op here)
In current PROJ versions, the null-datum transformation in the case of geocentric <--> geographic of different datums is done in the geocentric coordinate space.
That said in #3361 I propose to get back to PROJ < 6 era behavior.
createOperations(): emulate PROJ < 6 behavior when doing geocentric <--> geographic transformation between datum with unknown transformation (fixes#3360)
createOperations(): emulate PROJ < 6 behavior when doing geocentric <--> geographic transformation between datum with unknown transformation (fixes#3360)
[Backport 9.1] createOperations(): emulate PROJ < 6 behavior when doing geocentric <--> geographic transformation between datum with unknown transformation (fixes#3360)
Example of problem
There is an inconsistency in behaviour between PROJ4 and PROJ9 for the transform from EPSG:4978 (ECEF) to ESRI:104199.
Here are the definitions of the two CRS:
When transforming a point using PROJ4 (version 4.9.3), I get the expected result:
However, when using PROJ9 (version 9.1.0), I get a different (incorrect) result:
Even using Authority Codes with PROJ9 results in the same incorrect result:
Problem description
Inspecting the PROJ9 transform pipeline shows:
I think the problem is the first step incorrectly contains an unexpected +R parameter:
+step +inv +proj=cart +R=6378137
This transform step should use the ellipsoid definition from EPSG:4978 (WGS84), and not include the +R value, which should only apply to the ESRI:104199 transform step. I expected this first step to be something like:
+step +inv +proj=cart +ellps=WGS84
Expected Output
I would expect to see a transform pipeline similar to:
In fact, if I manually construct a transform with this first step corrected (and remove the axisswap), then I get an output that exactly matches the expected output from PROJ4:
It looks to me that there is some logic in the pipeline builder that is incorrectly propagating the +R parameter between steps, when it should not.
Is this behaviour expected? Or is there some other way to get behaviour more consistent with PROJ4?
Many thanks
Environment Information
Installation method
The text was updated successfully, but these errors were encountered: