-
Notifications
You must be signed in to change notification settings - Fork 230
Accept Datum and Ellipsoid objects for CRS datum= and ellps= constructor params #389
Copy link
Copy link
Closed
Labels
proposalIdea for a new feature.Idea for a new feature.
Description
Suppose you have a standard lon/lat CRS, e.g.
>>> wgs84_crs = pyproj.CRS("epsg:4326")
and you want to create a projected CRS with the same datum. The most obvious way to do that would be to use the 'datum' property of the first CRS as the 'datum' argument to the CRS constructor, but that doesn't work:
>>> aeqd_crs = pyproj.CRS(proj="aeqd", lon_0=-80, lat_0=40.5,
... datum=wgs84_crs.datum)
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/usr/lib/python3/dist-packages/pyproj/crs.py", line 304, in __init__
super(CRS, self).__init__(projstring)
File "pyproj/_crs.pyx", line 1312, in pyproj._crs._CRS.__init__
pyproj.exceptions.CRSError: Invalid projection:
+proj=aeqd +lon_0=-80 +lat_0=40.5 +datum=World Geodetic System 1984 +type=crs:
(Internal Proj Error: proj_create: Error -9: unknown elliptical parameter name)
Can you make that work, please? Also for the 'ellps' argument and Ellipsoids.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
proposalIdea for a new feature.Idea for a new feature.