I need to calculate the values for the 25%, 50%, 75% and 90% quantile over a series of rasters (time series of ndvi values from landsat). I am exploring the r.series command in Grass GIS, but the documentation is very poor and it doesn't seem to fit my needs.

I would need to calculate out of the overall distribution of values in the 12 monthly ndvi images the indicated quantile. I just need the values, not a map.

Any idea on the matter? Anyone can actually explain me what method=quantile actually does in r.series on grass gis?


You were right, the r.series manual page was a bit lousy. I have hopefully improved it now. Comments certainly welcome.

Concerning quantiles, if you want a single, i.e. a global map value, then check

Example: Calculation of multiple elevation quantiles, results are printed and not stored as a new map:

g.region rast=elevation -p
r.quantile input=elevation percentiles=0.1,1,10,25,50,75,90,99,99.9
Computing quantiles

For an overview of options, see also http://grass.osgeo.org/grass70/manuals/topic_statistics.html

  • H MarkusN,thanks for your answer and above all thanks for improving grass gis for all of us. Sorry but, even with the new manual I still don't understand how option=quantile works. I understand that it will consider in the calculation only the pixel values that fall in the specified quantile, but how does r.series calculate the output pixel value? It is selfevident for option=average or max or stddev, but I just don't understand it for quantile. Moreover, as I need to have the distribution over a set of images(not one by one) I don't think r.univar nor r.quantile work for me. Thanks again – ciskoh Oct 10 '14 at 7:34
  • Solution found! R.univar, despite the name, can actually calculate statistics on multiple raster at ones. My bad for not checking thoroughly. Thanks markusN for answering me.. – ciskoh Oct 10 '14 at 17:42
  • As you found out, r.univar can accept multiple input maps. – markusN Oct 12 '14 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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