NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the 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

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

Also try osmconvert.

permanent link

answered 22 Sep '13, 10:33

stephan75's gravatar image

stephan75
12.6k556210
accept rate: 6%

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:

×710
×341
×252

question asked: 20 Sep '13, 13:38

question was seen: 7,641 times

last updated: 22 Sep '13, 10:33

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