Raster Cells

Feb 24, 2012 at 12:48 PM
Edited Feb 24, 2012 at 12:49 PM

I'm starting an adventure in this GIS and geospatialization area, so I'm a bit lost and confused.

I'm having kind of a conceptual problem here, so if someone could help me I'd thx.

I'm working with a raster image (tif) generated from ArcGis. I'm using GDAL Data extension to load into dotspatial library. The important thing is that I'll work without a GUI...it'll be a background service which will analyze the map.

So, I have the code below

IRaster raster = DataManager.DefaultDataManager.OpenRaster(@"C:\mdt.tif");


Ok, it works well...if I load this layer on a map control it fits correctly.

My question comes here: I know that to get the raster value, I just have to use this piece of code: 

raster.Value[row, column];

What I'm not being able to do is how to get data about the cell...like its bounds or extent, I mean, the coordinates of MaxX, MaxY, MinX and MinY of that particular cell...and not from whole raster image.

Is this possible to do? Or do I have to calculate it using raster Extent and raster CellWidth and CellHeight?

 

Thanks in advance,

 

Denis