mail2vajram wrote:
I am using the following code to read pixel values. It read only one pixel
value..how to read entire row..

generally this code is used to read 0th column 1st row and return pixel
value into buffer. code: Band band = ds.GetRasterBand(1);
 double[] buffer = new double[ds.RasterXSize];
 band.ReadRaster(0, 1,1,1, buffer, 1,1, 1, 1);


but when i am using the following code i am not able to getting entire first
row values values.

Band band = ds.GetRasterBand(1);
 double[] buffer = new double[ds.RasterXSize];
band.ReadRaster(0, 1,ds.RasterXSize,1, buffer, 1, 1, 1, 1);

Can any body suggest me which parameter i need to change. Iam using C# code

Vajram,

band.ReadRaster(0,1,ds.RasterXSize,1, buffer, ds.RasterXSize, 1, 1, 1 )

Note that your yoffset (second parameter) is 1, so you are really
reading the second line.

Best regards,

--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [email protected]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to