Implement promote_to_multi when converting WKB to sfc#2369
Open
paleolimbot wants to merge 12 commits intor-spatial:mainfrom
Open
Implement promote_to_multi when converting WKB to sfc#2369paleolimbot wants to merge 12 commits intor-spatial:mainfrom
promote_to_multi when converting WKB to sfc#2369paleolimbot wants to merge 12 commits intor-spatial:mainfrom
Conversation
promote_multi when converting WKB to sfcpromote_to_multi when converting WKB to sfc
Member
|
There are still several tests failing for me on this PR: DetailsAre these expected? |
Contributor
Author
I'll revisit in a bit! These are failing tests when specifically using the GDAL stream API, correct? If so, I think it is because nanoarrow implements "timezonelsss" timestamp conversion to R as assigning the UTC timestamp (for portability between the same code running on two computers...readr does this too). I may be remembering the details incorrectly! (I'm not sure about the CRS test case!) |
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.
Apologies for taking so long to circle back here, but this is one approach to ensuring that
R CMD checkpasses whenR_SF_ST_READ_USE_STREAM=true. It also has the nice side-effect thatuse_stream = TRUEno longer uses the wk package to construct sfc objects and that all users ofst_as_sfc(<WKB>)can now usepromote_to_multi = TRUEto 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.