0

I tried to collect beach data in a certain region. I used both overpass api and osmosis to extract beach from a pbf. Both worked. But from overpass api, i can get beach polygons (closed ways) and points (nodes), however, from osmosis, I can just get points (nodes). When I search in osmosis, I did include the ways and relations. Still, I didn't get beach polygons as i got from overpass.

Anyone may have some solutions or explanation? Many thanks!

user2146141
  • 155
  • 1
  • 14
  • Can you tell us how you are calling osmosis? – scai Sep 23 '15 at 17:15
  • Definitely, I tried both: osmosis --read-pbf file=planet-latest.osm.pbf --node-key-value keyValueList="natural.beach" --way-key-value keyValueList="natural.beach" --write-xml output.xml – user2146141 Sep 23 '15 at 17:51

1 Answers1

0

Unfortunately osmosis doesn't support using --node-key-value and --way-key-value together. You have to make multiple runs and then use --merge to merge the results. See https://wiki.openstreetmap.org/wiki/Osmosis for examples.

scai
  • 20,297
  • 4
  • 56
  • 72
  • Many thanks, In this case, osmosis --read-xml file="XXX" -tag-filter accept-nodes keyValueList="natural.beach" --tag-filter accept-ways keyValueList="natural.beach" --write-xml file="XXX.osm" probably doesn't work either because I try to get node and way together at one time, right ? Many thanks! – user2146141 Sep 23 '15 at 18:26
  • I guess so. Unfortunately I have very little experience with osmosis. – scai Sep 23 '15 at 20:08