openstreetmaposmosis

Extract area from OpenStreetMap


I know how to extract a node out of the OSM planet file with osmosis.

osmosis --read-pbf file=h:/poi/planet-latest.osm.pbf --node-key-value 
keyValueList="shop.chocolate" --write-xml H:/poi/todo/chocolateshop.xml

But what if I want to extract an area like a "natural.beach"? These are not "nodes" but "closed ways".

Can anyone help me to extract a "natural.beach" with OSM Planet file and Osmosis?


Solution

  • See osmosis in the OSM wiki. The page has lots of osmosis usage examples as well as an additional separate example page. For a full parameter overview see Osmosis/Detailed Usage.

    I've never used osmosis myself but it seems like you just need to specify --way-key-value keyValueList="natural.beach" --used-node instead of --node-key-value.