You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a SpatialReference is constructed with a valid compound CRS, identifyVerticalEPSG() returns no EPSG code even if it is explicitly stated in the VERT_CS bit. For example, for this WKT it should return "6647" but it returns empty string:
"COMPD_CS[\"NAD83(CSRS) / UTM zone 17N + CGVD2013\",PROJCS[\"NAD83(CSRS) / UTM zone 17N\",GEOGCS[\"NAD83(CSRS)\",DATUM[\"NAD83_Canadian_Spatial_Reference_System\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6140\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4617\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",-81],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2958\"]],VERT_CS[\"CGVD2013\",VERT_DATUM[\"Canadian Geodetic Vertical Datum of 2013\",2005,AUTHORITY[\"EPSG\",\"1127\"]],UNIT[\"metre\",1.0,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Gravity-related height\",UP],AUTHORITY[\"EPSG\",\"6647\"]]]"
It looks like the issue is that OGRSpatialReference::AutoIdentifyEPSG() returns OGRERR_UNSUPPORTED_SRS for all vertical CRS but PDAL requires OGRERR_NONE to be returned, and won't try to return the EPSG code from the definition.
It would make sense to either skip the AutoIdentifyEPSG call for vertical CRS, or to first try to get the EPSG code from WKT, and then try auto-identify only when it is not present in WKT.
It seems this function is not used by PDAL itself though...
It would make sense to either skip the AutoIdentifyEPSG call for vertical CRS, or to first try to get the EPSG code from WKT, and then try auto-identify only when it is not present in WKT.
When a SpatialReference is constructed with a valid compound CRS, identifyVerticalEPSG() returns no EPSG code even if it is explicitly stated in the VERT_CS bit. For example, for this WKT it should return "6647" but it returns empty string:
It looks like the issue is that OGRSpatialReference::AutoIdentifyEPSG() returns OGRERR_UNSUPPORTED_SRS for all vertical CRS but PDAL requires OGRERR_NONE to be returned, and won't try to return the EPSG code from the definition.
It would make sense to either skip the AutoIdentifyEPSG call for vertical CRS, or to first try to get the EPSG code from WKT, and then try auto-identify only when it is not present in WKT.
It seems this function is not used by PDAL itself though...
GDAL code: https://github.com/OSGeo/gdal/blob/a632e3093d6dd34cdcf979a5b2a20529fe2df943/ogr/ogr_fromepsg.cpp#L305
The text was updated successfully, but these errors were encountered: