Opened 5 years ago
Closed 5 years ago
#17768 closed enhancement (fixed)
Use code in MultipolygonTest to improve CreateMultipolygonAction
Reported by: | GerdP | Owned by: | GerdP |
---|---|---|---|
Priority: | normal | Milestone: | 19.06 |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
A few things which are not good:
- Performance is poor when you update a complex multipolygon (MP) since
MultipolygonBuilder
uses complex area intersections - In special cases a created or updated MP might be flagged as incorrect by validator (
MultipolygonTest
)
My idea: The calculations in MultipolygonTest
are using a faster implementaion to detect the inner and outer ways (as well as geometry errors), it only requires a few lines of code to implement a method makeFromWays(Collection<Way> ways)
similar to that in MultipolygonBuilder
and all the validation result (list of TestError
s) comes for free.
In a further step I plan to use this to improve Selector.CrossingFinder
.
Attachments (2)
Change History (9)
by , 5 years ago
Attachment: | 17768-beta.patch added |
---|
comment:1 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 5 years ago
I am stepping through the unit test samples in data_nodist\multipolygon.osm
I think the "Update multipolygon" action should also fix some erros, esp.
- all member roles should be set correctly (okay)
- area style tags on outer ways should be moved to the mp relation (if correct old style mp) (okay)
- duplicate members should be removed (not done without the patch)
- non-Way members should be removed, although they are allowed in type=boundary relations (not done without the patch)
- invalid geometries should produce a message (okay)
- relation "06/04 - Mismatching way styles" should produce a warning (not done, also not with the patch)
comment:6 by , 5 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Create / update multipolygon no longer works when inner rings share segments.
Proof of concept, I am not yet 100% sure how to handle update of an invalid MP (e.g. node as member)