[OSM-dev] New OSM binary fileformat implementation.

Frederik Ramm frederik at remote.org
Sun Aug 1 23:18:42 BST 2010


Hi,

Anthony wrote:
> On Sun, Aug 1, 2010 at 6:00 PM, Stefan de Konink <stefan at konink.de> wrote:
>> If the binary format can pack our doubles (lat/lon)
> 
> lat/lon is stored as a double?  I always use an int (and
> divide/multiply by 10000000).

The binary format seems to encode them as 64-bit integers but protocol 
buffers makes sure that bits are not wasted if unused. Also, in his 
original post about the binary format, Scott explained:

> If there is a batch of consecutive nodes to be
> output that have no tags at all, I use a special dense format. I omit
> the tags and store the group 'columnwise', as an array of ID's, array
> of latitudes, and array of longitudes, and delta-encode each
> column. This reduces header overheads and allows delta-coding to work
> very effectively. With the default ~1cm granularity, nodes within
> about 6 km of each other can be represented by as few as 7 bytes
> each plus the costs of the metadata if it is included.

I hope that answers that.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"



More information about the dev mailing list