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

Hello, I want to export osm data from open street map. However, the file should only contain complete ways. This means, the file should not contain ways which reference nodes outside the target area.

Does somebody know how I can do this in open street map or maybe there is a tool which can eliminate ways which are not complete in an osm file.

Thanks in advance!

asked 20 Mar '15, 16:16

stteffen's gravatar image

stteffen
11112
accept rate: 0%


Exporting data through the web site will always yield complete ways. Extracting data with osmosis from a larger OSM file also offers a completeWays option. If you already have a file with some ways that reference missing nodes, the following trick

osmosis --read-pbf input.osm.pbf --bb left=-180 right=180 top=90 bottom=-90 clipIncompleteEntities=true --write-pbf output.osm.pbf

will remove all dangling references from ways.

permanent link

answered 20 Mar '15, 22:05

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

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
×315

question asked: 20 Mar '15, 16:16

question was seen: 3,416 times

last updated: 20 Mar '15, 22:05

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