Quantcast
Channel: Getting list of intersecting layers into a field in a polygon table - Geographic Information Systems Stack Exchange
Viewing all articles
Browse latest Browse all 2

Answer by she_weeds for Getting list of intersecting layers into a field in a polygon table

$
0
0

You can try this in Field Calculator:

array_to_string(    array_foreach(        array_filter(array_remove_all(@layers, @layer),                     overlay_intersects(@element)),                 layer_property(@element,'name')),', ')

Explanation:

  1. Get a list of layers using @layers
  2. Take out the current layer from that list using array_remove_all(@layers,@layer)
  3. Filter that list with array_filter() using condition overlay_intersects() to test if any feature on each layer intersects with your current layer.
  4. Iterate through the resulting list with array_foreach() and extract the name for each layer with layer_property().
  5. Finally, convert the list (array) to text (string) using array_to_string() and your preferred delimiter.

Example (shown in label of polygon layer 'temp' - other layers include point layers but principle is the same):

enter image description here


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>