One for the Friendly_Ghost - Double inner ring cleaning

This might be up the lane of @Friendly_Ghost query scripting skills, a multipolygon with 1 or more inner double rings, one to tag the inside area, e.g. landuse=farmland or meadow, and a second ring being tagless merely having the inner role for instance in a forest multipolygon relation.

Done a few and more by hand in the central 3rd of Italy, now looks fairly on this.Going by the Osmose problem selector, transferring the inside area tag(s) to the inner ring and deleting the duplicate 100% overlying ring, all seen a single object ring, some tag corrections needed like a reservoir actually being a waste water clarifier or a photovoltaic generator being solar farm plant, but other than that straight forward and actually it is not a first concern… simply transfer the tags to the inner role relation ring and delete the duplicate that was used to qualify the inner area.

If there’s no harm, just nuisance at a level 3 problem rating, same as 1 member relations, than let it be, but if it is a thorn in the side, performance wise for instance, then mechanical skills might be in order to clean this up in bulk.

The Osmose pin map with the specific problem, same as buildings on farmland is dense…, so if Casper, who loves these problems to put his teeth in and has time, or anyone else with the skills, please have a go at the ‘issue’, again, if it is an actual problem, not house cosmetics.

(Why I got on this… I touched a forest yesterday and this morning I got marked by the top hat man with the pointing finger :O).


Hi SekeRob. You’ve picked an interesting type of error to work on. I remember seeing a large bunch of these when I edited some Canvec imports. That was probably the first time number of Osmose errors on my name escalated, before I even knew what Overpass was.

I’ll see what I can make of this tomorrow :slight_smile:

@SekeRob Okay, so this took me a while, and Kovoschiz would probably do a better job, but I came up with this query. You can open the data in JOSM, press shift V to run the validator and look for the “Ways with same position” warnings.

Please let me know if this method works for you.

P.s. The current query simply looks at landuse, but you can easily change that to for example natural=wood relations.

I looked at a small set of these errors, and they’re very easy to fix in JOSM with this query. You’ll still have to fix them one at a time.

Thanks for that @Friendly_Ghost, did a small cluster in the southern 3rd of Italy, 5 minutes tops, the ‘manual’ though was not what I was hoping for :O))).

Nobody has actually responded to the ‘is it a nuisance or a real problem’ query, so I’ll take it it’s not and will do a small group a day when having done too much landscape mapping and needing a bit if distraction… that is until the ‘done enough on this niche problem’ hits me.


To automate this, we would probably need an upgrade to the tools in JOSM. I don’t know how to program, so I can’t make that. We’ll just have to take care of some clusters manually and call it “good enough.”

OK, well, done a hotzone around Napoli, many completely unneeded like inner city farmland and orchards but left the relations alone to avoid any possible knock-on and added missing building within those polygons. Good deed, I’d like to think, done for today. ;O)

Thanks for your efforts, FG

ciao ciao

Since being on a roll, done Italy thru to the Straight of Messina and stumbled on more than a few “what on earth”, so it became a bigger fix session, to include a full roundabout with restrictions, the works.

Now it’s “good enough” for a little. :O)))

You’re making amazing progress! I’m glad I’ve been able to help you on your way.

What functionality do you need to automate this? Something like:

  • user selects two ways
  • JOSM checks that they have exactly the same positions, and that one is an inner member of a multipolygon relation, but doesn’t have tags, and the other has tags but is not part of any relation.
  • JOSM copies tags from first way to second and deletes first

Might be pretty easy to write a script using the scripting plugin.

That would indeed work.

For me it might as well be rocket science, so if you can do it or find someone who can, that would be helpful.

Also, I just did another manual cleanup: Changeset: 148648530 | OpenStreetMap

Try this out, let me know what you think: