Re: [gdal-dev] Problem with readraster in C#

2009-12-04 Thread Tamas Szekeres
Patrik, The code you mentioned did't appear to do correct mashaling with the buffer passed to gdal. You might want to use the following readraster signature instead: public OSGeo.GDAL.CPLErr ReadRaster(int xOff, int yOff, int xSize, int ySize, short[] buffer, int buf_xSize, int buf_ySize, int pix

Re: [gdal-dev] Problem with readraster in C#

2009-11-30 Thread Tamas Szekeres
Patrik, Do you have this data available to reproduce the problem? Best regards, Tamas 2009/11/29 patsv > 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 func

[gdal-dev] Problem with readraster in C#

2009-11-29 Thread patsv
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.Y