Modify

Opened 10 days ago

Last modified 7 days ago

#18295 assigned enhancement

Splitting large multipolygons

Reported by: anonymous Owned by: GerdP
Priority: normal Milestone:
Component: Core Version:
Keywords: multipolygon split Cc:

Description (last modified by Don-vip)

I have tasked myself with splitting this beast into many multipolygons. The main reason is lower complexity and fewer members.

Is it possible to do this easily in JOSM?

I see that there is a plugin named RelationDisolve but no plugin for splitting relations.
---
Wish list:

  • Best: ability to automatically split into x relations (JOSM determines where to split them and generates the ways needed without crossing any inners)
  • Second best: Ability to split along selected way(s) and delete inners from the former relation and add them to the newly created relation.

Attachments (1)

sample.osm (3.3 KB) - added by GerdP 10 days ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 10 days ago by GerdP

I don't know if it helps here but there is the plugin reltoolbox which seems to support splitting multipolygons.

comment:2 Changed 10 days ago by pangoSE

This ticket was made by me for the record.

@GerdP How? I use it since a few days and I have not found a way to split. It can duplicate and "reconstruct". Dunno what the last of those does.

Last edited 10 days ago by pangoSE (previous) (diff)

Changed 10 days ago by GerdP

Attachment: sample.osm added

comment:3 Changed 10 days ago by GerdP

I've never used it before, just found a source named SplittingMultipolygons.java
The support seems rather basic. Open the attached sample.osm and select the untagged way. When you click on the "multipolygon" button in the toolbox it splits the old mp and creates a new mp, but it doesn't take care about the inners. Maybe it can do more but I don't see how.

comment:4 in reply to:  2 Changed 10 days ago by Klumbumbus

Replying to pangoSE:

It can duplicate and "reconstruct". Dunno what the last of those does.

Reconstruct means if you select a multipolygon with no inners it transforms it into a simple single closed way. That even works if the outer consists of several consecutive outer ways.

comment:5 Changed 10 days ago by Don-vip

Description: modified (diff)

comment:6 Changed 10 days ago by Don-vip

Keywords: multipolygon split added

comment:7 in reply to:  3 Changed 8 days ago by pangoSE

Replying to GerdP:

I've never used it before, just found a source named SplittingMultipolygons.java
The support seems rather basic. Open the attached sample.osm and select the untagged way. When you click on the "multipolygon" button in the toolbox it splits the old mp and creates a new mp, but it doesn't take care about the inners. Maybe it can do more but I don't see how.

Are you sure it splits the old one? I cannot reproduce (it just creates a new mp using the shortest possible outer to join with - it did not touch the existing MP at all).

I'm missing a button named split here and some kind of dialog explaining what was done e.g.:
"Multipolygon named 'x' was split along the selected way:
Existing multipolygon now contains: 5 outer, 12 inners
Newly created multipolygon contains: 3 outer, 3 inners."

comment:8 Changed 7 days ago by Zverikk

Relation Toolbox cannot split multipolygons. The action mentioned is to create a multipolygon by using parts of existing MPs. To me, the best option would be to improve "Split polygon" action from the utilsplugin2.

comment:9 Changed 7 days ago by GerdP

Owner: changed from team to GerdP
Status: newassigned

Their are probably many obstacles, but I'll try to implement something for the easy cases where the selected cutting way doesn't touch (or cross) any inner of the existing mp first. Might take a while...

comment:10 in reply to:  9 Changed 7 days ago by pangoSE

Replying to GerdP:

Their are probably many obstacles, but I'll try to implement something for the easy cases where the selected cutting way doesn't touch (or cross) any inner of the existing mp first. Might take a while...

Wonderful! Thanks in advance. The case you mention is the only I think we should support. If the cutting way crosses an inner we just throw an error "Error: The selected way crosses an inner of the multipolygon."

comment:11 Changed 7 days ago by stoecker

But usually you want cutting through inners. Splitting should be naturally, e.g. along already existing features like roads or waterways. And then you'll cut through and obsolete some inners that now become normal outers. In this case the border of the new splitted MP should flow around the inner and the inner become independent.

comment:12 Changed 7 days ago by GerdP

Yes, sure, I have that in mind. I've done a few splits of huge MP some years ago and also missed support for it.
In fact it was one reason why I started to look at the code in JOSM.

Modify Ticket

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

Add Comment


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

 
Note: See TracTickets for help on using tickets.