[osmosis-dev] bound/bounds element in OSM XML
Tobias Knerr
osm at tobias-knerr.de
Sun Dec 11 04:00:40 GMT 2011
Hello,
I'm using Osmosis as a library for reading OSM files in OSM2World. It
works well for this task and allows me to easily support various input
formats. Recently, though, I added handling of files' bounds to
OSM2World. This worked well with .osm.pbf files, but not with .osm
files. Bounds in the latter were ignored entirely.
Looking at the Osmosis source code on GitHub, I noticed several
differences to the XML format as described on
http://wiki.openstreetmap.org/wiki/OSM_XML
The first difference is that OsmElementProcessor [1] looks for a
"bound", rather than "bounds", element.
More differences are visible in BoundElementProcessor [2], particularly
that the "origin" attribute is considered required by Osmosis, and that
Osmosis expects a "box" attribute with 4 comma-separated values, rather
than the 4 attributes "minlat", "minlon", "maxlat" and "maxlon" used in
the wiki.
My question is: Why do these differences exist? Are they intentional?
Tobias
[1]
https://github.com/brettch/osmosis/blob/master/xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/impl/OsmElementProcessor.java
[2]
https://github.com/brettch/osmosis/blob/master/xml/src/main/java/org/openstreetmap/osmosis/xml/v0_6/impl/BoundElementProcessor.java
More information about the osmosis-dev
mailing list