3

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.

Kory Roberts
  • 171
  • 1
  • 6

1 Answers1

3

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

Micha
  • 15,555
  • 23
  • 29