What’s the easiest way to get a Java object representation of an OSM XML file?
I need a simple API where I have read access to all nodes and ways and their properties.
I’ve read about Osmosis, but I couldn’t figure out how to actually get the object structure in java, rather than transforming the data to some other format I have no use for
And I’ve found this little library here: osm-parser, which comes pretty close to what I am looking for, but when I had a look at the code… it just doesn’t look very mature.
Or search for the android app Osmand … it has a mapcreator program written in Java to run it on a PC … it loads raw OSM data and creates offline vector maps for use in the android app.
Yeah, I did, but I didn’t like the solution too much. The minimum dependency for this is osmosis-xml, which itself depends on osmosis-core, some apache commons librarys, stax, xerces, … which adds full 3MB in weight to my release.
Anyway, now that I’ve tried, it works like a charm, so I guess I’m gonna live with the overhead for now. Please, let me know if there is a more minimalistic solution!