1-member multipolygons

After simplifying ~98% of all 1-member multipolygons in the Netherlands to closed ways (largest changeset for reference), I am now proposing to do something similar on a global scale. My idea is to start simple with multipolygons with only type=multipolygon and one other tag. I have developed a workflow to make this change for all objects with the same tags at once.

Multipolygons of which the ways also have tags will either be verified and adjusted in the QA phase before I make any big changes or they will be completely omitted from the edit. There won’t be any loss of data, just a large scale replacement of 1-member MPs by closed ways.

Let me know what you think about this idea and if you want an explanation of my workflow.

11 Likes

Add rule: If nodes in way are greater than 1899 cut way in 2. (which of course makes it a 2 member MP). I’ve come across specimens that are borderline between 1900 and 2000 and even bigger. Or, you could exclude these and revisit them to divide manually in appropriate place.

2 Likes

That’s a good suggestion. I’m currently discussing a way to query MPs of which the ways have no tags on Discord. If you have ideas, please share them, because that will simplify my work in JOSM.

Edit: I figured out a way to omit relations of which the members have ways in JOSM.

This might be a bit more complex, but it might also be an idea to extend this to small MP’s (In size and with nodes < 1900) with multiple outers and no inners. Because in my opinion having multiple outers when its not needed only creates headaches while editing.

Multiple outers requires much more consideration to know if the ways can be merged. The case of MPs with a single untagged member is easy to handle, let’s worry about that.

8 Likes

As per my message on Discord, ways may be part of multiple relations, so merging ways without caution may foul up these other relations that have the ways as their members. So this is much more complex than it seems.

5 Likes

Interestingly I am restoring the history of many ways. See for example https://www.openstreetmap.org/way/81671384/history

Occasionally, a single member MP may be justified. E.g. a large forest where the details haven’t been mapped yet.

Why wouldn’t a closed way suffice for that?
Also, I already plan to implement @SekeRob’s suggestion.

Well, it will be converted to an MP as soon as the first hole is drawn.

2 Likes

Yes, but that shouldn’t stop anyone from mapping it as a closed way as long as there isn’t a hole.

1 Like

If you want to get an idea what this change would mean in your neighbourhood, try this: overpass turbo

Updated for ways without tags: overpass turbo

1 Like

I would exclude anything with a boundary tag in the relation.

3 Likes

Yeah, that looks a lot like the query I’m using. Note that relations of which the ways have tags will be omitted. That will look more like the following query, although I will be doing this step in JOSM:

way({{bbox}})(if: count_tags() == 0);
rel(bw)(if: count_members() == 1)["type"="multipolygon"];
out center;
2 Likes

Good idea. I’ve seen a few multipolygons with boundary tags and omitted them manually, but this can indeed be done in Overpass as well.

2 Likes
[out:json][timeout:100];

relation["type"="multipolygon"]({{bbox}})(if: count_members() == 1 && count_by_role("outer") == 1);

foreach->.x
{ 
  nwr(r.x)(if: count_tags() > 0)->.members_with_tags;
  rel(br.x)->.parent_rel;

  rel.x(if: members_with_tags.count(nwr) == 0 && parent_rel.count(nwr) == 0)->.found_rel;
  
  .found_rel out meta;
}

This finds multipolygon relations with one outer member that does not have any tags and where the multipolygon is not itself part of any other relations.

Not the first time something like this has been done it looks to me based on the Osmose graph for 1-member relations:

Screenshot_20230722_112749

Also at least two times reverted it seems…

4 Likes

@SomeoneElse Do you know if the DWG reverted these previous edits? If so, was there any particular reason for that?

I’m also curious about who did that large edit in late 2021.

1 Like

Not off the top of my head - perhaps try an overpass query looking for potentially affected items around those two times?

1 Like

I’d be looking for a needle in a haystack, especially after that large drop in late 2021.