Create raster with grid cells values based on area covered by polygons

المشرف العام

Administrator
طاقم الإدارة
I have a polygon data with area covered by the forests (data is here - https://www.dropbox.com/s/zgckliydalljw6a/sp_data.zip?dl=0). I want to convert polygons to raster. The value of each grid cell should be based on the area covered by polygon. For example, if grid cell size is 100m x 100m (10000m2) and polygons covered 5000m2 of this cell - the value should be 50 (or 0.5). Below, you can find my proposed solution:

Raw data:

library('rgdal')library('raster')library('rgeos')library('maptools')sp_data
 
أعلى