[QGIS-Developer] Dealing with datum shift grids in QGIS

Martin Dobias wonder.sk at gmail.com
Thu Oct 11 09:55:54 PDT 2018


Hi Even

On Thu, Oct 11, 2018 at 5:31 PM Even Rouault <even.rouault at spatialys.com> wrote:
>
> It seems you want to have a read at my yesterday-written RFC:
> https://github.com/OSGeo/proj.4/pull/1149
>
> Particularly the part concerning the database:
> http://even.rouault.free.fr/proj_cpp_api/rfc-2.html#database
>
> and the data/sql/ files mentionne at
>
> http://even.rouault.free.fr/proj_cpp_api/rfc-2.html#impacted-files

Just read through all that. Amazing work.

This makes me wonder when we could start using this in QGIS - I am
afraid we will have to wait for some time until it is all out in a
stable Proj release and adopted by major distributions, which may take
quite some time... (a year?)


> > My suggestions for Proj:
> > 1. it should be possible to specify multiple data directories with
> > PROJ_LIB env variable, so that it is possible to use grids also from
> > user's home directory (not just the read-only system directory)
>
> That's an interesting idea. Could you file a ticket to
> https://github.com/OSGeo/proj.4/issues about that ?

Done: https://github.com/OSGeo/proj.4/issues/1150


> > 2. there could be a database similar to datum_shift.csv [2] that would
> > list well known datum shift grid files, so that QGIS does not need to
> > maintain its database and just pull that information out of Proj -
> > other projects could benefit from that as well.
>
> Sounds very much like:
>
> https://github.com/rouault/proj.4/blob/iso19111/data/sql/grid_alternatives.sql

Pretty much. Looking at the grid support, I see that the OSTN15
transformation is listed there in the grid_transformation table, but
we would also need an entry in grid_alternatives table for it +
include it in a future release of proj-datumgrid-europe package (that
particular grid is BSD licensed, so it should be fine).

Regarding contents of proj.db table, will it be acceptable for apps
like QGIS to browse its contents or should it be considered as Proj
library's implementation detail and any queries to it should go
through Proj API? I am thinking it would be nice to automatically
determine grid packages for missing grid files and to download them in
QGIS if the users wants. Another question is what to do with grids
with license that does not allow redistribution - should we have
entries with URL in grid_transformation table for such grid files as
well? (maybe with a flag that it is not direct link to a package, just
a web page about that grid)

One final thought - how about customization of proj.db by ordinary
users? In QGIS users are allowed to define their custom CRS based on
Proj string - is something like that going to be supported? E.g. to
have system proj.db and user proj.db with customizations?


> It would be good if we could utlimately get rid of QGIS srs.db and just use
> the future PROJ proj.db that could be used by the whole PROJ/GDAL/QGIS stack

That would be absolutely wonderful and I am looking forward to that day :-)

Cheers
Martin


More information about the QGIS-Developer mailing list