[gdal-dev] OSRGetPROJSearchPaths unexpected behaviour
Even Rouault
even.rouault at spatialys.com
Mon Aug 17 10:17:15 PDT 2020
Javier,
> I have been using OSRSetPROJSearchPaths so far.
> Now, to test if "anybody" changed those paths (like another library), I am
> calling OSRGetPROJSearchPaths.
After the first call to OSRSetPROJSearchPaths(), other libraries cannot
mess up with the search paths set through GDAL since GDAL uses dedicated
PROJ contexts that use the value set by OSRSetPROJSearchPaths(),
so changing the paths of the default PROJ context will have no influence.
> However, even if I call one after the other,
> I get something different from OSRGetPROJSearchPaths.
>
> I guess OSRGetPROJSearchPaths is getting the data from proj_info, that
> calls pj_get_default_ctx. So it is not updated with the data I set in
> OSRSetPROJSearchPaths. Is that the case?
Correct
> If yes, is it intentional? I was
> expecting exactly the values I had set one line above with
> OSRSetPROJSearchPaths.
No not really intentional.
Fixed per https://github.com/OSGeo/gdal/commit/bf8355a7a29ade1d5fd60924c367c763dc27bd90
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200817/a638f75e/attachment-0001.html>
More information about the gdal-dev
mailing list