3

I have a raster file that show forest cover, very simple, where there is a green pixel there is forest. I need to count how many of this pixels fall under a certain elevation. I have the elevation already calculated and so on. I only need to relate these two features. Like, how much forest are there in different elevations. I am just starting working with QGIS, so I am sorry if the questions is too stupid.

  • Is your elevation a raster or a vector layer with polygons? Do you really want to count pixels or rather area units? – bugmenot123 May 5 '17 at 13:06
  • They are both raster layers. – TFA May 8 '17 at 11:45
2

I would reclass forest as value 1 and other pixel as NoValue. Then I would make different rasters depending on the altitude( Same value and NoValue). Then I would multiply the raster "forest" and the other rasters (1 by 1) with the raster calculator.

There likely are a lot of other techniques, but the logic stays the same. (mask X mask )

  • Hey thank you very much. I think that you probably work. – TFA May 8 '17 at 11:43

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.