Why not ask your question on the new 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 ♦
81.8k927181262
accept rate: 23%

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:

×700
×310

question asked: 20 Mar '15, 16:16

question was seen: 2,951 times

last updated: 20 Mar '15, 22:05

powered by OSQA