[gdal-dev] getting height from Geotiff DEM

Nicolas Cadieux nicolas.cadieux at archeotec.ca
Sat Jun 6 07:34:32 PDT 2015


Hi,

There is the " value tool plugin" that you can install.  That will give you the values when you move your mouse across  the raster. For more points, install the "point sampling tool" plugin.

Nicolas Cadieux M.Sc.
Les Entreprises Archéotec inc. 
8548, rue Saint-Denis Montréal H2P 2H2
Téléphone: 514.381.5112  Fax: 514.381.4995
www.archeotec.ca

On Jun 6, 2015 4:31 AM, djawahar <jawahar_d at hotmail.com> wrote:
>
> 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. 
> _______________________________________________ 
> gdal-dev mailing list 
> gdal-dev at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/gdal-dev 


More information about the gdal-dev mailing list