Successfully reported this slideshow.
Upcoming SlideShare
×

# Towards an area datatype for OSM - State of the Map 2013

680 views

Published on

*** Presented by Jochen Topf at State of the Map 2013
*** For the video of this presentation please see http://lanyrd.com/2013/sotm/scpkrr/
*** Full schedule available at http://wiki.openstreetmap.org/wiki/State_Of_The_Map_2013

OpenStreetMap currently does not have a polygon or area data type. Instead areas are usually modelled as closed ways or multipolygon relations (plus some other approaches for special cases). This diversity in solutions for essentially the same problem makes editing and using OSM data much harder than it needs to be. Especially multipolygon relations are difficult to work with and they are quite brittle, leading to a lot of broken data in OSM. The talk will show the problems we currently have when editing and using OSM data. It will describe approaches for a solution with their advantages and disadvantages and the changes necessary to the core database, editors, and applications using OSM data.

Published in: Technology, Sports
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

• Be the first to like this

### Towards an area datatype for OSM - State of the Map 2013

1. 1. Towards an Area Datatype for OSM Jochen Topf
2. 2. Fundamental Geometry Types
3. 3. Point Linestring Polygon
4. 4. Point Node Linestring Way Polygon ??
5. 5. Polygon with Holes 1 outer ring, 2 inner rings
6. 6. Multipolygon 2 outer rings, 2 inner rings
7. 7. Definition A polygon devides the surface of the planet into two regions: inside - outside
8. 8. Definition A polygon is usually described by its border. The border is a bunch of lines that never intersect. Border line direction?
9. 9. Definition A polygon is usually described by its border. The border is a bunch of lines that never intersect. Border line direction?
10. 10. Polygons in OSM: There Is More Than One Way To Do It!
11. 11. Polygon Type #1: Closed way
12. 12. Polygon Type #1: Closed way No holes Depends on tags...
13. 13. Polygon Type #1: Closed way highway=residential natural=wood Linestring or polygon or maybe both...
14. 14. Polygon Type #1: area=yes highway=pedestrian highway=pedestrian area=yes
15. 15. Polygon Type #2: Multipolygon Relation type=multipolygon
16. 16. Polygon Type #2: Multipolygon Relation type=multipolygon Can have multiple inner and outer rings.
17. 17. Polygon Type #3: Boundary Relation type=boundary
18. 18. Polygon Type #3: Boundary Relation Role: subarea ! type=boundary
19. 19. Polygon Type #4: Coastline Ways connected end-to-end. Land always on left, water always on right.
20. 20. Polygon Type #5: Riverbank waterway=riverbank
21. 21. Polygon Type #5: Riverbank waterway=riverbank
22. 22. Polygon Type #5: Riverbank waterway=riverbank
23. 23. Types of Polygons #1 Closed Ways #2 Multipolygon Relation #3 Boundary Relation #4 Coastlines #5 Riverbanks
24. 24. Problems Which polygon type to use? (lakes?, rivers?, boundaries?) What if several types are in use at the same time? Converting from one to another?
25. 25. Problems with Multipolygon Relations Tags on relation + outer ways + inner ways Broken geometries (Self-intersections, ...) Inner/outer mixups Subareas
26. 26. Broken Multipolygon Relations About 2% broken, another 2% warnings
27. 27. Polygons in OSM are... difficult to understand, diffcult to edit, difficult to use.
28. 28. Some Numbers... 110 million (closed way) polygons 90 million are buildings 72 million have 6 points or less 900,000 area=yes 750,000 natural=coastline (31 million nodes) 260,000 waterway=riverbank
29. 29. Relations 1,000,000 type=multipolygon 200,000 type=boundary For together >2 million (multi-)polygons 1,100,000 landuse/natural=* 240,000 boundary=administrative Largest multipolygon 300,000 points
30. 30. What are we going to do about it?
31. 31. A New Area Datatype
32. 32. What Should it Look Like? Referencing nodes? (Like a way?) (What about huge areas?) Referencing ways? (A bit like MP relations?) (What about small areas?) Not referencing anything, coordinates inside? (Like Simple Feature)
33. 33. Polygons are Problematic... 1. Because there are several ways to accomplish the same thing. 2. Because they are hard to edit and keep valid.
34. 34. Polygons are Problematic... 1. Because there are several ways to accomplish the same thing. → One area datatype 2. Because they are hard to edit and keep valid.
35. 35. Polygons are Problematic... 1. Because there are several ways to accomplish the same thing. → One area datatype 2. Because they are hard to edit and keep valid. → Let the computer do the checking
36. 36. Validation In the editor On the server Partial download Lightweight!? Check locally Check only changes!
37. 37. API Full download of areas not always possible! Download parts of areas in bbox + Upload changes of areas in bbox
38. 38. I think this is doable!
39. 39. *Details are left as an exercise for the reader.
40. 40. Migration 1. Add support for new area type 2. Convert some areas automatically 3. Convert rest manually 4. Remove support for old areas
41. 41. Thanks! http://wiki.osm.org/wiki/The_Future_of_Areas Jochen Topf jochen@topf.org jochentopf.com