-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Hello. I'm very excited about this project. It's what the World needs now. I'm just getting started but have hit an error pretty early. I'm trying to load this projection: http://spatialreference.org/ref/sr-org/6928/
I've tried a few different ways as prescribed by the documentation, but pretty consistently get this exception:
Traceback (most recent call last): File "/home/pat/.PyCharm2018.3/config/scratches/pycrs_test_1.py", line 58, in <module> """) File "/home/pat/sandbox/pycrs-test/venv/lib/python3.6/site-packages/pycrs/parse.py", line 92, in from_ogc_wkt return _from_wkt(string, "ogc", strict) File "/home/pat/sandbox/pycrs-test/venv/lib/python3.6/site-packages/pycrs/parse.py", line 406, in _from_wkt crs = _parse_top(header, content) File "/home/pat/sandbox/pycrs-test/venv/lib/python3.6/site-packages/pycrs/parse.py", line 294, in _parse_top raise Exception("The specified projection name %r could not be found" % projname) Exception: The specified projection name 'Mercator_Auxiliary_Sphere' could not be found
I've tried loading it from the a shapefile using pycrs.load.from_file and below I've included attempts using the ESRI WKT and OGC WKT directly:
crs = pycrs.parse.from_esri_wkt(""" PROJCS[ "WGS_1984_Web_Mercator_Auxiliary_Sphere", GEOGCS[ "GCS_WGS_1984", DATUM[ "D_WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563] ], PRIMEM[ "Greenwich",0.0], UNIT["Degree",0.017453292519943295] ], PROJECTION[ "Mercator_Auxiliary_Sphere" ], PARAMETER["False_Easting",0.0], PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",0.0], PARAMETER["Standard_Parallel_1",0.0], PARAMETER["Auxiliary_Sphere_Type",0.0], UNIT["Meter",1.0] ] """)
crs = pycrs.parse.from_ogc_wkt(""" PROJCS[ "WGS_1984_Web_Mercator_Auxiliary_Sphere", GEOGCS[ "GCS_WGS_1984", DATUM[ "D_WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563] ], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Mercator_Auxiliary_Sphere"], PARAMETER["False_Easting",0.0], PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",0.0], PARAMETER["Standard_Parallel_1",0.0], PARAMETER["Auxiliary_Sphere_Type",0.0], UNIT["Meter",1.0], AUTHORITY["ESRI","102100"] ] """)
It seems to not like GEOCS.PROJECTION ("Mercator_Auxiliary_Sphere"), but I'm not sure how to work around it. Please let me know if I can provide additional information.
Thank you again. This is great!