[GIS] How to get latitude, longitude and altitude database from a GeoTIFF file

altitudeccoordinatesgeotiff-tiff

I am developing an AR iOS application. When the iPhone gets the current location, it has to calculate locally the visible point. I want to read the tiff files in my application, and then get the coordinates and altitudes from it.(locally, offline) I am looking for an open source C++ code, or something like this. Please help

Best Answer

With libtiff you can't get altitude from you file. I spent a lot of time trying to do it with libgeotiff. My advice is to install GDAL.

Example:

GDALRasterIO( hBand_ , GF_Read , p, l, 1, 1, &pafScanline, 1, 1, GDT_Float32, 0, 0 );