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

Correctly calculate centroids for complex polygons. #112

Merged
merged 6 commits into from
Apr 2, 2017

Conversation

urschrei
Copy link
Member

@urschrei urschrei commented Mar 29, 2017

This PR closes #111. I've added helper functions for calculation of a simple polygon centroid, and for simple polygon area. The latter is functionally identical to get_linestring_area(), but we can't use that since it's a private function in a public module.

complex polygons (i.e. with interior holes)
urschrei added a commit to urschrei/geo that referenced this pull request Mar 31, 2017
This test will fail until georust#112 is merged
@urschrei urschrei mentioned this pull request Apr 2, 2017
@frewsxcv
Copy link
Member

frewsxcv commented Apr 2, 2017

Is this ready to go? Looks good to me if so!

@urschrei
Copy link
Member Author

urschrei commented Apr 2, 2017

Yep!

@frewsxcv
Copy link
Member

frewsxcv commented Apr 2, 2017

bors=frewsxcv,texitoi

@frewsxcv
Copy link
Member

frewsxcv commented Apr 2, 2017

bors r=frewsxcv,texitoi

bors bot added a commit that referenced this pull request Apr 2, 2017
112: Correctly calculate centroids for complex polygons. r=frewsxcv,texitoi
This PR closes #111. I've added helper functions for calculation of a simple polygon centroid, and for simple polygon area. The latter is functionally identical to `get_linestring_area()`, but we can't use that since it's a private function in a public module.
@bors
Copy link
Contributor

bors bot commented Apr 2, 2017

Build succeeded

@bors bors bot merged commit ad6f0c5 into georust:master Apr 2, 2017
@urschrei urschrei deleted the allow_centroid_holes branch April 2, 2017 16:40
urschrei added a commit to urschrei/geo that referenced this pull request Apr 10, 2017
This test will fail until georust#112 is merged
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

Successfully merging this pull request may close these issues.

Polygon centroid calculation should account for interior holes
3 participants