Implement promote_to_multi
when converting WKB to sfc
#2369
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.
Apologies for taking so long to circle back here, but this is one approach to ensuring that
R CMD check
passes whenR_SF_ST_READ_USE_STREAM=true
. It also has the nice side-effect thatuse_stream = TRUE
no longer uses the wk package to construct sfc objects and that all users ofst_as_sfc(<WKB>)
can now usepromote_to_multi = TRUE
to get the same read-ogr-like behaviour.Closes #2296.
Example:
I do still see:
...when running
testthat::test_local()
withR_SF_ST_READ_USE_STREAM=true
. I think this happens because of how nanoarrow converts timestamps without an explicit timezone to R objects: nanoarrow assigns UTC as opposed to settingtzone = ""
or omitting it. I copied this behaviour from readr because it is more reproducible between systems, but I'm not sure it's any more or less correct.