[OSM-dev] Call to mobile developers: OSM binary file format

Pol Robeys support at we-travel.co.cc
Thu Aug 7 11:35:37 BST 2008

I currently use my own implementation for my java mobile routing and navigation implementation (see we-travel.co.cc), though I would be very happy to switch to a common implementation or help develop such an implementation if this fits my needs.
Some rough high level requirements:
- data needs to be very compact, but also quickly fetchable
- data needs to be devided in manageable, self contained chunks. Some marginal data duplication is needed to keep the correct references.
- an index system is needed to quickly find any element in the data (currently about half my total data size are indexes!)
- floats are a no-no (many mobile phones don't even know what they are or are extremely poor at handling them)
- Data must be ordered,sorted and indexed to allow quick retrieval for display, lookup but also routing purposes. Some trade off need to be made here
- To make data is compact as possible, I currently store the coordinates relative to some kind of tile structure. As such, I only need 3 bytes/point.
- Node-id's would be nice to have, but are really too much of data if you want to store a full country like Germany  on a mobile phone
- Most importantly (but most complicated as well)  : in countries like the Netherlands, each route section between 2 crossings has his own way id. This is just too much for any routing engine on a mobile phone. I create a new way index based on uniquely interconnected pieces of road with a common set of attributes. I would very much appreciated if this type of logic could be applied on the actual osm data. Anybody else has the same problem ?
- Common tags need to be structured in some compact binary encoding (waytypes, roundabouts, oneway, ...)
- Must be utf8 compliant

Great initiative, hope this is going somewhere !

> Date: Thu, 7 Aug 2008 10:47:55 +0100
> From: shaun at shaunmcdonald.me.uk
> To: cbro at semperpax.com
> CC: dev at openstreetmap.org
> Subject: Re: [OSM-dev] Call to mobile developers: OSM binary file format
> Chris Browet wrote:
> >
> >
> >     Do you think about floating-point or fixed-point
> >     coordinates?
> >
> >
> > This is one of the things to discuss. For mobile applications, 
> > fixed-point is the most efficient but we have to balance this with the 
> > loss of precision.
> Actually the OSM db stores the node's lat and lon as integers. There is 
> a scaling factor of 10000000 done on the fly when you read and write notes.
> http://trac.openstreetmap.org/browser/sites/rails_port/lib/geo_record.rb#L22
> Shaun
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev

Ontdek de snelste manier van communiceren!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20080807/c72f42f4/attachment.html>

More information about the dev mailing list