[gdal-dev] Discoverability of the new proj.db and GDAL_DATA/PROJ_LIB?

Even Rouault even.rouault at spatialys.com
Wed Jan 9 10:12:44 PST 2019


> PROJ 6 new API has a proj_context_set_database_path() function but I've not
> used/exposed through GDAL for now. It is something per-context (and thus
> potentially per thread since in my new GDAL branch PROJ contexts are per-
> thread variables, which are not exposed in GDAL API), and only for proj.db
> itself, not other PROJ resources (such as grid files) normally accessible
> through PROJ_LIB / ${prefix}/share/proj
> 
> There's also a related ticket in PROJ tracker:
> https://github.com/OSGeo/proj.4/issues/1150
> We'd probably need to expose pj_set_searchpath() in the public PROJ API.

I've just submitted a PR https://github.com/OSGeo/proj.4/pull/1218 to add a

proj_context_set_search_paths(
 PJ_CONTEXT *ctx, int count_paths,const char* const* paths)

If called on the default PROJ context (NULL) before GDAL creates it own 
contexts, this should allow you to specify your own search path.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list