3
1

I'm working away at splitting large multipolygons in northern Thailand into smaller pieces so editing them becomes easier. I've made quite a bit of progress since my last questions in this area. (here and here). I must admit I have not yet tackled the multiple boundary relation problem in the second link. I understand what needs to be done but it's still too complicated. I am gaining experience though and will attempt it soon.

Now, I'm looking for a way to select and operate on one multipolygon and all of its inner polygons. There is this particular large multipolygon that I have managed to (almost) isolate from its even larger parent and I'm ready to have it stand on its own. Except that it and all its inner members are still members of that larger parent. In order to remove it from that relation and put it into its own new relation means selecting every outer member, and every inner member, removing them from the parent, step by step, and then creating a new multipolygon using all of the many outer members then subsequently adding all the inner members back into it. It seems to me that if I could isolate the whole thing in some way, maybe on its own layer, I could then do that more efficiently.

Hopefully I've explained my goal well enough to get some advice.

Thanks in advance....

asked 05 Feb '15, 01:48

AlaskaDave's gravatar image

AlaskaDave
4.0k7094142
accept rate: 12%

(05 Feb '15, 13:15) Pieren

If it is this relation, then it's easier to remove the left side outer from the existing relation and create a new multipolygon for it (easier because it has only outer ways). To make the editing job easier, you could also add temporarily on your local JOSM a dummy tag on the related ways like "bla=bla" then you can select them later with the "search" tool in JOSM (but don't forget to remove them before you upload your finished work)

(05 Feb '15, 13:18) Pieren

It's actually this one, which is a lot easier to edit because the northern part is already separate, or almost separate, after many preparatory edits:

https://www.openstreetmap.org/relation/1339894#map=10/18.9992/99.4270

You can see where my editing stopped with the one you refer to because of the multiple uses of its western edge. True, it doesn't contain any inner areas but the western edge is shared by several boundaries.

In my present case, I want to split off the northern part of the large 254 member multipolygon in the link I supplied just now, the portion north of route 120.

(06 Feb '15, 00:14) AlaskaDave

if you want to add a tag to an object, but you want to be certain that this tag won't get uploaded to the server, use something like odbl= ore created_by=. There are a few more.

Those tags are not needed anymore and JOSM will discard them before uploading modified objects.

There is also the todo list, which may be an even better idea to use, as it doesn't 'modify' the objects. An object where you add, then subsequently remove a tag, without doing anything else, will still get a new version in its history.

Polyglot

(11 Feb '15, 06:26) Polyglot

@Polyglot: I think you're suggesting a way to "mark for editing" pieces of the multipolygon I wish to split from the parent. If I"download object" and all its members, I could add a tag created_by=AlaskaDave to all those members, then select them by searching for that tag, delete them from original relation and then select again and add to a new relation. Is that what you're saying?

(12 Feb '15, 04:39) AlaskaDave

In fact it was Pieren who suggested to add temporary tags to the objects needing your attention. I merely suggested a way to make sure those temporary tags won't be able to make it into the data that gets uploaded. I'm using this trick a lot when preparing data for import/integration.

However, if you find those objects by means of a search, it's better to use JOSM's todo plugin.

Jo

(12 Feb '15, 06:37) Polyglot

Quite right. Thanks to both of you for the helpful suggestions.

I use the ToDo plugin fairly often for working on parts of a selection set. Good trick.

(12 Feb '15, 09:00) AlaskaDave
showing 5 of 7 show 2 more comments

As long as we do not want to touch the members at all we can work with incomplete data and only download the relation and its members with Download object. The rest can be done within the relation editor with the last two buttons in the middle panel

  1. Download object (relation) with check for downloading members set
  2. Open relation editor, select all members on the left side and sort them (5th button on the left)
  3. Copy/duplicate relation (second button on the top)
  4. Select members to move on the left and move selection to the right side (6th button), then delete selection (7th button)
  5. Select all remaining members on the left and move selection to the right (6th button)
  6. Change to relation editor of copy and delete all selected members (7th button)
  7. Maybe adjust tags of relation - Done
permanent link

answered 11 Feb '15, 13:52

skyper's gravatar image

skyper
11144
accept rate: 50%

edited 12 Feb '15, 12:06

4

This is what I was looking for. Thank you very much.

I will experiment with some smaller relations before attacking the one I'm interested in.

(12 Feb '15, 00:23) AlaskaDave

Forgot to mention sorting of members in advance to make it easier. Gonna adjust answer.

(12 Feb '15, 12:00) skyper

I have created an enhancement request in JOSM bugtracker. Might be good to receive an warning from validator to prevent multipolygons growing that large at all.

https://josm.openstreetmap.de/ticket/11101

For your polygon: Try adding additional ways to OSM whre you intend to split the polygon, maybe following roads. These will be new and can be added without conflict. The critical time frame to split alt reconnect the polygon will be minimized, reducing the chance of conflicts.

permanent link

answered 11 Feb '15, 04:27

Stephan%20Knauss's gravatar image

Stephan Knauss
4051310
accept rate: 0%

edited 11 Feb '15, 04:30

I always add ways to isolate before splitting. The multipolygon I'm presently working with is already isolated that way but I was looking for a method to minimize the time involved in selecting, removing the parts of that multipolygon from its parent and then collecting all those same pieces and with them creating a new, separate multipolygon.

Skyper has given me that method. Thanks for your answer and bugtracker submission.

(12 Feb '15, 04:34) AlaskaDave
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×526
×109
×38

question asked: 05 Feb '15, 01:48

question was seen: 3,885 times

last updated: 12 Feb '15, 12:06

powered by OSQA