Skip to content

Conversation

@brownag
Copy link
Contributor

@brownag brownag commented Jan 3, 2026

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 #2001

  • synchronizes PROJ and GDAL PROJ search paths by using both proj_context_set_search_paths() and OSRSetPROJSearchPaths() (when available)
  • updates Windows-only conditional (.set_proj_search_paths(path) only when Sys.info()["sysname"] == "Windows") to set paths via projPaths(path, TRUE) whenever bundled PROJ data is detected in the package directory (as may be the case on macOS binary builds, for instance)
  • adds projNetwork() for user control of PROJ CDN
    • exposes internal .PROJ_network, and updated to allow for getter-only behavior w/ enable=-1

This 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.

@rhijmans rhijmans merged commit e0009ea into rspatial:master Jan 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PROJ initialization issues

2 participants