Why not ask your question on the new OpenStreetMap Community Forum?

Is there a command line tool, which will allow to cut existing osm file data and keep only all relevant data to a given bbox? Lets say we have an OSM file for a given country, I want to make it smaller and only keep some smaller bbox area as OSM data with all it relations and POIs Any help here?

Thanks to @jonathan-bennett

 bzcat downloaded.osm.bz2 | osmosis  --read-xml enableDateParsing=no file=-  --bounding-box top=49.5138 left=10.9351 bottom=49.3866 right=11.201 --write-xml file=- | bzip2 > extracted.osm.bz2

asked 20 Sep '13, 13:38

Gevork's gravatar image

accept rate: 0%

edited 20 Sep '13, 13:50

Osmosis, a command-line Java application, will do this and more.

permanent link

answered 20 Sep '13, 13:42

Jonathan%20Bennett's gravatar image

Jonathan Ben...
accept rate: 18%

Also try osmconvert.

permanent link

answered 22 Sep '13, 10:33

stephan75's gravatar image

accept rate: 6%

Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 20 Sep '13, 13:38

question was seen: 7,392 times

last updated: 22 Sep '13, 10:33

powered by OSQA