[OSM-dev] Binary OSM; the first pass encoder

Shaun McDonald shaun at shaunmcdonald.me.uk
Thu Nov 13 12:11:27 GMT 2008


OSM uses the following scaling factor:
http://trac.openstreetmap.org/browser/sites/rails_port_branches/api06/lib/geo_record.rb#L2
   SCALE = 10000000

Shaun

On 12 Nov 2008, at 05:08, Marcus Wolschon wrote:

> Hello Robert,
>
> as far as I understand it the OSM-databases store the location
> in long integers anyway. Thus there is no precision to be gained
> from using  floats. You only loose storage-space, computation-time
> and native functionality on platforms that do not have native  
> floating-
> points (like many cellphones, reflashed navigation-devices or
> all mobile J2ME java-platforms).
>
> Marcus
>
> 2008/11/12, Robert (Jamie) Munro <rjmunro at arjam.net>:
>> Floats only allow more precision as the location being considered  
>> tends
>> towards 0,0 latitude and longitude. For the general case, using an
>> integer with the same number of bits of storage will always be more
>> precise, particularly at the extremes.
>>
>> As others have said, 32 bits gives errors of less than 10mm on the
>> equator, with even greater accuracy as you move away from it. This is
>> around 1000 times more accurate than the data in OSM can be  
>> reasonably
>> recorded at with standard GPS equipment.
>>
>> Robert (Jamie) Munro
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20081113/61b4da79/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2433 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20081113/61b4da79/attachment.bin>


More information about the dev mailing list