-
-
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
synchronize QGIS' SRS definitions with GDAL's 1.8.0 SRS database #13704
Comments
Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV) I created a tiny script to a) flag the srs.db's tbl_srs 'parameters' column needing updates and b) ouput the sql update query. The script compared qgis' srs.db against the proj4's EPSG file (http://trac.osgeo.org/proj/browser/trunk/proj/nad/epsg), the latter already synched with GDAL. 2157 SRS parameters needed update (mostly +towgs84 additions).
|
Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV) I've attached the script used to come up with the sql update statements. It's unfortunately not in python but in php. |
Author Name: Jürgen Fischer (@jef-n) the attached patch updates our db with the parameters of PROJ. This could be run on automatically at installation (using the python API). Unfortunately there currently is a bug in PROJ that causes the routine to crash after fetching 16 projections ("PROJ #10159":http://trac.osgeo.org/proj/ticket/100). |
Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV) jef, as mentioned over irc, the updated srs.db you applied in changeset 15584 (http://trac.osgeo.org/qgis/changeset/15584) doesn't appear to have the latest definition for many datums (based in gdal 1.8). To give one example, the epsg 3148 (indian 1960 48n) in your srs.db is: It's missing the +towgs84 declaration, found in latest gdal 1.8 and proj.4 epsg file: Without the +towgs84 declaration, on the fly reprojection of wgs84 & epsg 3148 datums have a +450m margin difference. It also affects coverting layers from one datum to the other using qgis' built-in "save as..." function. You based your updated srs.db on proj 4.7.0 (http://trac.osgeo.org/proj/browser/tags/4.7.0/proj/nad/epsg) which the devs synched with latest gdal definitions afterwards (http://trac.osgeo.org/proj/browser/trunk/proj/nad/epsg). Would it be possible to ship 1.7 with a srs.db synched with gdal latest datum definitions? |
Author Name: Maciej Sieczka - (Maciej Sieczka -) Replying to [comment:4 nirvn]:
Couple of months ago I have written a Shell script which creates a new srs.db based on the output of localy installed PROJ.4 and GDAL: http://trac.osgeo.org/qgis/browser/trunk/qgis/scripts/qgis_srs.sh. It was used once to update the srs.db in SVN, about a year ago. After that, a few manual edits have been done on srs.db too. The script would not retain those manual non-GDAL-derived SRS definitions. They would need to be taken care of. I guess that as of current trunk SVN these are srs_id>=3646. |
Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV) jef, kudos for http://trac.osgeo.org/qgis/changeset/15617 |
Author Name: Paolo Cavallini (@pcav) Now EPSG:3003 is defined in QGIS as:
instead of the old:
Similarly for EPSG:3004. The corrections have been already inserted as fake EPSG codes:
So the fake codes 40000 and 40001 are now duplicates, and should be |
Author Name: Jürgen Fischer (@jef-n) Replying to [comment:7 pcav]:
The EPGS numbers are prefered. Removing the definitions might break layers that are assigned to one of those. |
Author Name: Jeremy Palmer (@palmerj) The patch from http://trac.osgeo.org/qgis/ticket/3136 have also been reverted by this update from gdal. Can we re-apply them? |
Author Name: Jürgen Fischer (@jef-n)
|
Author Name: Mathieu Pellerin - nIRV (Mathieu Pellerin - nIRV)
Original Redmine Issue: 3645
Redmine category:projection_support
Assignee: Jürgen Fischer
Some QGIS´ SRS definitions are missing towgs84 values, including UTM Indian 1960 48N, resulting in misalignment of mixed-datum layers with projects with on the on the fly reprojection set.
Folks from the #gdal IRC channel said QGIS should update/synchronize it's SRS definition database with GDAL's 1.8.0 SRS database.
I can confirm that creating a custom SRS using GDAL's version of the UTM Indian 1960 48N definition (same as QGIS except QGIS misses the +towgs84 value) fixed all of my reprojection problems.
(see a bunch of screenshots with misaligned vectors from this now invalid ticket: http://trac.osgeo.org/qgis/ticket/3632)
Pasting some useful bits from a discussion in #gdal:
EvenR, what would explain a difference in reprojection between qgis and gdal?
it might depend on the GDAL version you have and the definition that QGIS uses for EPSG:3148. GDAL 1.8.0 has a TOWGS84[198,881,317,0,0,0,0] for EPSG:3148.
you have to check what SRS definition qgis uses for EPSG:3148. I suspect it has not the TOWGS84 shift
+proj=utm +zone=48 +a=6377276.345 +b=6356075.41314024 +units=m +no_defs
indeed, there's no towgs84 in the qgis definition
it could be appropriate that it synchronizes its SRS definitions (for that one, and also for others) with GDAL 1.8.0 SRS database
in GDAL 1.8.0, a lot of TOWGS84 have been added by taking into account the preferred datum shift from the EPSG database
omg, it actually works
I created a custom crs using the indian 1960 48n definition and adding the +towgs84 bit, et voila
you can point to http://trac.osgeo.org/gdal/changeset/18978 which is the changeset during GDAL 1.8.0 where the datum shift logic has been improved
Related issue(s): #14023 (relates)
Redmine related issue(s): 4037
The text was updated successfully, but these errors were encountered: