Let's say I have polygons A and B (green), polygon centroids (white), buffers around these centroids (blue), and a collection of points (red). I want to create a raster layer that represents the distance from each polygon cell to the closest point (red) within the polygon buffer (blue). For the raster of A, the distance should be to the closest point (red) in A's buffer region. I think I need to first rasterize the shapefile containing A and B, but I'm getting an error.

I created a basic example of this setup in QGIS.

enter image description here

  • with grass plugin you may use r.grow.distance – Elio Diaz Jan 16 '18 at 20:02
  • What did you try? I downloaded your example folder and shapefiles are located in Africa (Uganda), with EPSG:4326, and they are representing a very huge area (I guess it is a fictional example) . I could rasterize without any issues by using a resolution of 0.001 degrees. You got an error because probably high values were used for resolution with QGIS rasterize tool (default values, in meters, are 100). – xunilk Jan 17 '18 at 0:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.