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

Filtering open street data by certain fields

0

I want to filter the data for a particular .osm file by highway, name, tiger:county, tiger:zip_left and tiger:zip_right. I've tried osmfilter,but it doesn't quite seem to work the way I want it to. I used it to just filter highway=residential, but when I look at the data it brings back data where highway is not residential. Also, I want to filter where the fields for highway, name, and tiger:county are absolutely populated and either one of zip_left must be populated. Any thoughts on how to do this with osmfilter?

asked 18 Sep '12, 04:08

JMB5's gravatar image

JMB5
16334
accept rate: 0%

1

It is always helpful to show us the osmfilter call(s) you have tried so far.

(18 Sep '12, 06:37) scai ♦

One Answer:

0

You can try with osmosis. You should get the residential highways wich such a command:

osmosis --rx input.osm --tf accept-ways highway=residential --used-node --wx highway.residential.osm

answered 18 Sep '12, 08:14

NicolasDumoulin's gravatar image

NicolasDumoulin
3.3k42256
accept rate: 13%

Source code available on GitHub .