-
Notifications
You must be signed in to change notification settings - Fork 576
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
buildings: prevent slivers of self-intersecting geometry #1028
buildings: prevent slivers of self-intersecting geometry #1028
Conversation
Results evaluating commit 7605a49 (merged with base 7216593 as 0cfd46f). See run details. PostgreSQL DB size in MB: 2665 ⇒ 2591 (-2.8% change)
expand for details...
|
Hi @quentar, thanks for PR. If the visual check is OK, let's use it. |
Hi @quentar, where did you test the buildings? The green buildings are original, red is your suggestion. Ideally, there should be just red buildings. A lot of buildings in zoom level 13 is now missing (pictures from Albania). |
@TomPohys Thank you for testing that! I did not use this tool. I don't have many ideas what to try next though. |
Was this issue resolved? I still encounter it when trying to process New Zealand and also Spain. |
Let's close this PR in advance of #1044. New Zealand was fixed by ST_SnapToGrid function in update_building.sql |
To address issue #1022 , where current New Zealand region with invalid data which aborts the import-sql loop.
It seems adding ST_IsValid condition to would pass and does not pass through New Zealand, however
flipping negative and positive radius for ST_Buffer helps to remove self-intersection.
It was suggested online at https://gis.stackexchange.com/questions/281935/topology-exception-on-geometry-intersection
Hopefully that should not have performance impact as it is not adding to the query.
Visually checking, regions buildings looks the same in output tiles, with benefit of New Zealand passing.
💡 At first I've tried adding ST_IsValid conditions at https://github.com/openmaptiles/openmaptiles/blob/master/layers/building/update_building.sql#L27
OR https://github.com/openmaptiles/openmaptiles/blob/master/layers/building/update_building.sql#L31
though it still aborted.
Issue log: (when doing
quickstart.sh new-zealand
,make import-sql
step)