1

in QGIS 2.18.3, Windows 10, I've got a raster file in which each color defines a type of crop. See image:

enter image description here

Each cell value represents a type of crop. What I need to do is to extract to a new file, only the cells containing a certain value (e.g., the value 24 which corresponds to the brown cells) Ultimately, the objective is to calculate the surface of each crop within a given area.

Is there any process that can help me with this analysis?

1

Taking into account that you want to calculate area per crop type:

  • Reclassify your raster using raster calculator. For example, for crop 24:

    ("your_raster" < 24)* 0 + ("your_raster" = 24)* 1

Note that * means "replace by"

  • Polygonize your raster (Raster -> Conversion -> Polygonize)

  • Use field calculator and derive the area using the $area command (the output calculation will be based your raster's CRS)

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