[osmosis-dev] Parsing the JOSM file format

Michael Zilske michael.zilske at gmail.com
Sun Aug 22 10:27:10 BST 2010


Hi,

I'm using Osmosis for extracting road networks and public transit
routes from OSM and converting them to our own file format with my own
Sink. (We do transportation research.)

We work on an API 0.6 planet extract .osm file which we sometimes open
with JOSM to manually add some tags of our own, e.g. as conversion
hints for our application. We're not checking this in, because it's of
no use to anyone else.

Now my problem is that the Osmosis FastXMLParser chokes on the .osm
files saved by JOSM, because newly added entities get neither a
"version" nor a "changeset" attribute in JOSM's interpretation of the
.osm format.

I helped myself by patching the Parser to simply ignore the fact that
these mandatory attributes aren't there. Is there a better solution to
this? Would it be an option to integrate this into Osmosis, or don't
you want to parse these "improper" files?

Cheers,
Michael



More information about the osmosis-dev mailing list