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

Adopt wkb #37

Open
kylebarron opened this issue Nov 27, 2024 · 0 comments
Open

Adopt wkb #37

kylebarron opened this issue Nov 27, 2024 · 0 comments

Comments

@kylebarron
Copy link
Member

kylebarron commented Nov 27, 2024

There's no freely-licensed, standalone WKB crate in the georust ecosystem. https://crates.io/crates/wkb exists but is AGPL3. geozero has a WKB parser and encoder, but it presents access as a stream, instead of by random access, which can be harder for downstream packages to use.

I propose that we move https://github.com/kylebarron/wkb into the georust org. It has:

  • Reading and write without copying to an intermediate representation, thanks to geo_traits.
  • Full support for Z, M, and ZM dimension data.
  • Full support for little-endian and big-endian data, in both reading and writing.
  • MIT and Apache 2 license.

In terms of benchmarks, a simple benchmark showed that it's 2.8x faster than Shapely for reading and 11x faster than Shapely for writing (ref georust/wkb#37 and georust/wkb#38). This isn't a full apples to apples comparison because Shapely is a wrapper of GEOS to Python, but I think for WKB reading and writing the amount of Python overhead should be quite small. So I think it's safe to say this is at least as fast as GEOS, if not faster.

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

No branches or pull requests

1 participant