Convert Geo-Stuff from sp to sf#6
Open
rnuske wants to merge 14 commits into
Open
Conversation
added 13 commits
February 14, 2020 16:35
Conversion of sf to owin leads to a different tile order and subsequently to different sampling points because of a different state of the RNG. Thus, I used a detour over SpatialPolygons to owin to get identical results (make the unit tests happy) for now. This should be cut out later, making maptools obsolete.
maptools can be removed, when xy_sample_random is changed to pure sf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Just replaced the calls to
sp-functions withsf-functions. Tried to change as little as possible.This pull request builds on the changes in #5 and thus appears larger than it actually is.
I created testthat unit test for all functions doing geo processing to ensure identical result after conversion.
The transformation of an
sf-object toowinleads to a different order of tiles and subsequentially to different sample points due to a different state of the RNG. Thus I took a detour overSpatialPolygonstoowinto make the unit test happy. This should be cut out later.