[gdal-dev] getting height from Geotiff DEM

djawahar jawahar_d at hotmail.com
Sat Jun 6 01:31:59 PDT 2015


Hi,
   I have a geotiff dem. How can I get the height information given a pixel
coordinate? I tried to get the data using
gdErr = poDataset->GetRasterBand(1)->RasterIO(
				GF_Read, 0, 0, poDataset->GetRasterXSize(), poDataset->GetRasterYSize(),
				pBits, bmi.Header.biWidth, bmi.Header.biHeight, GDT_Byte,
				1, nScanSize);

but the data is either 0 or 255.

What is the right way to do this?

Thanks & regards,

D. Jawahar



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/getting-height-from-Geotiff-DEM-tp5209506.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list