Skip to main content
added 179 characters in body
Source Link
Babel
  • 80.4k
  • 15
  • 97
  • 245

Use Select by expressionSelect by expression with this expression and replace region_layer with your layer name:

within ( $geometry, overlay_nearest ('region_layer', buffer($geometry,0.1))[0] ) 

The expression looks for each commune if it is completely within the nearest feature from the region_layer. For exact matches add a very small buffer around the region. This does notnot affect neighboring communes being selected, as we only select if a commune is completely within the region (not not just overlaps in the margins).

Screenshot: only those of the red polygons are selected (highlighted in yellow) that are completely within the blue polygon: enter image description here

Use Select by expression with this expression and replace region_layer with your layer name:

within ( $geometry, overlay_nearest ('region_layer', buffer($geometry,0.1))[0] ) 

The expression looks for each commune if it is completely within the nearest feature. For exact matches add a very small buffer around the region. This does not affect neighboring communes being selected, as we only select if a commune is completely within the region.

Screenshot: only those of the red polygons are selected (highlighted in yellow) that are completely within the blue polygon: enter image description here

Use Select by expression with this expression and replace region_layer with your layer name:

within ( $geometry, overlay_nearest ('region_layer', buffer($geometry,0.1))[0] ) 

The expression looks for each commune if it is completely within the nearest feature from the region_layer. For exact matches add a very small buffer around the region. This does not affect neighboring communes being selected, as we only select if a commune is completely within the region (not not just overlaps in the margins).

Screenshot: only those of the red polygons are selected (highlighted in yellow) that are completely within the blue polygon: enter image description here

Source Link
Babel
  • 80.4k
  • 15
  • 97
  • 245

Use Select by expression with this expression and replace region_layer with your layer name:

within ( $geometry, overlay_nearest ('region_layer', buffer($geometry,0.1))[0] ) 

The expression looks for each commune if it is completely within the nearest feature. For exact matches add a very small buffer around the region. This does not affect neighboring communes being selected, as we only select if a commune is completely within the region.

Screenshot: only those of the red polygons are selected (highlighted in yellow) that are completely within the blue polygon: enter image description here