Hello.
I am trying to use osmosis into a java application (so as a lib). Unfortunately, there is no documentation whatsoever on how to do so and it is not trivial as osmosis seems to call a lot of different class layers to perform such an easy task as reading a pbf file… (it’s all abstracted behind plugin tasks so it is clearly not easy to go in for a newbee like me).
So is anyone on this forum, familiar with osmosis source code, that could help me by telling me how I can:
- read an xml or pbf file
- extract the information I want based on some tag values (for exemple, If I want to extract all ways of the type “highway” and their associated nodes, do osmosis keep a record of the nodes already parsed somewhere or do I have to read the osm file once again to extract the data for nodes associated to my highways? In the command line parametters, there is the “–used-nodes” option to do this but I couldn’t determine if in that case osmosis would read the osm file once again or if it had all the nodes already parsed recorded somewhere (in memory or in a temporary indexed file on disk)
Thanks