Replies: 1 comment 3 replies
-
You could try using a compound CRS for the destination CRS if it is projected and add a For geographic CRS, you could use the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In old versions of PyProj, transforming
(x, y, z)
coordinates from a 2D CRS in feet to 2D CRS in meters would automatically convert the z-axis from feet to meters as well. For example:But starting with PROJ 6.3.0 this behavior changed such that the z-axis units are not converted:
As Even explained in PROJ issue 2624, the z-units conversion between a pair of 2D CRSs is undefined behavior. For my purposes, I want to assume that the vertical units match the horizontal units and apply a PROJ unit conversion if they differ. I saw the discussion on GIS.SE about the
to_3d()
method but I don't want to do the ellipsoidal transformation, just the unit conversion.What's the best way to insert a
+proj=unitconvert
to the transform pipeline? Originally I tried something like this, but it suffered from the inaccuracies associated with the PROJ4 dict:So here's an alternative approach that uses the pipelines instead of the CRS. Is this the right approach in the PyProj 2.x+ world?
EDIT: I just realized this won't work when there are multiple transformations available 🤦♂️
Beta Was this translation helpful? Give feedback.
All reactions