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

Fix double writing of centroids, convex hull, envelope and oriented bounding box for areas derived from ways #97

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

patrickbr
Copy link
Member

@patrickbr patrickbr commented Oct 11, 2024

For ways, the centroid, the convex hull, the envelope and the oriented bounding box were written without checking whether the way was an area. These triples were then again written for the area. Without the centroids, we never noticed the duplicate triples, as they were always equivalent. For the centroids, however, this is no longer the case, as the mean of all points on a line typically greatly differs from the mean of all points in a polygon bounded by that line.

This PR fixes this behavior.

@lehmann-4178656ch lehmann-4178656ch merged commit 1271fb1 into master Oct 14, 2024
5 checks passed
@lehmann-4178656ch lehmann-4178656ch deleted the fix-centroid-bug branch October 14, 2024 12:10
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.

2 participants