Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle emtpy role as deprecated, too #28

Open
tyrasd opened this issue Mar 27, 2017 · 10 comments
Open

handle emtpy role as deprecated, too #28

tyrasd opened this issue Mar 27, 2017 · 10 comments

Comments

@tyrasd
Copy link
Member

tyrasd commented Mar 27, 2017

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
Copy link
Collaborator

joto commented Mar 27, 2017

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
Copy link
Member Author

tyrasd commented Mar 27, 2017

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
Copy link
Member Author

tyrasd commented Mar 27, 2017

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

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

@ImreSamu
Copy link

ImreSamu commented Mar 27, 2017

@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
Copy link

sorry .. the affected % of total MPs :

@tyrasd
Copy link
Member Author

tyrasd commented Mar 27, 2017

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

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
Copy link

ImreSamu commented Mar 27, 2017

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:

  • role=outer + member nodes = 160
  • role=inner + member nodes = 157
  • role="" (empty) + member nodes = 1255 ( interpreted as an role=outer )

Side note: according the wiki:

  • "Mainly in Germany type=multipolygon has also been used instead of type=boundary for boundary relations. "

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

  • outer, inner, subarea , admin_centre , label

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
Copy link
Collaborator

joto commented Mar 27, 2017

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
Copy link

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
Copy link

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:

  • no roles at all
  • useless multipolygon relations (grouping objects or single member)
  • wrong objects (houses, streets, ...) in relation
  • role=inner, role=outer as tags for the ways

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants