NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi I am absolute beguinner with java, which likely is the reason for my question. I want to generate a .map from a .osm or from a *.pbf, to then be used in Locus. Osmosis downloaded, Java RTE and JDK installed. The wiki gives the hint on the Locus page: osmosis --read-pbf "hungary.osm.pbf" --mapfile-writer file="hungary.osm.map" Hot to really execute this?

Without further help, I managed to run Osmosis with some Tasks, but not with the one to make MAP files. The following line is started from a .BAT: C:\OSM\osmosis\bin\osmosis.bat -plugin org.mapsforge.map.writer.osmosis.MapFileWriterPluginLoader --read-xml file="C:\OSM\south-africa-and-lesotho-latest.osm" --mapfile-writer file="C:\OSM\durban.map" --bounding-box top=-29.85 left=30.9 bottom=-29.9 right=31.1

It starts osmosis, loads the plugin, starts read, but then comes the following error: alt text

Please advise, what is wrong and must be changed. It can´t be too much wrong. Thanks a lot.

I assume, these are some rather basic questions, but I am trying to get this osmosis running since some hours and become desperate.

Thanks for some hints. Dieter

List item

asked 27 Apr '14, 20:05

diwe3's gravatar image

diwe3
1111
accept rate: 0%

edited 03 May '14, 13:51

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866

Just checking - you're using Windows?

(27 Apr '14, 20:32) SomeoneElse ♦

I think this looks fairly straightforward. The --bounding-box command is not receiving any input.

The osmosis options need to be applied in order as each flagged parameter is a step in a pipe. So:

  1. Read the input file & output to a pipe
  2. Read an input pipe, clip the boundaries to a given bbox, output to a pipe
  3. Read an input pipe, write to an output file in a given format

When I first used Osmosis I often actually used to run each step separately, saving the intermediate result as file until I got used to the need to manage process order. You can name piped input & output , but this tends to make the osmosis command line even more unwieldy.

So I think you command line should read:

C:\OSM\osmosis\bin\osmosis.bat -plugin org.mapsforge.map.writer.osmosis.MapFileWriterPluginLoader --read-xml file="C:\OSM\south-africa-and-lesotho-latest.osm" --bounding-box top=-29.85 left=30.9 bottom=-29.9 right=31.1 --mapfile-writer file="C:\OSM\durban.map"
permanent link

answered 03 May '14, 14:33

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×252
×48
×6
×4

question asked: 27 Apr '14, 20:05

question was seen: 10,693 times

last updated: 03 May '14, 14:33

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum