OpenStreetMap 로고 OpenStreetMap

The invalid areas of the map

PlaneMad님이 English로 2016년 6월 21일에 게시함. 최근 2016년 6월 22일에 업데이트됨.

There is some interesting research on the validity of polygons/area features mapped on OSM by Jochen Topf the creator of the osmium suite of OSM processing tools. There seems to be two major problems:

  • There exists multipolygons in OSM that have the old style tagging, with the tags on the outer way, rather than the relation
  • Polygons or multipolygons with a gemotry that is invalid, the most problematic being an unclosed area

In his usual style, there exists an in-depth explanation of the problem. Bonus is a chapter on OSM polygons and how they are rendered for GIS nerds.

Of the over 220 million (multi)polygons in OSM more than 100,000 contain mapping errors of one kind or another and about 250,000 are tagged old style with tags on the outer ways instead of on the relation making multipolygon tagging and processing much more complicated and much more expensive than it needs to be. Read more

I dug into the dump of invalid polygons and inspected it in QGIS to get an idea of the breakup of issues to see if they can be prioritized to fix:

By node count of area

There are 2500 invalid areas with over 50,000 nodes, so these are some very very large issues.

By issue type

82% of issues are role mismatches. For eg. an outer area inside an outer area, or vice versa. The next biggest issues are duplicate members or self intersection. Other issues are less than 2%.

Here is a map of all the issues. Just click on any one and you should be able to open it in JOSM for a closer look: http://osmlab.github.io/fixing-polygons-in-osm/map/

Fixing them

I tried to dig a deeper into each type of issue to understand the problem and get a sense of how it could be fixed. Feel free to explore and post your findings as well.

Role should be outer or inner

Might require manual cleanup based on context

Way Intersections

Requires manual cleanup - trivial. Requires shifting the problematic node by a small distance in the right direction to clear the error. - http://osmlab.github.io/fixing-polygons-in-osm/map/#17.64/13.05598/80.21087
screenshot 2016-06-07 19 33 40

Touching ring

Requires manual cleanup - trivial. Requires ungluing the touching node and handling like a duplicated node - http://osmlab.github.io/fixing-polygons-in-osm/map/#19.25/51.51343/-0.11559
untitled2

Relation Intersection

Requires manual cleanup - Not trivial. Needs careful modification of relation geometry and roles if multiple segments are involved. Trivial if on the same segment just like way intersection.

Inner with same tags

Could be auto cleaned - trivial. If the role is inner with the same tags as the relation, it could be considered a hole and the tag discarded.

Edits: This is not always true and it could be an error on the mappers part that would require a careful decision.

Duplicate node

Could be auto cleaned - trivial. Two nodes on the way in the exact same area. JOSM validator flags and fixes automatically.

Duplicate segment ways

Requires manual cleanup - Not trivial. There seems to be many special cases here.

Duplicate segment relations

Could be auto cleaned - trivial. Drop the duplicated member from the relation - http://osmlab.github.io/fixing-polygons-in-osm/map/#18.55/51.50511/-0.18786
screenshot 2016-06-08 17 00 51

Ring not closed

Requires manual cleanup - Not trivial. Possibly invalid, incomplete or junk data. Might need retracing, removal or adding members to incomplete relation.

Way in multiple rings

Not trivial. Might need to be remapped.

Some important features

Most of the features with issues seem to be small landuse areas. I tried to find if there was anything significant on the map that was invalid. Here are a few:

Administrative Boundaries

Notable buildings

Important parks

Natural

Open questions

  • It seems like a huge majority of the issues need to be carefully revieved by hand and cleaned up. What does a realistic approach to clean the map look like?
  • The flexibility of the current map editors allows mappers to continue to create features that dont make sense like a way tagged as a forest. Is it time for stricter validity checks on uploads?
이메일 아이콘 Bluesky 아이콘 Facebook 아이콘 LinkedIn 아이콘 마스토돈 아이콘 텔레그램 아이콘 X 아이콘

토론

2016년 6월 21일 21:03imagico님의 의견

The most important measure to reduce the number of broken multipolygons would probably be to have the standard map style not render broken MPs, at least not those with serious errors. Of course if the editors do not complain and refuse to upload and the map does not render this is very confusing and frustrating for mappers so editors would also need to be diligent. Since JOSM allows editing multipolygons without downloading them in full (and it needs to - otherwise you could not edit some of the larger MPs) this would be difficult.

The error map also nicely shows my favorite

http://osmlab.github.io/fixing-polygons-in-osm/map/#10/18.9464/32.2650

probably the most broken MP existing. Here (and in quite a few other cases as well) it is fairly pointless to actually fix all the errors since newly mapping the feature in question is not much more effort and will also improve the map. Lots of errors frequently go hand in hand with poor mapping.

2016년 6월 22일 09:11Mateusz Konieczny님의 의견

“Inner with same tags Could be auto cleaned” - I would dispute this. I encountered cases where tags from inner way should be removed and cases where entire inner way should be removed.

2016년 6월 22일 19:44JBacc1님의 의견

Hello,

Didn’t know about http://osmlab.github.io/fixing-polygons-in-osm/map/. But could you provide an «Edit in JOSM» button? If the aim is that someone clean the mess, I think such a shortcut would be more than welcome.

JB

2016년 6월 22일 20:34Alan Bragg님의 의견

This blog entry is a keeper. It will take me a while to digest, thanks for the cogent presentation.

2016년 6월 22일 21:46SomeoneElse님의 의견

You’ve said “It seems like a huge majority of the issues need to be carefully revieved by hand and cleaned up” and I think that you’re absolutely right. As Mateusz Konieczny says above, even in “straightforward” cases you need to check that any resulting tagging makes any geographical sense, even if there’s only one topological interpretation.

I’d also suggest that where a problem is fixed that it’s explained to the person who added the erroneous data in the first place what the problem is - if they don’t know that there’s a problem they’ll keep doing it.

I’d also suggest that any “fixing” changeset comments explain the problem in terms that a mapper that might have created the problem in the first place, so don’t say things like “remove self intersection of area outline” or similar.

2016년 6월 23일 00:03Warin61님의 의견

Leaving a comment in the changeset can get the wrong response… in which case I leave it a week or two for tempers to dissipate and then make further comment .. possibly in much more detail so there is no misinterpretation. I use osminspector to monitor these in ‘my’ area. http://tools.geofabrik.de/osmi/?view=multipolygon&zoom=6

2016년 6월 23일 11:11PlaneMad님의 의견

Mateusz Konieczny: Thats right, it looks like theres always going to be cases where it would be impossible to predict what was right without a deeper investigation. Have made an edit in my post.

JBacc1: If you click on any feature you will get an Open in JOSM dialog. I’ll need to make it more explicit on the map. I guess.

2016년 6월 23일 19:27JBacc1님의 의견

@PlaneMad: Can’t get it work. Trying to click on the elements, but just nothing happens. Firefox here.

2016년 6월 24일 03:32PlaneMad님의 의견

JBacc1: Just tested on Chrome and Safari, can you open a ticket with any console errors you are seeing here: https://github.com/osmlab/fixing-polygons-in-osm/issues

Or maybe a cache issues? I updated the map yesterday to fix this.

2016년 6월 24일 03:45JBacc1님의 의견

Cache problem. I did not guess you just added the fonction. By the way, how often is the data updated?

2016년 6월 24일 05:39PlaneMad님의 의견

Updating the map is a manual process from the dump Jochen is generating everyday. Have not thought about an update cycle, but can do once a week till there is demand to do it more often.

댓글을 남기려면 로그인하세요