[osmosis-dev] API 0.6 and unique keys

Jochen Topf jochen at remote.org
Wed Jan 28 08:20:23 GMT 2009


On Wed, Jan 28, 2009 at 08:29:14AM +0100, marcus.wolschon at googlemail.com wrote:
> I just learned on OSM-dev that in 0.6 you can no longer
> have more then one value for any key on an entity.
> 
> Any chance we can use this to replace the Tag-class with
> a simple read-only Hashtable in the v0_6.Entity -class?

I am not sure this is actually a win. The normal case is just two or
three tags per entity. Creating a hash table with the associated memory
overhead for so few keys is probably more expensive then the one or two
full array scans you do to get the tags out again. Of course it depends
on what you are doing. But most of what Osmosis is doing is reading in
the data and spitting it out again. Tags are not even looked at. If
you'd do a lot of filtering on tag names it might be worth it.

Jochen
-- 
Jochen Topf  jochen at remote.org  http://www.remote.org/jochen/  +49-721-388298





More information about the osmosis-dev mailing list