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