Hi Petr and all
I got it finally working!
For those of you who experience the same troubles as I did, here is the solution.
The issue is that osmosis is not able to handle the .osm file created by Merkaartor. I don't know if Merkaartor creates an invalid file or if osmosis is handling it the wrong way.
However, in the .osm file, the <way> element is before its referenced <node> elements - and that's not working. If the nodes are before its way, osmosis handles it correctly.
Since i have more than 100'000 ways, it was not possible to change this manually. I did the following:
1. Install JOSM and the extensions opendata and pbf https://josm.openstreetmap.de/
2. Import the shape file
3. Export as *.osm.pbf
4. Run osmosis with this parameters:
- The bbox parameter is required as the pbf file has no bounding box specified. I took the values from the .osm file created by Merkaartor.
- You have to use the .pbf format because the .osm exported from JOSM can also not be handled by osmosis. The .osm export from JOSM is still helpful to get the correct tag names.
- osmosis seems to create a v3 map. I created a v1 rendertheme to make it running in Locus.
That's it, have fun
Dominik
I got it finally working!

For those of you who experience the same troubles as I did, here is the solution.
The issue is that osmosis is not able to handle the .osm file created by Merkaartor. I don't know if Merkaartor creates an invalid file or if osmosis is handling it the wrong way.
However, in the .osm file, the <way> element is before its referenced <node> elements - and that's not working. If the nodes are before its way, osmosis handles it correctly.
Since i have more than 100'000 ways, it was not possible to change this manually. I did the following:
1. Install JOSM and the extensions opendata and pbf https://josm.openstreetmap.de/
2. Import the shape file
3. Export as *.osm.pbf
4. Run osmosis with this parameters:
Code Select
bin\osmosis.bat --read-pbf mymap.osm.pbf --mapfile-writer file=mymap.osm.map tag-conf-file=tag-mapping.xml bbox=minLat,minLon,maxLat,maxLon
- The bbox parameter is required as the pbf file has no bounding box specified. I took the values from the .osm file created by Merkaartor.
- You have to use the .pbf format because the .osm exported from JOSM can also not be handled by osmosis. The .osm export from JOSM is still helpful to get the correct tag names.
- osmosis seems to create a v3 map. I created a v1 rendertheme to make it running in Locus.
That's it, have fun
Dominik