Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the GRASS plugin in QGIS. I am trying to calculate the average value of a raster dataset within a set of polygons.

I have created a new mapset and have imported both the vector and raster layers into the GRASS mapset.

I am now trying to calculate the set of statistics using the v.rast.stats tool.

It starts to run and then comes up with the error an error occurred while converting vector to raster and then 'raster map not found'.

v.rast.stats raster=secant_grass@zonalstats
line 190: 632 Segmentation fault in="$VECTORFULL"
out="${VECTOR}_$TMPNAME" layer="$GIS_OPT_LAYER" use=cat type=area
--quiet An error occurred while converting vector to raster Raster map not found  nothing removed Finished with error

Any help would be greatly appreciated.


share|improve this question
Can you provide the output of g.list rast and the full syntax of your v.rast.stats? – maning Apr 11 '12 at 1:42
when I type 'g.list' into the 'Modules list' no module appears. – Becky Apr 11 '12 at 12:16
Please post which GRASS version you use. – markusN May 18 '12 at 23:05

Use the zonal statistics plugin in QGIS - this gives you the count, sum and mean of a raster within a given polygon.

share|improve this answer

Or use the version 1.4 of the LecoS plugin for QGIS, if zonal statistics and GRASS fail you. You can find the plugin via the downloader, but you must have the scientific library "Scipy" installed.

See an example use-case on my blog,which deals with exactly your problem. Hope it helps :-)

share|improve this answer

Your Answer


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.