2

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?

scai
  • 20,297
  • 4
  • 56
  • 72
NLAnaconda
  • 1,534
  • 3
  • 14
  • 38

1 Answers1

2

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.

scai
  • 20,297
  • 4
  • 56
  • 72
  • Thanks, I give it a shot. – NLAnaconda Aug 21 '14 at 14:49
  • I cant get it to work. I keep getting an emtpy file when it is completed – NLAnaconda Aug 22 '14 at 00:54
  • Really? I just used osmosis for the first time and tried the following call: `osmosis --read-xml file=test.xml --way-key-value keyValueList="natural.beach" --used-node --write-xml file=out.xml`. It worked almost perfectly except for including some relations. – scai Aug 22 '14 at 16:07
  • Follow-up: https://help.openstreetmap.org/questions/36083/extract-beaches-from-planet-file – scai Aug 23 '14 at 07:50