-
Notifications
You must be signed in to change notification settings - Fork 8
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
ENH: geography constructor from geoarrow #49
Open
jorisvandenbossche
wants to merge
15
commits into
benbovy:main
Choose a base branch
from
jorisvandenbossche:geoarrow-input
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
ENH: geography constructor from geoarrow #49
jorisvandenbossche
wants to merge
15
commits into
benbovy:main
from
jorisvandenbossche:geoarrow-input
Conversation
This file contains 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
This reverts commit a01dc4b.
jorisvandenbossche
force-pushed
the
geoarrow-input
branch
from
October 26, 2024 12:31
030fb60
to
b2ff23d
Compare
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.
This depends on paleolimbot/s2geography#23This also introduces the question: how to we deal with functions that depend on a specific version of s2geography? Short term we can just ensure we do a upstream release and require the latest version, but longer term we might need to have some mechanism for this? -> added some version definitions that can be used in C++
Some other notes:
from_geoarrow
that accepts any Arrow-compatible array object (through the Arrow PyCapsule interface). As a result, this is not a numpy vectorized function that will take any dimension of input, it's purely a 1D -> 1D function.__arrow_c_array__
, but probably should also support__arrow_c_stream__
? (given that a lot of other libraries will often only implement that)s2geography::geoarrow::Reader
already supports WKT, WKB and native (nested coordinates) encoding, so those work out of the box here as well.Right now I only accept Arrow input with an extension type and let the Reader figure out the encoding, but we could also add a argument to let the user specify "WKT"/"WKB" and then accept a plain Arrow object (without geoarrow extension type)
from_wkt
that is a normal vectorized function, but the problem is that pybind11'svectorize
doesn't seem to likestd::string
argument input for a vectorized arg. -> this is done in ENH: add from_wkt/to_wkt functions #50