5

How to return raster values based on polygon (shapefile) boundaries in QGIS?

Is this an elementary question, because I am finding it hard....... Ideally I would like a neat workflow as I am likely to repeat the task, even if it includes using GRASS.

I want to take a remote sensed raster ( Landsat ), and load it up with a shapefile containing irregular polygons and return the avg, max min of the raster values for each polygon.

Ideally I would also like to clip out the polygons as separate files for each polygon, perhaps that is another post, but probably it is a related process, which I haven't been able to tackle yet.

And is QGIS the right platform to be tackling this in? I have loaded up the RASTERCALC Plugin which does give better functionality than the default raster calculator, so have made a little progress there.

Any thoughts appreciated

1
  • Googling "zonal statistics" might turn up some leads. For a wider variety of solutions try "zonal statistics -arcview -arcgis" :-).
    – whuber
    Commented Mar 19, 2011 at 14:20

2 Answers 2

8

Currently, I don't know of such a function for QGIS.

But in GRASS there is v.rast.stats (Calculates univariate statistics from a raster map based on vector polygons and uploads statistics to new attribute columns.) - Documentation

GRASS is scriptable, so if you have to repeat this task multiple times, writing a script might save you some time.


Update:

QGIS dev version now has a new Zonal stats plugin in Raster menu

enter image description here

1

agoodle could be worth a look

1

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.