[OSM-dev] Lite OSM backend
Nick Hill
nick at nickhill.co.uk
Thu Sep 7 01:11:34 BST 2006
Jon Burgess wrote:
> I reckon a good option for the lat/lon would be a 32bit fixed point
> number. I think 2^32 data points over +-180 degrees gives a resolution
> of about 1cm across the globe (40,000 km circumference / 4 billion).
Oliver has probably thought of this, but there are substantial further
savings using offsets.
Drop the node ID, which is implied by the offset in the node file. (This
will require generating a lookup table when processing the osm file for
when making the way file).
Drop the int32 id (implied by file offset) double lat1 double lat2
double lon1 double lon2 in the segment file. Again, a lookup table will
be required to match OSM id to offset when generating the way file.
typedef struct
{
__int32 lat;
__int32 lon;
__int32 flags;
}TRG_node;
typedef struct
{
__int32 start;
__int32 end;
__int32 flags;
}TRG_seg;
More information about the dev
mailing list