osmlab / fixing-polygons-in-osm

Fixing (multi)polygons in OpenStreetMap
25 stars 4 forks source link

handle emtpy role as deprecated, too #28

Open tyrasd opened 7 years ago

tyrasd commented 7 years ago

Maybe the Wrong role case should also include empty roles which are deprecated according to the wiki (since at least mid 2011):

[role=empty:] Don't use, deprecated. Tools may handle this as outer.

joto commented 7 years ago

There are currently so many empty roles that I didn't want to clog that category with those cases. Yes, they are wrong, but "not as wrong" as the other cases, so I see a lower priority for them.

tyrasd commented 7 years ago

so many empty roles

Do you know the order of magnitude of such cases (or affected % of total MPs)? In my limited personal experience, I have actually only relatively rarely seen such cases in comparison to old-style MPs (and for me, most often I saw inner ways with missing roles, like this example – which actually is a somewhat more severe error).

tyrasd commented 7 years ago

PS: here's a simple overpass query to find multipolygons with empty role members for manual fixing:

http://overpass-turbo.eu/s/nNK

ImreSamu commented 7 years ago

@tyrasd

.... so many empty roles Do you know the order of magnitude of such cases (or affected % of total MPs)?

As I see here https://taginfo.openstreetmap.org/relations showing the ["empy role"] percent and it is easy to check the exact numbers for the affected relation types, just point with a mouse to "empty role"

image

ImreSamu commented 7 years ago

sorry .. the affected % of total MPs :

tyrasd commented 7 years ago

Thx, totally didn't think about just looking it up on taginfo. :laughing:

So, in absolute numbers it's about 6 times more empty role members than members where the role is anything other than "outer", "inner", or empty.

ImreSamu commented 7 years ago

So, in absolute numbers it's about 6 times more empty role members than members where the role is anything other than "outer", "inner", or empty.

yes, many Long tail - errors :)
As I see 330 unique role types [ 330 items ] and maybe only ~5 is valid

and there are some interesting combinations:

Side note: according the wiki:

So the type=boundary roles should be accepted as a valid type=multipolygon roles:

maybe this is not as important ( related to osm2pgsql change), but good cases for OSM Changeset Analyzers , osm-compare rules for detecting similar error types as early as possible.

joto commented 7 years ago

So the type=boundary roles should be accepted as a valid type=multipolygon roles

I think we should probably re-tag those as type=boundary.

stoecker commented 7 years ago

I think we should probably re-tag those as type=boundary.

JOSM does this automatically for some years now. Hopefully not many left...

Regarding this ticket - Did you check if the number of multipolygons with empty roles as outer differs a lot from these where roles are wrong or inner is empty? I very seldom find empty roles, but I found a large number of polygons in east Europe, which have all empty roles. Maybe fixing these will reduce the number of empty outers as well?

Anyway showing the number of affected multipolygons instead of the number of affected roles would anyway be better :-)

stoecker commented 7 years ago

I fixed a lot of these in central Europe using the overpass query above and in most cases missing outer role also indicates other issues. So I agree, that role blank should be handled as error similar to any other role not outer/inner in the tests and statistics.

Most often cases: