[PROJ] Unexpected CRS Validation Error
Simon Eves
simon.eves at heavy.ai
Wed Mar 27 19:06:18 PDT 2024
When trying to import this Shapefile bundle into our system with GDAL...
https://drive.google.com/file/d/13Mwhnugcy8HrnGlc81gyroxnp9s15Skt/view?usp=sharing
...we get an *OGRERR_CORRUPT_DATA* from *OGRSpatialReference::Validate()*
on the SR obtained from the first feature.
Tracing through the GDAL and PROJ code, this appears to be because the PROJ
import of that CRS results in the following WKT Import Error from PROJ...
*Coordinate system of GeographicCRS in the WKT definition is different from
the one of the authority. Unsetting the identifier to avoid confusion*
...and any WKT Import Error makes GDAL report that error code.
The PROJ code throws this in *WKTParser::Private::buildGeodeticCRS*
(io.cpp:3229 in 9.3.0) which is old code (although the second branch which
can throw the same error was seemingly added between 8.2 and 9.3 in
https://github.com/OSGeo/PROJ/pull/3274 ...but it's the first branch that's
triggering in this case).
*ogrinfo* on the Shapefile reports no errors or warnings, although it does
report a CRS ID of 9001 even though it reports WGS84 elsewhere in the CRS
block.
I was able to trivially *ogr2ogr* it to GeoJSON, also with no errors or
warnings, and that imports with no issue.
Is there an actual problem (a bad file) here, or are we doing something
wrong?
Thanks, as ever, in advance.
--
Simon Eves
Senior Rendering Engineer
+1 (415) 902-1996
simon.eves at heavy.ai
<http://www.heavy.ai>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20240327/c1cfd638/attachment.htm>
More information about the PROJ
mailing list