[Routing] data-structures used

Brett Henderson brett at bretth.com
Fri Jan 25 01:12:11 GMT 2008


Marcus Wolschon wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Hello everyone.
>
> What is everyone using for on-disk
> and in-memory datastructures to store
> the map locally for routing and map-rendering?
>
> I tried quite a number of ways including
> using the osmosis-schema on mysql and later
> hsqldb and currently a combination of a
> hsqldb indexing name->id and id->tilenr
> and one xml-file per tile seems to be the fastest
> I could find. (Surprising as it seems that
> this outperforms mysql with proper indice.)
>   
How are you querying against that schema?  Have you written custom 
queries to use the tile indexes?

It is the main API schema which presumably has been well optimised for 
returning small bounding boxes.  I don't currently have any special 
support in osmosis for reading bounding boxes from the databases, but it 
will be fairly straightforward to add it if I ever finish "dataset" support.

Having said all that, it wouldn't surprise me if your approach is faster 
anyway.  Do you compress the xml files, if so it is likely to be far 
more compact than many alternatives.  On option to make the on-disk 
representation smaller may be to use the serialisation support in 
osmosis which writes a binary format to disk, but if you're compressing 
it probably won't make much difference.
> I did not test any of the geodata-extensions
> for mysql and postgreSQL because I cannot
> expect an end-user to install them properly
> on his/her laptop.
>   
Yeah, same problem with osmosis.  I'm currently writing a customdb 
implementation but I'm not sure how well that will work at this point.  
It is read-only after creation so probably not suitable for your purposes.






More information about the Routing mailing list