-
Notifications
You must be signed in to change notification settings - Fork 200
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
Add PostGIS and GeoJSON integration/conversions #180
Conversation
The PostGIS part looks great, but GeoJSON already provides fallible conversions for Geo items, however, the documentation was hidden for some reason when the original PR merged. I unhid it recently, but it won't hit docs.rs until we cut a new release, so nobody knows about it – sorry about that :/ |
@urschrei No problem - I got rid of the GeoJSON parts of this PR. Nice to know that a (better) implementation of it exists already! (Perhaps you should cut a new release? I don't know...) Anyway, let me know if there's anything more you want me to do w.r.t. the PostGIS integration stuff. |
Err, now I've gotten rid of the GeoJSON parts... (missed an |
Yes, absolutely. I thought we had after I updated the docs last time, but it seems we didn't. Anyway, the PostGIS conversions lgtm. |
this looks good to me! when i originally was thinking about this crate, i had envisioned 'geo' not having many dependencies and all of the associated crates (e.g. geojson, postgis, gpx) would have all of the conversion logic. but after seeing this pull request, it seems appropriate to have it live in this crate by an opt-in feature flag, good idea! thanks for the contribution! bors r+ |
180: Add PostGIS and GeoJSON integration/conversions r=frewsxcv a=eeeeeta This PR adds conversions from PostGIS types to `geo` primitives, and conversions from `geo` primitives to GeoJSON and PostGIS types. This integration is gated behind two new features, `postgis-integration` and `geojson-integration`.
Build succeeded |
183: Add Haversine length algorithm r=frewsxcv a=eeeeeta This PR adds a new algorithm, `haversine_length`, that computes the "Haversine length" of a line or linestring - i.e. the sum of the Haversine distances between every two points in the line. It also reexports this algorithm, and the PostGIS algorithms introduced in #180, in the prelude (because I realised I forgot to reexport them in #180...)
This PR adds conversions from PostGIS types to
geo
primitives, and conversions fromgeo
primitives to GeoJSON and PostGIS types.This integration is gated behind two new features,
postgis-integration
andgeojson-integration
.