Towards an area datatype for OSM - State of the Map 2013
-
Upload
osmfstateofthemap -
Category
Technology
-
view
261 -
download
2
description
Transcript of Towards an area datatype for OSM - State of the Map 2013
![Page 1: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/1.jpg)
Towards an Area Datatypefor OSM
JochenTopf
![Page 2: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/2.jpg)
Fundamental Geometry Types
![Page 3: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/3.jpg)
Point Linestring Polygon
![Page 4: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/4.jpg)
Point Linestring Polygon
Node Way ??
![Page 5: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/5.jpg)
Polygon with Holes
1 outer ring, 2 inner rings
![Page 6: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/6.jpg)
Multipolygon
2 outer rings, 2 inner rings
![Page 7: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/7.jpg)
Definition
A polygondevides
the surface of the planetinto
two regions:
inside - outside
![Page 8: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/8.jpg)
Definition
A polygon is usually described by its border.
The border is a bunch of lines that never intersect.
Border line direction?
![Page 9: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/9.jpg)
Definition
A polygon is usually described by its border.
The border is a bunch of lines that never intersect.
Border line direction?
![Page 10: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/10.jpg)
Polygons in OSM:
There Is More Than One WayTo Do It!
![Page 11: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/11.jpg)
Polygon Type #1:Closed way
![Page 12: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/12.jpg)
Polygon Type #1:Closed way
No holesDepends on tags...
![Page 13: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/13.jpg)
Polygon Type #1:Closed way
highway=residential natural=wood
Linestring or polygon or maybe both...
![Page 14: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/14.jpg)
Polygon Type #1:area=yes
highway=pedestrian highway=pedestrian area=yes
![Page 15: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/15.jpg)
Polygon Type #2:Multipolygon Relation
type=multipolygon
![Page 16: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/16.jpg)
Polygon Type #2:Multipolygon Relation
type=multipolygon
Can have multiple inner and outer rings.
![Page 17: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/17.jpg)
Polygon Type #3:Boundary Relation
type=boundary
![Page 18: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/18.jpg)
Polygon Type #3:Boundary Relation
type=boundary
Role: subarea !
![Page 19: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/19.jpg)
Polygon Type #4:Coastline
Ways connected end-to-end.Land always on left, water always on right.
![Page 20: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/20.jpg)
Polygon Type #5:Riverbank
waterway=riverbank
![Page 21: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/21.jpg)
Polygon Type #5:Riverbank
waterway=riverbank
![Page 22: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/22.jpg)
Polygon Type #5:Riverbank
waterway=riverbank
![Page 23: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/23.jpg)
Types of Polygons
#1 Closed Ways#2 Multipolygon Relation
#3 Boundary Relation#4 Coastlines#5 Riverbanks
![Page 24: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/24.jpg)
Problems
Which polygon type to use?(lakes?, rivers?, boundaries?)
What if several typesare in use at the same time?
Converting from one to another?
![Page 25: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/25.jpg)
![Page 26: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/26.jpg)
Problems withMultipolygon Relations
Tags on relation + outer ways + inner ways
Broken geometries (Self-intersections, ...)
Inner/outer mixups
Subareas
![Page 27: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/27.jpg)
Broken Multipolygon Relations
About 2% broken, another 2% warnings
![Page 28: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/28.jpg)
Polygons in OSM are...
difficult to understand,diffcult to edit,difficult to use .
![Page 29: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/29.jpg)
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
![Page 30: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/30.jpg)
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
![Page 31: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/31.jpg)
What are we going to do about it?
![Page 32: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/32.jpg)
A NewArea
Datatype
![Page 33: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/33.jpg)
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)
![Page 34: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/34.jpg)
Polygons are Problematic...
1. Because there are several ways to accomplish the same thing.
2. Because they are hard to edit and keep valid.
![Page 35: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/35.jpg)
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.
![Page 36: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/36.jpg)
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
![Page 37: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/37.jpg)
Validation
On the serverIn the editor
Lightweight!?
Check only changes!
Partial download
Check locally
![Page 38: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/38.jpg)
API
Full download of areas not always possible!
Download parts of areas in bbox+
Upload changes of areas in bbox
![Page 39: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/39.jpg)
I think this is doable!
![Page 40: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/40.jpg)
*Details are left as an exercisefor the reader.
![Page 41: Towards an area datatype for OSM - State of the Map 2013](https://reader033.fdocuments.us/reader033/viewer/2022042815/557cb254d8b42abf328b4c89/html5/thumbnails/41.jpg)
Migration
1. Add support for new area type
2. Convert some areas automatically
3. Convert rest manually
4. Remove support for old areas