Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

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?

share|improve this question
you might also try asking at the OSM forum: – neuhausr Aug 29 '11 at 14:03

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.


./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
share|improve this answer

This won't help you with reading OSM files locally, but you might try your query through the new MapQuest XAPI - I suspect it might give you back the info you need.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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