The goal is to find all waterways in Open Street Maps globally.

This is the equivalent for a random area in China in overpass turbo. Instead of doing it for this bounded area, I want to query globally.

Overpass turbo gets overloaded by a global query but I found osmosis in a related related2 question which seem to be able to get the job done.

wget -O- https://planet.openstreetmap.org/planet/planet-latest.osm.bz2 | bzcat | osmosis --rx - <filter args here> --wx my-compressed-output.osm.gz

I struggle however in translating the overpass query to the osmosis query and got lost in osmosis documentation.

How would I filter the waterways in osmosis? I think I need --way-key (--wk) or --way-key-value (--wkv) but like to check before executing a massive query.(50GB download)

Alternative solutions (non osmosis) are welcome too.

enter image description here

  • 3
    I would start with a small country extract from download.geofabrik.de before applying any filter logic to a planet size file. In addition, osmium-tool along with PBF file format are more efficient for the task at hand.
    – mmd
    Feb 3, 2018 at 17:20
  • 1
    ... or try wiki.openstreetmap.org/wiki/Osmfilter as alternative to osmosis.
    – stephan75
    Feb 14, 2018 at 20:13
  • any thoughts on the differences between osmosis and Osmfilter?
    – RutgerH
    Feb 15, 2018 at 10:40
  • "but like to check before executing a massive query.(50GB download)" I would test it on a smaller download Jul 18, 2018 at 9:12

1 Answer 1


You might wan to try

--tf accept-relations waterway=* --used-way --used-node 

or alternatively accept-ways

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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