Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
    
Googling "zonal statistics" might turn up some leads. For a wider variety of solutions try "zonal statistics -arcview -arcgis" :-). –  whuber Mar 19 '11 at 14:20
add comment

2 Answers

up vote 8 down vote accepted

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

share|improve this answer
add comment

agoodle could be worth a look

share|improve this answer
    
Read hackmap.blogspot.com/2010/05/numpy-gdal-agoodle.html for a short introduction –  underdark Mar 23 '11 at 13:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.