I have several species range maps (as polygons) that overlap/stack. From this, I am trying to identify areas of highest biodiversity. Ideally, I'd like to create a new polygon layer, where 1 part is the area where 20 ranges overlap, part 2 is the area where 19 ranges overlap, etc.

I am using QGIS and Spatialite as my primary tools.

Thanks for any help that might be offered.

1 Answer 1


My inclination is to suggest to convert the polygons to rasters, such that each raster pixel has either value 1 (part of the polygon) or NULL (outside the polygon). THen just merge all the rasters into one. THis will give you a raster with values from 0 up to the maximum number of species ranges. This raster can be converted back to a vector polygon.

Two possible workflows:

Using GRASS:

  1. loop thru all polygons converting each to a raster with v.to.rast use=value value=1
  2. merge rasters into one with r.series method=sum
  3. convert back to vector with r.to.vect feature=area

Using gdal:

  1. loop thru all polygons and convert to raster with gdal_rasterize -init 1 (You need gdal >=1.8 to create a new raster, otherwise you must have a raster with 0 values everywhere in advance)
  2. merge rasters with gdal_merge.py
  3. convert back to vector with gdal_polygonize

HTH, Micha


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.