I would like to select the polygons of the layer below that do not intersect with any other polygon (within the same layer). How can I do this using QGIS, GRASS, SAGA or R?


2 Answers 2


Here is an attempt to do this in R. I use gIntersect and compare the layer with itself. Every polygon intersects with itself, so I then use the row sums to determine if there is only one intersect and select those.

library (rgeos)

# make some polys
data (meuse)
coordinates(meuse) <- ~x+y
polys <- gBuffer(meuse, width=70, byid=T)

intersects <-  gIntersects(polys, byid = TRUE) # check if polys intersect
polys$ints <- apply(intersects,2,sum)          # count how many TRUE intersects
polys.nooverlap <- polys[polys$ints == 1,]     # select polys with only one intersect
plot(polys.nooverlap, add=T, col="red")

(Note that the above does not take into account if polygons are completely contained within another, however those could be found with gContains.)

enter image description here


You may use v.select in GRASS GIS with "operator=disjoint" - features do not spatially intersect. Note that it requires GRASS GIS been compiled with GEOS support. Just check if "disjoint" is a supported parameter in v.select.

Edit: in case of one map only, check v.to.db and its parameter "sides". It extracts categories of areas on the left and right side of the boundary. Idea: isolated area will not have any common length. For an (un)related workflow, see http://grasswiki.osgeo.org/wiki/Vector_length_of_common_boundaries

  • Thanks @markusN. However v.select requires the user to work with two layers and I only want to select features that do not spatially intersect within the same layer. Commented Apr 15, 2014 at 9:01
  • Right - I have edited my answer for second suggestion.
    – markusN
    Commented Apr 15, 2014 at 22:11
  • Thanks markusN and cenge. I endend up changing my approach and solved the problem by working with the original polygons (those in the image are buffers) and then using gWhithinDistance to determine how many neighbour (whithin a search distance) each polygon had. Commented Apr 20, 2014 at 20:04

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.