[osmosis-dev] bound/bounds element in OSM XML

Igor Podolskiy igor.podolskiy at vwi-stuttgart.de
Wed Dec 14 17:32:20 GMT 2011


Hi everybody,

>> I'm not sure of the exact history here, but I think bound existed before
>> bounds.  bounds is a newer concept with different attributes that has
>> never been implemented in Osmosis.  I'm not sure what would be involved
>> in updating Osmosis to support it, but perhaps it's just a matter of
>> updating the XML tasks to use the different element and attributes.
>
> As far as I can tell, only changes to the XML reading and writing
> functionality would be necessary. The Bound class already represents the
> bounds as 4 separate values, so I expect that other parts of the code
> using it could remain unchanged.
>
> If patches are welcome, I think I'd be able to modify the code to use
> the bounds element. Should support for reading the bound element remain
> intact for compatibility with old files?
sorry for the late reply - I already built a patch for this one, and 
once I've wrestled Git and/or Eclipse into not messing up line endings 
beyond all recognition, I'll upload it to github.

This bound/bounds business is a little more complicated than it seems, 
especially if you want to remain backwards compatible in all directions. 
The most invasive part is the origin attribute of the Bound, though. In 
OSM XML it may be empty, which wasn't allowed in the Bound class so you 
need to change it too. And there is also more or less a consensus in 
other applications (JOSM for example) that if the generator attribute is 
set on the <osm> then it should be propagated to the origin attribute of 
the <bounds> if it isn't set. And you need to update the unit tests... 
And there are two different XML readers you need to take care of... 
That's why it took longer than I thought, but now I'm almost done and 
I'll upload it today or tomorrow - just writing now to avoid duplicate 
effort.

Greetings from Stuttgart
Igor



More information about the osmosis-dev mailing list