Skip to content

Adopt wkb #37

@kylebarron

Description

@kylebarron

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions