Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
1  
you might also try asking at the OSM forum: help.openstreetmap.org –  neuhausr Aug 29 '11 at 14:03
add comment

2 Answers

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.

share|improve this answer
add comment

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
share|improve this answer
add comment

Your Answer

 
discard

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.