This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Extracting nodes and ways only

1

I am looking to extract only the nodes and ways on streets in my city, I have been looking for methods to do this but I am quite new to programming and do not know where to start reading. Can somebody please point me in the right direction? Thanks very much

asked 10 Jul '12, 18:49

somedude's gravatar image

somedude
51226
accept rate: 0%


One Answer:

5

First get your just your city. If your city is one of these, then it's very easy. Otherwise see the various options on downloading data page

Then filter by highway tag. You might do this with an Osmosis tag filter

osmosis \
  --read-xml input.osm \
  --tf accept-ways highway=* \ 
  --tf reject-relations \
  --used-node \
  --write-xml output.osm

Or other filtering tools are available.

answered 11 Jul '12, 01:25

Harry%20Wood's gravatar image

Harry Wood
9.5k2588128
accept rate: 14%

(12 Jul '12, 16:55) stephan75

Source code available on GitHub .