[OSM-dev] Binary OSM db
sascha-ml-gis-osm-dev at silbe.org
Fri Oct 17 20:37:48 BST 2008
On Fri, Oct 17, 2008 at 08:58:00PM +0200, Stefan de Konink wrote:
>> Node/way/relation name/ref/is_in:
>> - text files sorted by id (intended for namefinder - could be
>> into "proper" database entries similar to the way tags are handled)
> What do you actually implement here?
Example (excerpt from db.NodeName.txt => content of name=... tags on
46: Spandauer Damm
59: Dreieck Funkturm
86: Saatwinkler Damm
It's meant to be parsed and put into RAM, not accessed randomly inside
the file. For non-namefinder applications, this has to be replaced (the
text files are rather large).
For tags, I do store a \0-terminated block per element, separating key
and value by = and k/v pairs by \n, with proper escaping. There's an
index from element id -> start of tags block, but nothing else.
Feature type recognition (implemented in the bulk importer) and
extraction of other information relevant to the given application is
expected to be a preparation / precalculation step, not a runtime one.
Of course there might be applications that need efficient access via tag
name or tag value even at runtime, so a generic "OSM binary database"
implementation could also provide those indices.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 481 bytes
Desc: Digital signature
More information about the dev