I am using QGIS. I have a vector layer with about 600,000 overlapping polygons, each with an assigned risk value as attribute. I want to create a raster layer which shows the total risk value at each pixel, but when I rasterise the vector it just keeps the pixel value of the polygon which is highest in the attribute table/drawing order.

Is there any way to achieve what I want without splitting every polygon into a separate layer (which seems like an impossible task)?

  • If you wish to also ask about doing this in ArcGIS Pro then please do that in a separate question.
    – PolyGeo
    Commented Nov 3, 2023 at 19:11

1 Answer 1

  1. Create a point or polygon grid with the desired resolution.

  2. Create an attribute with the number of overlapping polygons for each grid point/cell. In QGIS, use the expression array_sum (overlay_intersects ('polygon_layer',"risk_value"))

  3. Rasterize the grid, based on this attribute.

  • 1
    thanks for your response. Would this not just give me a raster of number of overlapping layers though, with risk value being lost? Commented Nov 3, 2023 at 15:15
  • Indeed! I adapted the answer to get the sum of overlapping risk_values rasterized
    – Babel
    Commented Nov 3, 2023 at 15:22
  • Thanks I believe that will work! Commented Nov 3, 2023 at 16:32
  • Unfortunately, while this answer worked on a small sample of my dataset, QGIS or my computer could not handle performing it on the whole set or even the set divided into 4. We're talking around 2.4 million grid squares and six figure intersecting polygons. Commented Nov 16, 2023 at 9:11
  • Hm, than maybe it's a general hardware ressource problem that you have a too large dataset to handle it on your system. Either try braeking up you data in smaller subsets and create a model for your workflow to run it successively for each dataset in series or try using e.g. a PostGIS database.
    – Babel
    Commented Nov 16, 2023 at 10:09

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.