Hello I'm trying to write a small android application that must be used offline. Basically i need to find a lib to access osm data offline. I've read about PBF and OBF, and think they should be appropriate. But i'm having a hard time finding a lib. I don't want to display the map or anything, i'd like to access raw data ... nodes, ways, relations ... |
The OSM wiki page has links to the protobuf code. answered 13 Mar '13, 16:50 SomeoneElse ♦ |
Osmosis can read pbf as well as osm, osm.gz and osm.bz2. I've posted example code on the forum a while ago. It's not 100% up to date but should give you a first impression how you could use it: http://forum.openstreetmap.org/viewtopic.php?pid=213212#p213212 Additional features of Osmosis include filters and other pipeline elements to e.g. trim unwanted data while you are reading it. Osmosis is most commonly used as a stand-alone command line tool, but do not let that fool you: It is a decent choice as a Java library as well. I've used it in several of my projects. However, I'm not an Android developer and do not know whether Osmosis works on Android. So take my recommendation with a grain of salt! answered 13 Mar '13, 19:36 Tordanik Hello Toranik ! Thanks for the link, i'm actually trying to build with your snippet i found when searching the forum. But i'm actually having compilation issues when including the jar files from osmosis. So far it seems like the best solution (if I can compile on android with it)
(14 Mar '13, 16:16)
ZARk
|