2

I'd like to style my river polygons and leave the islands as background color or a different color but I can't find a way to separate the inner relations from the main riverbank multipolygon. I've tried a bunch of k:v pairs without being able to isolate the river and I'm still new with QGIS. What is an efficient way to do this?

1 Answer 1

1

You'll have to run a separate query, but you can do it in the full Query tab of the QuickOSM window. They key thing is adding a recurse statement to the query. By doing so, we can tell the Overpass API to take our input set (a waterway=riverbank relation) and pull out any ways with the "inner" role.

Check out the Overpass API page on the OSM wiki for more details and other examples. Here's what my script looked like:

<osm-script output="json" output-config="" timeout="25">
  <query into="_" type="relation">
    <has-kv k="waterway" modv="" v="riverbank"/>
    <bbox-query s="42.724206716422" w="-87.817068099976" n="42.734987949903" e="-87.802391052246"/>
  </query>
  <recurse type="relation-way" role="inner" role-restricted="yes"/>
  <print e="" from="_" geometry="skeleton" ids="yes" limit="" mode="body" n="" order="id" s="" w=""/>
  <recurse from="_" into="_" type="down"/>
  <print e="" from="_" geometry="skeleton" ids="yes" limit="" mode="skeleton" n="" order="quadtile" s="" w=""/>
</osm-script>

And the output. The left is the basic k:v query, the right is with the additional recurse query layered over it.

enter image description here

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.