RasterCS - sindizzy/DSW GitHub Wiki

Sample code that demonstrates how to open a raster and get the maximum value for the raster cells.

Be sure to install the GDAL extension if you want to view different types of files.

using DotSpatial.Data;

 private void button1_Click(object sender, EventArgs e)
 {
     IRaster r = Raster.Open(@"C:\[Your File Path](Your-File-Path)\O44121a1.bgd");
     r.GetStatistics();
     double value = r.Maximum;
 }