2

I have a TIFF file that has 17 bands (colors). Each color corresponds to different land use land cover characteristics.

enter image description here

Additionally, I have a shapefile of a district with blocks. I want to find the area covered under all 17 colors in all blocks. I can use zonal statistics or r.report. But both of them work for a single district shapefile not for district shapefile with blocks. What can I try?

enter image description here

  • I think you mean to say that the tiff file has 17 values, not bands, because a band is an entire colour channel (think the red, green and blue channels in a typical colour image). Are these "blocks" a different shapefile than the district shapefile? It is hard to give you advice unless we can see these shapefiles with the image. – wfgeo Oct 15 at 8:35
  • Added the shape file of blocks or counties. – G.S. J Oct 15 at 8:47
  • It would be great if you can add the information returned by gdalinfo to the raster file. – Gabriel De Luca Oct 15 at 9:25
  • 1
    Make sure your coordinate system for the district shapefile with blocks is in the same coordinate system. Also that each polygon has its own unique ID. What exactly is the error that gets returned - can you post the log? – wfgeo Oct 15 at 12:05
  • Each polygon has its own unique id. Both shape files are in the same coordinate system. I don't know how to solve this problem, that's why I can't post the log here. I know that "r.report" gives me the area under each value (17 values), but how can I do the same for multiple blocks (like the above image) at the same time. – G.S. J Oct 16 at 3:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.