Modify

Opened 4 years ago

Last modified 8 months 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)

josm-7155-ease-multipolygon-handling-and-creation.patch (12.6 KB) - added by cmuelle8 4 years ago.
proof-of-concept qnd patch to make MP creation less painful

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by cmuelle8

proof-of-concept qnd patch to make MP creation less painful

comment:1 Changed 4 years ago by bastiK

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 Changed 8 months ago by Don-vip

Keywords: multipolygon added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to cmuelle8
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.