Hello, I want to convert a .osm file (previously downloaded) to a .map file using Osmosis and Mapforge's mapfile-writer inside an Android application. To do so, I created a new project (I am using Android Studio) I imported the osmosis-core library (using I created a class with a public void main which calls But i am getting this error :
I don't know where is the problem. Where am I wrong ? Thank you in advance, iomega11 asked 29 Apr '19, 14:44 iomega111 |
If I understand what you are doing correctly you are essentially trying to run the command line version of osmosis on Android, I'm not ruling out that you could get it to work, but the Android JVM differs in a number of ways from "standard" Java and I'm actually slightly surprised you got as far as you did. Using the various bits and pieces of osmosis as a library should however work, you just need to write the corresponding glue that joins everything together. For example I use the Osmosis's PBF reading support in Vespucci. If you are doing format conversion you will likely be rather limited in the size of OSM extracts you can convert. Maybe you should explain a bit more what you actually want to achieve. answered 29 Apr '19, 15:44 SimonPoole ♦ Hi SimonPoole, thanks for your reply. On my computer I use osmosis via this command : osmosis --read-xml mapUPS.osm --mapfile-writer file=mapUPS.map I want to convert a .osm file (previously downloaded) to a .map file using Osmosis and Mapforge's mapfile-writer. I have never heard of the Vespucci app, I will look at how osmosis is used in this app, in order to do the same with my app. Thanks a lot ! iomega111
(30 Apr '19, 07:23)
iomega111
|