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

Support pyarrow.Table with geoarrow.pyarrow extension types as geometry columns #218

Merged

Conversation

jorisvandenbossche
Copy link
Contributor

Work-in-progress, and haven't yet tested it.

The idea is that when encountering a geoarrow.pyarrow extension type, to convert this to its raw storage field with metadata (i.e. how the extension type looks like in IPC or when the python wrapper class is not registered). Short term, this is the easiest approach, because a lot of the existing code relies on checking eg the "ARROW:extension:name" in the field metadata.

@jorisvandenbossche
Copy link
Contributor Author

This works now, but it still requires you to ensure you are passing interleaved coordinates, and not one of the other geoarrow types (separated, or wkb/wkt). We could also do that conversion automatically.

Should probably factor out the added code into a helper function somewhere.

@kylebarron
Copy link
Member

This works now, but it still requires you to ensure you are passing interleaved coordinates, and not one of the other geoarrow types (separated, or wkb/wkt). We could also do that conversion automatically.

Should probably factor out the added code into a helper function somewhere.

For now I'd be happy to just assert that the coordinates are interleaved, and handle separated/wkt/wkb in the future

@kylebarron kylebarron self-requested a review November 8, 2023 16:18
@kylebarron kylebarron changed the title Support pyarrow.Tables with geoarrow.pyarrow extention types as geometry columns Support pyarrow.Table with geoarrow.pyarrow extension types as geometry columns Nov 8, 2023
@kylebarron
Copy link
Member

this lgtm! Anything else you wanted to do before merging?

@kylebarron
Copy link
Member

In #308 I now check for pycapsule interface methods but don't yet handle pyarrow extension types

@kylebarron kylebarron marked this pull request as ready for review January 30, 2024 00:38
@kylebarron kylebarron enabled auto-merge (squash) January 30, 2024 00:39
@kylebarron kylebarron merged commit 949b272 into developmentseed:main Jan 30, 2024
5 checks passed
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.

None yet

2 participants