You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
Pages: 1
#1 2011-08-29 17:03:09
- darkforest
- Member
- Registered: 2011-06-03
- Posts: 5
Binary format and grid split
Surely this has been done so many times. For rendering, I'm looking to split a large set of xml OSM data into equal sized grid and save them in a compact binary format on disk. So my needs are:
1) Split OSM data into equal sized square grid.
While nodes can be grouped into each square in the grid easily, ways and relations can span multiple squares. How best to handle?
2) Convert XML OSM data into compact binary files.
Though probably ideal, OSM_Mobile_Binary_Format doesn't seem defined or ready.
So there is OSM Binary Format or OSMBin. Which format has tools that already does 1)?
Maybe josm/osmosis already has command line tools?
Offline
#2 2011-08-30 12:07:36
- Tordanik
- Moderator

- From: Germany
- Registered: 2008-06-17
- Posts: 2,840
- Website
Re: Binary format and grid split
1) Split OSM data into equal sized square grid.
While nodes can be grouped into each square in the grid easily, ways and relations can span multiple squares. How best to handle?
I've never used a tool like that, and I'm not sure if any established solution exists. The Wiki lists some tools such as Splitter and Osmcut. But keep in mind that I have not tested them, and I don't know how they handle ways/relations spanning multiple data tiles. Unfortunately, they also don't appear to be particularly well documented.
There is also an ongoing thesis project "Segmentation of OpenStreetMap Data - Generating, Merging, and Distributing Tiles" at the University of Bremen that is related to this topic, but I assume that results are still a few months away.
2) Convert XML OSM data into compact binary files.
The only widely used compact format for OSM files I'm aware of is the .osm.pbf format.
Last edited by Tordanik (2011-08-30 12:08:29)
OSM in 3D: OSM2World
Offline
#3 2011-09-02 05:59:05
- darkforest
- Member
- Registered: 2011-06-03
- Posts: 5
Re: Binary format and grid split
Looks like osm.pbf is the most mature. Either that or I will have to design a custom format. I looked the descriptions of the splitting tools. Splitter at least seems to produce nodes where line segment crosses tile boundaries, and ways/relations will be split as well. This means it would be hard to tell that each split ways/relations actually belong to one way/relation.
Also, does there exist an open source map renderer for OpenGL devices such as iPad. Such renderer would translate .osm data into a list of triangles/quads for rendering instead of lines because thick lines are not supported in OpenGL es.
Thanks
Offline
Pages: 1