Why not ask your question on the new OpenStreetMap Community Forum?

Hi, I am trying to filter all the types of highways from my OSM file, the command I use does filter out highways but still keeps the nodes. I have attached an image of my output, I would like to remove those nodes. The commands I have used are,

osmfilter _removeHighways.osm --drop="highway=" -o=good_ways.osm

osmfilter _removeHighways.osm --drop="highway=" --drop-nodes=highway -o=good_wayss.osm

I am new to osmfilter any help will be appreciated :)

alt text

asked 12 Nov '20, 12:08

shafi-as's gravatar image

accept rate: 0%

edited 12 Nov '20, 12:12

it deletes the ways but not the nodes of those deleted ways

(13 Nov '20, 06:27) shafi-as

the osm file i use had custom key and pair values inputted, so osmosis would give me an error about nodes not having a version error, so i was not able to filter it with osmosis. solution i found was using osmfilter to remove what you want but it left it the nodes after dropping all highways. what i done was dropped the author and version of my osm file using osm filter

osmfilter _EU.osm --drop-ways="highway=" --drop-version --ignore-dependencies -o=wgood_ways.osm

could add --drop-author but i done it on a seperate line at the time, created fake authors and version.

osmfilter wgood_ways.osm --fake-author --fake-version -o=zwgood_ways.osm

now this file was ready to use in osmosis, the command i used to drop the nodes that were left there in osmosis was:

osmosis --read-xml "D:\osmosis\bin\zwgood_ways.osm" --used-node --write-xml eust1.osm

note* if you get this error using osmosis just create version and author for the file on osmfilter

Node -5625933 does not have a version attribute as OSM 0.6 are required to have. Is this a 0.5 file?

permanent link

answered 13 Nov '20, 09:31

shafi-as's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



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:


question asked: 12 Nov '20, 12:08

question was seen: 1,840 times

last updated: 13 Nov '20, 09:35

powered by OSQA