[gdal-dev] Problem with readraster in C#
patsv
patsv at bredband.net
Sun Nov 29 03:01:14 EST 2009
Hi, I am trying to read GDEM data from the ASTER dataset.
But all I get is a buffer with zeroes, is there something wrong with my code
or is it something with the readraster function.
Part of my code:
Band band = ds.GetRasterBand(1);
short[] DEM = new short[band.XSize * band.YSize];
CPLErr Ret = band.ReadRaster(0, 0, band.XSize,band.YSize, DEM,
band.XSize, band.YSize, 2, band.XSize * 2);
if (Ret != CPLErr.CE_None)
{
throw new Exception("Read error " + Ret.ToString());
}
As mentioned above all I get is a buffer filled with Zeroes.
Thanks for a good library.
Regards
Patrik Svensson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20091129/b6c6080a/attachment.html
More information about the gdal-dev
mailing list