[GRASS-dev] PROJ6 support in GRASS

Markus Metz markus.metz.giswork at gmail.com
Thu Sep 26 13:00:07 PDT 2019


On Wed, Sep 25, 2019 at 10:55 PM Even Rouault <even.rouault at spatialys.com>
wrote:
>
> On mercredi 25 septembre 2019 22:47:21 CEST Markus Metz wrote:
> >
> > PROJ6 will not use the best method if any required datum transformation
> > grid is not available. Users will need to obtain the corresponding grid
> > themselves, which raises another question: where to put this grid? On
> > Linux, this would be e.g. /usr/share/proj, but if the user can not
write to
> > /usr/share/proj, the grids need to be saved somewhere in $HOME, and
PROJ6
> > must look at that place. This problem, i.e. the place where PROJ6 should
> > look for in $HOME is not yet solved AFAICT (proj-6.2.0).
>
> Applications may decide for an appropriate user directory and set it with
> proj_context_set_search_paths() (in that case this overrides PROJ_LIB or
> hardcoded directories, so you have to add in the search paths if this is
the
> desired behaviour)
>
> QGIS has code to do exactly that:
>
https://github.com/qgis/QGIS/blob/65359bc7eafbfe967c669d1428eeedb87c5cd2a1/
> src/core/qgsapplication.cpp#L312
> and
>
https://github.com/qgis/QGIS/blob/d45c3dd4f1e8fe3642d42d84aa978b28dba913aa/
> src/core/qgsprojutils.cpp#L258

The (my) idea is that proj suggests reasonable paths to store grids, search
paths should be available in PJ_INFO. Otherwise applications may decide for
a directory specific to that application, not generally valid for proj used
by different applications. Applications can then check the existing proj
search paths and install grids to a path where the current user has write
access. Thus no need to use proj_context_set_search_paths() and no need to
install the same grid(s) repeatedly.

However, there are no default search paths in PJ_INFO. Can you give a hint
where the default search paths accessible in the C API?

Markus M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20190926/0413d3a9/attachment.html>


More information about the grass-dev mailing list