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 am upgrading some old code that unprojects + transforms coordinates from an arbitrary input to WGS84. With PROJ 6.2.1 it correctly converts the input 650.000 foot elevation to 198.120 meters:
It appears that PROJ used to assume that the +vunits for horizontal CRSs was the same as the +units. But this is no longer the case. Is this expected behavior, or a regression?
The issue here is that you convert between two 2D CRS. EPSG:6578 has US-survey-foot for horizontal components, but we know nothing about the vertical direction: is it ellipsoidal height or orthometric height, in meters, us-survey-foot, whatever... So the behaviour of the transform of the Z component is completely unspecified. There was indeed a change of behaviour in the 6.x series regarding that, but neither, nor the new behaviour are correct. To get reliable transformation of Z, you need to use 3D CRS, that is either Compound CRS (Projected/Geographic + Vertical), Projected 3D CRS (with ellipsoidal height) or Geographic 3D CRS (with ellipsoidal height).
@rouault Thank you for confirming my suspicion! It seems like the old code was relying on undefined behavior. I will change the code to either specify the +vunits explicitly or use a 3D CRS.
Problem description + examples
I am upgrading some old code that unprojects + transforms coordinates from an arbitrary input to WGS84. With PROJ 6.2.1 it correctly converts the input
650.000
foot elevation to198.120
meters:But starting with PROJ 6.3.0 the z-coordinate is unchanged at
650.000
:It appears that PROJ used to assume that the
+vunits
for horizontal CRSs was the same as the+units
. But this is no longer the case. Is this expected behavior, or a regression?The only related PR or issue I found was #1731.
Environment Information
osgeo/proj:6.2.1
andosgeo/proj:6.3.0
Installation method
The text was updated successfully, but these errors were encountered: