OJW's magic organ grinder
Jump to navigation
Jump to search
A set of scripts for turning OSM data into something usable
Download
(optional - or just start with planet.osm)
- create download filter
- download area from xapi
Process
http://svn.openstreetmap.org/applications/utils/export/osm2stuff/process.pl
- nodes,segments stored in memory, used for (todo:whatstheword)
- creates a textfile with interesting ways
- creates a textfile with interesting nodes
'interesting' means that it contains tags, where 'boring' tags like id, lat, created_by, etc. are ignored
Filter
- choose view definitions
- choose searchable items
- create object filter from union of those
- allocate type IDs to objects used
- creates new textfiles for ways and nodes
creates a textfile where each object has an enumerated type. e.g. 'highway=cycleway' => 'type 35'
Tile
- define a tilesize
- for each tile
- copy ways which intersect
- copy areas which surround or intersect
- copy nodes which are within
- (TODO: or if a specified bounding box around the node intersects?)
- creates a load of textfiles where each one contains enough data to draw the area within it
Pack
- iterate based on layer/level (to order result)
- pack into binary format
- create meta-info file
- create strings file
Code
All in http://svn.openstreetmap.org/applications/utils/export/osm2stuff/
Other similar projects
- OSM to (various databases)
- http://svn.openstreetmap.org/applications/utils/export/