TransWikia.com

QGIS calculate sum of values in more raster layers

Geographic Information Systems Asked by zubro on February 22, 2021

I have cloud masks (rasters) of diferrent days (from sentinel 2a product) and I would like to calculate how many times was some area covered by clouds. My basic idea is put all layers on each other and calculate for each cell how many times value of cloud occured in this cell. Result should be a raster image with values of number of days under cloud for each cell.

How could I do that, what raster algebra should I use or should I convert rasters to vectors and made different processing ?

2 Answers

This could easily be done with the tool r.series from the GRASS GIS repository. After you start r.series, select the rasters with the cloud coverage and select the aggregation method "count". This should give you a result raster with the number of non NULL values from the time series.

Correct answer by Miron on February 22, 2021

Starting from QGIS 3.16 you can perform cell-based statistics natively using Cell Statistics tool. For your case, you can use Count statistic method to count the cloud coverage located in each raster, and the final output will give you the total number of times the value of cloud occured in this cell.

enter image description here

Answered by ahmadhanb on February 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP