[OSM-dev] HTTP OSM Server - index
Dick
dick at mrns.nl
Wed Mar 4 20:08:40 GMT 2009
<marcus.wolschon <at> googlemail.com> writes:
> What data-structure are you using for the index?
> Are you aware that such indice already exist if usingthe
> OsmBin data-format created via osmosis instead of the xml?
> http://wiki.openstreetmap.org/wiki/OSMbin%28file_format%29
Thanks, I'll take a look at OSMbin as well!
I'm using the following C structures:
struct nodetile {
int id;
short int lat;
short int lon;
};
As a temporary index to lookup to which tile(s) a certain way belongs. As this
index will grow quite large I'm not planning to distribute this file.
Instead I'm planning to publish one of the following indexes:
// for each way, estimated size: 310 MB
struct waytile {
int id;
short int minlat;
short int maxlat;
short int minlon;
short int maxlon;
}
or:
// for each tile, average way size * 8 bytes
struct waytile {
int id;
short int lat;
short int lon;
}
And finally two bz2 indexes, for node ids and way ids to a file position:
// estimated size: 300 kB
struct bz2index {
int id;
unsigned long long filepos;
};
gr
Dick
More information about the dev
mailing list