Hi,<br><br><div class="gmail_quote">2009/10/14 Seth Girvin <span dir="ltr">&lt;<a href="mailto:sgirvin@gmail.com">sgirvin@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

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.<br>
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&#39;t seem to find a way to do this using GDAL command line tools, so I&#39;m not sure what function name I should be looking out for.<br>
</blockquote><div><br>I know nothing about the C# bindings, but using the python bindings, you can get a histogram, and change its bin buckets around to your satisfaction:<br>g = gdal.Open(my_fname)<br>b = g.GetRasterBand(1)<br>
h = b.GetHistogram()<br><br><br>J</div></div>