What is the best way to make transformations between ellipsoids using PYPROJ? #1398
Unanswered
depicted-candela
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am transforming coordinates between the Ellipsoids WGS84 and Hayford International using the code
>>> from pyproj import CRS, Transformer
>>> wgs84_crs = CRS.from_user_input("+proj=longlat +ellps=WGS84")
>>> hayford_crs = CRS.from_user_input("+proj=longlat +ellps=intl")
>>> transformer = Transformer.from_crs(wgs84_crs, hayford_crs, always_xy=True)
>>> wgs84_lon = -77.0369
>>> wgs84_lat = 38.9072
>>> hayford_lon, hayford_lat = transformer.transform(wgs84_lon, wgs84_lat)
>>> print(f"Hayford International coordinates (%5.2f, %5.2f): %5.2f, %5.2f" % (wgs84_lon, wgs84_lat, hayford_lon, hayford_lat))
Hayford International coordinates (-77.04, 38.91): -77.04, 38.91
The result is a change of zero between ellipsoid coordinates. The change is zero again with several random coordinates. How to make well this transformation?
Beta Was this translation helpful? Give feedback.
All reactions