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

Gevork
189121319
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...
8.2k1785108
accept rate: 18%

Also try osmconvert.

permanent link

answered 22 Sep '13, 10:33

stephan75's gravatar image

stephan75
12.5k453209
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

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:

×532
×312
×216

question asked: 20 Sep '13, 13:38

question was seen: 4,600 times

last updated: 22 Sep '13, 10:33

powered by OSQA