0

I am working with a raster layer in QGIS, and within this layer, the raster values are as follows: 10, 11, 12, 13, 21, 22, 23, and 30. I need the number of pixel of each value in city borders. I have a vector layer for cities.

Raster layer unique values report is useful but I need a city by city statistics like zonal statistics. I thought that by splitting each value as a different raster than I can use zonal statistics. Do you know an easier method for that? And do you know how can I split the pixels with specific band values as a different raster?

1
  • 1
    You are suggesting solution to your task instead of clearly describing task. See if something similar to arcgis 'tabulate area' tool exists in qgis. 99% chance it does
    – FelixIP
    Commented Jul 11, 2023 at 23:30

1 Answer 1

2

You dont need to split your raster. Zonal Histogram will create a column for each pixel value with the pixel count.

Appends fields representing counts of each unique value from a raster layer contained within polygon features.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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