Opened 10 years ago
Last modified 6 years ago
#10744 new enhancement
[patch proof-of-concept] Ease Multipolygon-Creation and Handling if selection overlaps ways that already take part in another MP
Reported by: | cmuelle8 | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | multipolygon | Cc: |
Description
The current work with MP in josm is still far from perfect. This patch tries to ease the pain by deploying the possibility to automatically reuse way segments that overlap with the ways selected when a multipolygon is about to be created (Strg+B in most installations).
The algorithm evaluates each way segment to find overlapping ways that already take part in a multipolygon relation. It calculates split points and automatically splits or directly reuses these ways to build the current multipolygon. As a result, the overlapping way segments of the selection are deleted and filled with the reusable ones found. This means, the resulting multipolygon consists of ways directly shared with the adjacent multipolygon areas found.
In an area well mapped with MP this patch unifies the creation of new areas to some extent: If a closed way is drawn iteratively, and overlaps many ways that take part in other MPs, then, if Strg+B is hit, the result will ultimately be the same as selecting the single outer way one by one and using Strg+B on this selection. Effectively, this enables the choice to map simple MPs like closed ways.
Atm this is just a proof-of-concept with an invitation to comment and test.
It's not ready for production yet. Todo:
- relevant code block should be split into several functions and maybe merged to a different code spot
- stuff all actions into a sequence command - atm necessary split ops and deletions are pushed directly to the undo stack - for production use only one command in the edit history should be occupied
- lack of documentation
If you find unexpected, reproducable behavior, please attach test data to this ticket. (Please ignore EDT warnings that are thrown when the result of a notification is drawn from a non-gui thread. SplitWayAction should be patched to not throw any EDT, but CreateMultipolygonAction still has some places that seem to wrongly use EDT.)
Greetings
Attachments (1)
Change History (3)
by , 10 years ago
Attachment: | josm-7155-ease-multipolygon-handling-and-creation.patch added |
---|
comment:1 by , 10 years ago
Summary: | [patch] Ease Multipolygon-Creation and Handling if selection overlaps ways that already take part in another MP → [patch proof-of-concept] Ease Multipolygon-Creation and Handling if selection overlaps ways that already take part in another MP |
---|
comment:2 by , 6 years ago
Keywords: | multipolygon added |
---|
proof-of-concept qnd patch to make MP creation less painful