1

I have a raster layer with 100x100 pixel size that contains expected soil subsidence (calculated) and a polygon layer with smaller polygons that contains the measured data. I want to add the calculated data from my raster to each of the road segment polygons. As you can see in the image the polygons don't neatly fall into the raster pixels.

Ideally i would like the raster value that gets added to each polygon to be an average calculated over how much of the polygon area falls into each raster pixel.

enter image description here

3
  • Welcome to GIS SE. Thank you for taking the Tour. As currently structured, your Question is asking two questions, without showing any effort to solve either. Please Edit the Question to focus on one approach.
    – Vince
    Apr 12, 2022 at 11:47
  • With grid you in fact mean raster, right?
    – Babel
    Apr 12, 2022 at 13:17
  • I indeed meant raster, thank you.
    – timmer
    Apr 12, 2022 at 13:45

2 Answers 2

1

You should be able to achieve this using the Raster Statistics for Polygons Tool. Found under SAGA > Features - Features-Raster Tools.

Your calculated grid layer will be selected under Grids and your measured polygon layer will be selected for Polygons. For Method I think you will want to select [3] polygon wise (cell area weighted).

This tool will generate a new polygon file which contains your selected statistics. Make sure you tick Mean, along with any other statistics you may be interested in.

1
  • Thank you for you suggestion, unfortunately i get an error saying: "No spatial intersection between grid(s) and polygon layer". This is true for some of the polygons since i have 'no data' pixels in my raster. Filling those with dummy values does not seem to fix it however.
    – timmer
    Apr 12, 2022 at 13:52
0

I ended up using the regular "Zonal Statistics" algorithm. Turns out i made a mistake in the coordinate reference system which is why it didn't work at first.

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.