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

Consider re-exporting geo_types so this crate can be used without additional dependencies #34

Open
AlanRace opened this issue May 24, 2022 · 1 comment

Comments

@AlanRace
Copy link

I would like to use this crate without further dependencies (I only need the union functionality really). I can do this currently if I modify the first line of /lib/src/boolean/mod.rs to:

pub use geo_types::{Coordinate, LineString, MultiPolygon, Polygon};

As an aside, I tried just using the latest version of geo_types in addition to this crate in my Cargo.toml and it failed to import/recognise the BooleanOp trait on the Polygon type. The above would also resolve this issue (unless there's something obvious I am missing?).

@michaelkirk
Copy link
Contributor

michaelkirk commented May 24, 2022

it failed to import/recognise the BooleanOp trait on the Polygon type

Possibly due to a mismatch in versions, causing duplicated geo-types in your dependency tree. You can check with cargo tree -d and see if geo-types appears with two different versions.

The above would also resolve this issue (unless there's something obvious I am missing?).

I think you're right that it'd resolve your immediate issue: you'd be able to use boolean-ops on the geometries exported from this crate, but since it sounds you are using another crate which relies on an incompatible geo-types, you might just have a similar issue somewhere else.

The thing I usually want, and somewhat commonly stumble at, is to get all my crates depending on the same version so they can interop.

See also #33 which updates this crate to use the latest geo-types.

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

2 participants