[gdal-dev] GeoTiff Class Cell Counts

Seth Girvin sgirvin at gmail.com
Wed Oct 14 05:38:51 EDT 2009


Hi,

I have just started using the GDAL functions through the .NET wrapper 
written by Tamas Szekeres.

I can get statistics on my GeoTIFF which is great, but I need to get the 
count of pixels in each class in the raster.
Ideally I want to get the count by a range e.g. 123787 cells between 0 - 
0.25, 3242353 cells between 0.25-0.5. Would I need to read through all 
cells individually? I can't seem to find a way to do this using GDAL 
command line tools, so I'm not sure what function name I should be 
looking out for.
Any help much appreciated.

Seth


More information about the gdal-dev mailing list