Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid side effects on PROJ_LIB when loading sf #1226

Closed
wants to merge 6 commits into from

Conversation

lbusett
Copy link
Contributor

@lbusett lbusett commented Dec 23, 2019

This attempts to solve r-spatial/discuss#31 for sf, by avoiding changing environment variables on load. Required changes are done on-the-fly upon calls to st_crs or st_transform, and automatically reverted on.exit. (See comments on last commit)

Hope this helps and makes sense.

PS2: testthat test are all passing, but many differences are found on tests comparing with Rout.save files. However, the differences seem similar to those also observed on travis build on wkt2 branch.

Auto set and reset of PROJ_LIB and GDAL_DATA upon call of st_crs and st_transform, and reset on.exit, instead than changing on .load and .unload - first push to see if checks / tests are ok.
Auto set and reset of PROJ_LIB and GDAL_DATA upon call of st_crs and st_transform, and reset on.exit, instead than changing on .load and .unload - first push to see if checks / tests are ok.
@lbusett
Copy link
Contributor Author

lbusett commented Dec 24, 2019

...still failing on Appveyor - will dig further in a few days....

@lbusett
Copy link
Contributor Author

lbusett commented Feb 18, 2020

Closing this - much more difficult than expected, so it is much better to wait for GDAL3/PROJ6 support on Windows binary on R 4.0...

Sorry for the clutter.

@lbusett lbusett closed this Feb 18, 2020
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.

1 participant