2

I have a DEM of a crop canopy. It's pretty trivial in QGIS to draw a polygon and calculate the average or median height using zonal statistics. However that often underestimates the overal crop height due to averaging effects. A paper I read discusses taking the 99% centile of heights in the plot and taking the mean/median of that, which gives a much more comparable height measurement to that of a manual one.

I realise this isn't possible using zonal statistics directly, but does anyone know how I might be able to do this with existing QGIS tools and plugins (raster calculator, GRASS etc)?

e.g. calculate the 99th% height value in a plot, mask those that are below that and then calculate zonal statistics on the remaining pixels? Or is there a better way?

3
  • Convert your DEM values to a list then: stackoverflow.com/questions/2374640/…
    – GBG
    Commented Oct 25 at 15:15
  • @GBG thanks for the comment. I was hoping I could do this within QGIS using existing tools.
    – Martin
    Commented Oct 26 at 8:13
  • How about tying the WhiteboxTools for QGIS plugin? There is an ElevPercentile tool in Geomorphometric Analysis group. It calculates percentile of the data in ascending order, so you may want to remove 'less than 1%' cells.
    – Kazuhito
    Commented Oct 26 at 11:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.