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

Hello,

I am new to OSM and am trying to use Osmosis in Linux to extract an area of the UK to work with. I have used the command below as described on the web site but it comes back saying:

Argument file for task 2-bounding-box was not recognised.

My command is: osmosis --read-xml file="great-britain-latest.osm" enableDateParsing=no file=- --bounding-box top=52 left=-7 bottom=39.5 right=-1 write-xml file="WestCountry.osm"

I'm not sure what the "file=-" just before --boundary-box is for but I tried taking that out and that didn't work either. Any help would be appreciated.

Thanks

asked 18 Apr '13, 12:47

Christ0's gravatar image

Christ0
1111
accept rate: 0%


The correct invocation is (everything on one line of course):

osmosis --read-xml file="great-britain-latest.osm" enableDateParsing=no --bounding-box top=52 left=-7 bottom=39.5 right=-1 --write-xml file="WestCountry.osm"

(Note the double dash before write-xml.)

Both occurrences of file= are optional.

Your command line looks as if you downloaded and manually decompressed a Geofabrik extract. Your command will run much faster if you download the .pbf file and then instead of --read-xml use --read-pbf directly with the .pbf file you downloaded.

permanent link

answered 18 Apr '13, 13:22

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 18 Apr '13, 13:22

1

also have a look at the programs called osmfilter and osmconvert ... search the OSM wiki about them.

In some scenarios they might be faster and easier to handle than osmosis.

(18 Apr '13, 16:46) stephan75

Thanks for your help, I spotted the typo in the end and have managed to execute the command. I will try and use the other tools. It seems to take quite a long time to convert. I have a 10GB file of the UK and I am trying to extract the West Country. It has been sat there for four hours now saying:

Pipeline executing, waiting for completion.

The CPU is sat there at barely 5% useage and I can only assume that nothing is happening.

Is this correct?

Thanks

(18 Apr '13, 16:57) Christ0

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

question asked: 18 Apr '13, 12:47

question was seen: 5,490 times

last updated: 18 Apr '13, 17:17

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