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

Ewkb support for WKBArray #254

Closed
wants to merge 6 commits into from
Closed

Conversation

lewiszlw
Copy link
Contributor

@lewiszlw lewiszlw commented Nov 17, 2023

No description provided.

geozero::wkb::Wkb(buf.to_vec()).to_geo().unwrap()
match value.flavor {
WKBFlavor::ISO => geozero::wkb::Wkb(buf.to_vec()).to_geo().unwrap(),
WKBFlavor::EWKB => geozero::wkb::Ewkb(buf.to_vec()).to_geo().unwrap(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very small subset of the wkb parsing in this crate. The majority happens when casting a wkb array to a concretely-typed geometry array. That happens with our own WKB parsing (see crate::io::wkb iirc). As a precursor to ewkb support, we need to support parsing ewkb geometries with those functions, or else ewkb will still crash on the vast majority of operations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This exceed my knowledge. I don't know the binary format difference between wkb flavors yet. Now I mainly use WKBArray instead of concretely-typed array. Maybe we can merge this pr but still keep the issue open? I will learn them, it'll nice if you have time to create pr to fully support ewkb.

@lewiszlw lewiszlw changed the title Ewkb support Ewkb support for WKBArray Nov 20, 2023
kylebarron added a commit that referenced this pull request Jan 1, 2024
### Change list

- Add traits for parsing WKT and EWKB to geoarrow via geozero. 
- This is relatively inefficient because it goes through `to_geo` first.
In the future we should implement `GeometryCollectionStreamBuilder`


Closes #251, closes
#254.
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.

2 participants