Invalid WKT error
Issue #3
resolved
The plugin fails to read images with GLANCE CRS, e.g.
PROJCS["BU MEaSUREs Lambert Azimuthal Equal Area - SA - V01",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["degree",0.0174532925199433]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["false_easting",0.0],PARAMETER["false_northing",0.0],PARAMETER["longitude_of_center",-60],PARAMETER["latitude_of_center",-15],UNIT["meter",1.0]]
However, as QGIS is able to read and display these images correctly, I guess it’s related to the hubforce routines:
from osgeo import osr, ogr
# see https://measures-glance.github.io/glance-grids/params
wktGLANCE = r'PROJCS["BU MEaSUREs Lambert Azimuthal Equal Area - SA - V01",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["degree",0.0174532925199433]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["false_easting",0.0],PARAMETER["false_northing",0.0],PARAMETER["longitude_of_center",-60],PARAMETER["latitude_of_center",-15],UNIT["meter",1.0]]'
srs = osr.SpatialReference()
assert ogr.OGRERR_NONE == srs.ImportFromWkt(wktGLANCE)
print(srs.ExportToProj4())
Comments (3)
-
reporter -
reporter - edited description
-
- changed status to resolved
fixed
#3, removed too restrictive consistency check→ <<cset 2b4da27f262d>>
- Log in to comment
example file available in <SAN EnMAP>\temp\temp_ar\glance