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

Hi all, I'm using OSM filter to filter my .osm, and I want to remove each nodes besides the ones with a tag highway :

node id="120044012" lat="50.9301459" lon="1.8091746" -> I want to remove it

node id="120044014" lat="50.9295054" lon="1.8098138" -> I want to keep it
    tag k="crossing" v="uncontrolled"
    tag k="crossing_ref" v="zebra"
    tag k="highway" v="crossing"
node

I tried --keep-nodes="highway=", and --drop-nodes="highway!=" but nothing is working. How can you do that ? I'm very new to this, thank you :)

asked 15 Oct '15, 12:35

kevin_matta's gravatar image

kevin_matta
21112
accept rate: 0%


(converted a comment thread to an answer)

You need to follow the instructions on the relevant wiki page. Use

--keep= --keep-nodes=highway

If you want to also keep ways tagged with the highway tag (and use --keep-ways to that effect) then this will also add those nodes that do not have a highway tag, but are needed to construct a way with a highway tag. This can be switched off with --ignore-dependencies.

permanent link

answered 19 Oct '15, 23:04

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

1

It's working fine now, thank you again. In fact I was trying to get nodes about highway and junctions between highway, so I guess I don't need any dependencies.

(15 Oct '15, 15:41) kevin_matta
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:

×205
×60

question asked: 15 Oct '15, 12:35

question was seen: 4,683 times

last updated: 19 Oct '15, 23:05

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