-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
(regression) QGIS 1.7.* misdetects EPSG::25884 datasets as EPSG::2100 #14833
Comments
Author Name: marisn - (marisn -) #14833 could be a related issue.
|
Author Name: marisn - (marisn -) Just checked that 1.6.0 is not affected. Due this issue, we are keeping our GIS labs on 1.6.0 release, as EPSG:25884 is the most used coordinate system in our university. |
Author Name: Giovanni Manghi (@gioman) tagging this as a regression
|
Author Name: marisn - (marisn -) Just tested 1.7.4 on Linux and found out that it suffers from the same issue.
|
Author Name: Jürgen Fischer (@jef-n) marisn - wrote:
The problem also does relate to a change in GDAL were most of the +datum= parameters were dropped and +towgs84= parameters were inserted. QGIS now ignores +datum=, if there's no match found. EPSG:25884 and EPSG:2100 are only different by +towgs84 parameter:
WKT of the shape:
|
Author Name: Etienne Tourigny (@etiennesky) I don't know when (and why) +datum was removed from gdal output of proj.4 strings, but the problem here is that .prj files do not have +towgs84 parameters. In gdal 1.9 this can be fixed with the config option GDAL_FIX_ESRI_WKT=TOWGS84
Perhaps this config option could be added to the GGis environment? How does master deal with this problem? |
Author Name: Jürgen Fischer (@jef-n) Fixed in changeset "2f135c1d630f0f96422547c31a05c38d41997470".
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: marisn - (marisn -) Unfortunately issue is back in master. 1.9.0-Master Running GDAL 1.8.1
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: marisn - (marisn -) It's still an issue for some datasets.
|
Author Name: marisn - (marisn -) Forgot to add version information: QGIS versija 1.9.0-Master Also fix only for OGR >1.9.x is unacceptable, as due to QGIS + OGR layer encoding issues, it's not possible to read/write shapefiles with GDAL/OGR 1.9.x (yes, shapefile encoding still doesn't work at all when QGIS runs with GDAL/OGR 1.9.1!) and thus GDAL/OGR 1.8.x is the only option for many QGIS users. |
Author Name: Giovanni Manghi (@gioman) marisn - wrote:
not sure, but aren't both gdal issues? |
Author Name: marisn - (marisn -) Giovanni Manghi wrote:
Well. No. They both are QGIS issues triggered by changes in GDAL/OGR/Proj. GDAL/OGR doesn't mandate EPSG code to operate on datasets. I don't know if it's QGIS doing the wrong guess or GDAL/OGR, still end result is clear - QGIS uses wrong CRS, OGR tools use right one. As long as QGIS was using just datasets .prj file contents, it was fine. Here's example how to check it:
Compare output. est_bal equals est_raw, est_gre is shifted by ~200m. Conclusion - ogr2ogr uses right CRS for provided file. As goes for encoding issues - I'm fed up with them. It's still not possible to specify correct encoding in layer preferences or when adding vector dataset AND get data in specified encoding. Pointing out that there are also issues on QGIS side is threated like blasphemy. Still most likely I will reopen bugs when GDAL/OGR 1.9.2 will come out and issue will still exist. |
Author Name: Giovanni Manghi (@gioman)
I'm sorry but you are plain wrong. If you check you will see I'm the top bug reporter (or the second one, anyway I'm the top one in the last 3 years) -> I have no interest in not reporting a QGIS bug, on the other hand I'm very interested in hunting any possible bug. Here the point is to keep the tracker as clean as possible, avoiding to have open tickets that are not right/necessary and eventually redirecting the issue upstream to other projects trackers.
I have no reason to not believe you, anyway we will see as soon as qgis will be compiled against gdal 1.9.2 In any case if the latest gdal version available has the issue described here fixed, I don't understand why this should be left open. But anyway I will leave the last word to someone else. |
Author Name: Jürgen Fischer (@jef-n) marisn - wrote:
That's part of the problem. QGIS doesn't use the .prj directly and AFAIK never did. It only uses it to find a match in the srs.db and actually use the projection defined there. And finding that match became more complex after the GDAL change, because the datum parameter was dropped from GDAL and replaced with the towgs84 parameter. And therefore QGIS would fail to recognize those as there wasn't an exact match anymore and in turn produce a user CRS. So people started to complain about user CRSs instead of EPSG CRSs. So the detection was relaxed a bit by ignoring the @+datum@ parameter, if there's no match otherwise. Unfortunately there are some CRSs that are only different by the datum parameter - the above two being one of those pairs. And QGIS did pick the first hit even if there are more than one. 42a9d01 changes that. So now, QGIS produces a user crs for @estonia_generalized.shp@ now. BTW @Baltic_93TM_QGIS_test.shp@ still worked for me. Still a compromise and hopefully not one that breaks other things.
Welcome to the club.
"threated" should have been "treated", shouldn't it? No one is threatening anyone, right? |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: marisn - (marisn -)
Original Redmine Issue: 5066
Affected QGIS version: master
Redmine category:projection_support
When adding a vector dataset (shapefile) with correct PRJ file listing it's CRS as ETRS89/TM Baltic93 (EPSG::25884), it gets set as a layer CRS a Greek grid (EPSG::2100). Reprojecting such data results in ~300m shift for all features. If user digitizes data without realizing that QGIS has misdeteced it's CRS, it results in storing of wrong data!
Workaround: when adding every vector dataset, user has to check if QGIS has detected CRS correctly and in the case of detection like Greek grid, to set correct CRS manually.
Tested versions: QGIS 1.7.2 and 1.7.4 on MS-Windows.
Current git master on Linux just detects same shapefile (created with QGIS) to have "generated" CRS and thus is reprojected correctly.
Attaching a sample shapefile and a project file where the wrong detected CRS is visible.
Related issue(s): #14764 (relates), #15172 (relates)
Redmine related issue(s): 4977, 5598
The text was updated successfully, but these errors were encountered: