[osmosis-dev] API 0.6 and unique keys

Brett Henderson brett at bretth.com
Wed Jan 28 10:09:26 GMT 2009


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?
> It should simplify a lot of code and be much faster for
> accessing key-values for known keys.
> e.g. looking up the "highway"-attribute of a large number
> of ways now requires you to iterate over all attributes of
> all these ways in O(m+n) time whereas we can reduce this
> to O(m) -time and even end up with much simpler code.
>   
Yeah, makes sense.

About the only complication I can think of is that tag ordering is 
currently preserved which makes it easy to validate the output of 
osmosis in unit tests.  I'd have to come up with another solution for that.
> PS:
> I just finished making T.S. compile with osmosis-head for
> api 0.6 after 2 days of coding. It introduced some bugs
> with the osmbin-fileformat-code but I still hope to get
> everything debugged and ready for the planned v1.0 -release
> in parallel to the release of api 0.6 .
> The new osmosis-plugins will have to wait until I found
> the new bugs. (Coding all the entity-creation -code in
> all the unit-tests again was a major piece of work. My
> hands hurt.)
>   
Out of curiosity, what were the main changes that took the time?

Brett





More information about the osmosis-dev mailing list