fix: PROJ initialization and network behavior #2000
Merged
+110
−39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses possible initialization inconsistencies in terra when bundled PROJ is used, and also adds
projNetwork()function for controlling PROJ CDN usage. Intended to close #2001proj_context_set_search_paths()andOSRSetPROJSearchPaths()(when available).set_proj_search_paths(path)only whenSys.info()["sysname"] == "Windows") to set paths viaprojPaths(path, TRUE)whenever bundled PROJ data is detected in the package directory (as may be the case on macOS binary builds, for instance)projNetwork()for user control of PROJ CDNenable=-1This is a sample implementation/proof-of-concept. It passes CI checks on my fork. (I hope) it will help ensure that otherwise valid binary installations of terra with bundled PROJ work as expected, following on from #1996. Feel free to revise, change function names, cherry-pick, or disregard if I have made any errors here.