Closed olivierchatry closed 3 years ago
@olivierchatry Looks great - just needs to have some guards added for previous versions where this function didn't exist. Check the travis-ci results on the PR which are failing on all of the shared bindings (error: use of undeclared identifier 'OSRSetPROJSearchPaths'; did you mean 'setPROJSearchPath'
).
Will fix as soon as I can.
@olivierchatry I have an idea to simplify this a bit - why don't we keep what you originally had (always call setPROJSearchPath) and just make setPROJSearchPath
no-op prior to gdal 3.0? It isn't needed or used in those versions anyways. All of the PROJ_LIB stuff was just in the recent releases, so we can keep the same behavior in 1.x/2.x by just ignoring it.
Specifically just remove L22-28 in JS, and L214-215 in C++ and I think we're good to merge
Done
This add a stratic function
setPROJSearchPath
that callOSRSetPROJSearchPaths
to define where PROJ will search for it data.By default, it will be call with bundled path data if PROJ_LIB is not set.
This fix windows version sometimes not able to find proj.db ( and other files ).