Hi Guys,
I'm new to mapsforge development. Currently i'm trying to use mapsforge-writer plugin for Osmosis to generate .map from .osm file produced from ESRI shape file .shp.
Conversion process that I tried:
1. .SHP file imported to Merkaartor 0.18.1
2. .OSM file exported from Merkaartor 0.18.1 (from .SHP imported in 1.)
3. Sort operation by osmosis-0.40.1 with command: osmosis --rx file="d:\bounds.osm" --sort --wx file="d:\bounds_sorted"
4. Converted to .map file osmosis --read-xml file="d:\bounds_sorted.osm" --mw file="d:\bounds_sorted.map" bbox=51.69529,19.33785,51.84618,19.62886
Output from Osmosis is as follows:
osmosis --read-xml file="d:\bounds_sorted.osm" --mw file="d:\bounds_sorted.map" bbox=51.69529,19.33785,51.84618,19.62886
mar 12, 2013 9:45:44 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.40.1
mar 12, 2013 9:45:44 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
mar 12, 2013 9:45:44 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init
>
INFO: mapfile-writer version: mapsforge-map-writer-0.3.0
mar 12, 2013 9:45:44 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask <init
>
INFO: mapfile format specification version: 3
mar 12, 2013 9:45:44 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
mar 12, 2013 9:45:44 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
mar 12, 2013 9:45:45 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask proce
ss
INFO: start reading data...
mar 12, 2013 9:45:45 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask compl
ete
INFO: completing read...
mar 12, 2013 9:45:45 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask compl
ete
INFO: start writing file...
mar 12, 2013 9:45:45 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask compl
ete
INFO: overwriting file d:\bounds_sorted.map
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.MapFileWriter writeSubfile
INFO: written 100% of sub file for zoom interval index 0
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.MapFileWriter writeSubfile
INFO: written 100% of sub file for zoom interval index 1
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.MapFileWriter writeSubfile
INFO: written 10.0% of sub file for zoom interval index 2
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.MapFileWriter writeSubfile
INFO: written 20.0% of sub file for zoom interval index 2
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.MapFileWriter writeSubfile
INFO: written 30.0% of sub file for zoom interval index 2
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.MapFileWriter writeSubfile
INFO: written 40.0% of sub file for zoom interval index 2
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.MapFileWriter writeSubfile
INFO: written 50.0% of sub file for zoom interval index 2
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.MapFileWriter writeSubfile
INFO: written 60.0% of sub file for zoom interval index 2
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.MapFileWriter writeSubfile
INFO: written 70.0% of sub file for zoom interval index 2
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.MapFileWriter writeSubfile
INFO: written 80.0% of sub file for zoom interval index 2
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.MapFileWriter writeSubfile
INFO: written 90.0% of sub file for zoom interval index 2
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.MapFileWriter writeFile
INFO: Finished writing file.
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask compl
ete
INFO: finished...
mar 12, 2013 9:45:46 AM org.mapsforge.map.writer.osmosis.MapFileWriterTask compl
ete
INFO: estimated memory consumption: 77,93MB
mar 12, 2013 9:45:46 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline complete.
mar 12, 2013 9:45:46 AM org.openstreetmap.osmosis.core.Osmosis run
INFO: Total execution time: 2655 milliseconds.
I've also tried writing .osm to .pbf format first, and with no success.
As you can see there are no problems during generation (at least not "visible" from console output). Unfortunately generated .map file seems to be corrupted - it has very small size, and after trying to display it with mapsforge there is blank white screen. I've read that this could be caused by defining wrong bounding box parameter but I think the one I pass is OK. Furthermore I’m certain that map-writer-plugin with Osmosis on my environment (Windows 7) works as I've tried to generate .map file from .osm data extracted from
openstreetmaps.org page with success.
I think that the problem is rather in my OSM file (I have no idea what) - I've included its simplified version in this post with output .map file. Can anyone please take a look at it - maybe someone will point me what I'm doing wrong? Or what is wrong with my .osm file.
Thanks in advance.