-
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
Fix Area trait for Polygon to consider inner isles and implement area tait for MultiPolygon #43
Conversation
Consider this example:
I wonder if there are other libraries that handle this scenario. A natural response would be "this is an invalid Polygon since the inner rings fall outside the outer ring". I think this is a valid response for the time being unless someone knows of an easy way to do the correct calculation above. @zarch What do you think? I think your changes are an improvement and I'm 👍 on merging them. Just want to pass this by you. Thanks for the pull request! |
Your polygons are invalid according to the "Simple Features" specification from the OGC. |
Also according to the GeoJSON spec, although that's much less rigorously defined: http://geojson.org/geojson-spec.html#polygon |
Thanks for your input @waywardmonkeys, much appreciated! This pull request looks good to me. @zarch Feel free to merge and deploy a new version (0.2.1). Otherwise I can do it myself sometime tomorrow. 🎊 |
Thank you @frewsxcv, in these days I was think that would be nice to add a trait like: IsValid (is_valid) that check if a geometry is valid or not. |
For now, I think opening a new issue in this repository (rust-geo) should be fine for now. I also just created https://github.com/georust/meta/ as a place to discuss GeoRust projects and the organization. |
43: Use generic type for precision in conversion r=frewsxcv a=pjsier Attempt to close georust#33. I based this off of the conversion implementation in [geojson](https://github.com/georust/geojson/blob/master/src/conversion.rs) and only used generic types for converting to `geo_types` objects Initially I tried to update the `From` trait implementation, but I used `Into` instead because updating `From` gave me the following error: ``` type parameter `T` must be used as the type parameter for some local type ``` If I missed something that would make `From` work instead I can make that change. Let me know if I should change that or anything else here, thanks! Co-authored-by: pjsier <pjsier@gmail.com>
No description provided.