-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong interpretation of EPSG code from a PRJ file in QGIS-dev (proj v7.1.0) #36111
Comments
I think I've the explanation. QGIS doesn't directly process the PJ* object built from the .prj file, but likely the one built from the WKT representation of the SRS exported by GDAL. When GDAL exports the WKT, it adds axis specification (since that's compulsory), but as the axis order infered from ESRI WKT is in easting, northing order and EPSG:3035 is northing, easting, later identification fails to find EPSG:3035 but finds instead IGNF:ETRS89LAEA that has easting, northing axis order |
Some background: This was the report of the alternatives used in the European Union (contains definitions by formulas etc on pages 25f.): And that's the final INSPIRE Data Specification on Coordinate Reference Systems – Technical Guidelines from the working group, which links to ComparisonsAfter ringing some doors, I found some guys with different software suites, which exported shapefiles in The current PRJ-string from the original dataset
Export from ArcGIS Pro
Export from GlobalMapper
Export from ogr2ogr 3.0.4/3.2.0-dev
Export from QGIS 3.13-Master
ConclusionThe ESRI definitions seem to make trouble here. While shapefile is a product by ESRI, I wonder if QGIS shouldn't take care of the characteristics of the PRJ-files. Since ArcGIS is scriptable, one could create a lookup table to match between numeric EPSG code and the output in shapefile to get a perfect match. |
My above analysis was wrong. This was a PROJ pure issue. Fixed per OSGeo/PROJ#2240 |
Describe the bug
QGIS-dev with proj 7.1.0 currently interprets a PRJ-definition the wrong way. Instead of
EPSG:3035
the string is detected asIGNF:ETRS89LAEA - ETRS89 Lambert Azimutal Equal Area - Projected
Normally, proj 7.1.0 shouldn't behave like this, since the confidence is >= 70% and there's only one matching SRS. Please check the additional context for this.
How to Reproduce
QGIS and OS versions
Additional context
According to the code, >= 70% should be enough:
QGIS/src/core/qgsprojutils.cpp
Line 235 in 4ab9f17
Gives a confidence of 70% that this string is
EPSG:3035
(and this is the only matching CRS).The text was updated successfully, but these errors were encountered: