1

I am working with .osm files and am trying to filter entities based on tags. I need to view only entities containing both source and attribution tags. I used the following to successfully filter all source tags only:

osmosis --read-xml file = "northern_ireland.osm" --way-key-value keyValueList="source" 
--used node --write-xml northern_ireland_source.osm

From another tutorial, I've noticed that I would need to use a pipe: http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.38

So I did the following:

osmosis --rx northern_ireland.osm --accept-ways source=* outPipe.0 = SOURCE

However, upon trying such code, I get a syntax error stating:

Argument does not contain a name before the '=' (i.e. name = value).

Any suggestions?

1
3

You cannot combine filter options (condition A && condition B).

What you can do is filter in two different steps - first keep only ways satisfying the source condition and then filter the first step's result using the attribution condition.

E.g.:

./bin/osmosis --rx file=ireland.osm --tf accept-ways source=* --un --wx step1.osm

./bin/osmosis --rx file=step1.osm --tf accept-ways attribution=* --un --wx result.osm
0

This won't help you with reading OSM files locally, but you might try your query through the new MapQuest XAPI - http://developer.mapquest.com/web/products/open/xapi. I suspect it might give you back the info you need.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.