1

From a raster resolution of 1km² we want to calculate the area that represents each pixel of the same color. The calculation must be done in QGIS.

enter image description here

Update : what parameters should I insert here: enter image description here

0
2

Your screenshot indicates that you're using a continuous raster that is simply being symbolized as discrete classes. Consider running Reclassify by table to cement those classes into the data, converting the different ranges into coded integers.

With a reclassified raster, you can easily run the Raster layer unique values report tool to obtain the information you're looking for:

reclassified raster

+-------+-------------+-------------------+
| Value | Pixel count |    Area (ft²)     |
+-------+-------------+-------------------+
|     1 |        1396 |  3454412666071.69 |
|     2 |       14581 |  36080795905437.9 |
|     3 |       26366 | 65242868448170.61 |
|     4 |         505 | 1249626358428.512 |
+-------+-------------+-------------------+

Update: Here is what my reclassification table looked like. Also, I used the Range boundaries type min < value <= max and checked the box for Use no data when no range matches value.

+-----+-----+-------+
| Min | Max | Value |
+-----+-----+-------+
|   1 |   5 |     1 |
|   5 |   8 |     2 |
|   8 |  12 |     3 |
|  12 |  20 |     4 |
+-----+-----+-------+
8
  • What values are put in the reclassification table? because I get an error when I insert it and I put the maximum and minimum for each color group on the map May 20 '19 at 19:58
  • I've added what my reclassification table looked like.
    – JoshC
    May 20 '19 at 20:04
  • Parámetros de entrada: { 'DATA_TYPE' : 5, 'INPUT_RASTER' : 'E:/modelar ramon/OK Modelos OK/50 IPSL-CM5A-LR/ip26bi50/Recortada/Modelada/a_median.asc', 'NODATA_FOR_MISSING' : False, 'NO_DATA' : -9999, 'OUTPUT' : 'TEMPORARY_OUTPUT', 'RANGE_BOUNDARIES' : 0, 'RASTER_BAND' : 1, 'TABLE' : [2.756-07,0.250,None,0.251,0.374,None,0.375,0.497,None,0.498,0.955,None] } Valor inválido para el mínimo: 2.756-07 La ejecución falló después de 0.40 segundos Cargando las capas resultantes Algoritmo 'Reclasificar por tabla' finalizado May 20 '19 at 20:09
  • How you set the values? May 20 '19 at 20:16
  • You should be able to just type into that cell.
    – JoshC
    May 20 '19 at 20:46

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.