I'm trying to get an elevation profile from a geotif file ( downloaded from http://srtm.csi.cgiar.org/). I downloaded the libgeotiff library but i can's see any function that can return an elevation for given pixel/coordinate or any useful documentation/example to how to do that. Can someone help me out how to get the elevation? i want to do it in c\c++
1 Answer
if gdal can help you, you can check out my answer here. beside this there are some python codes in here. you can convert it to c++..
With gdallocationinfo, we can query the elevation at one point :
$ gdallocationinfo gmted/all075.vrt -geoloc 2 49 Report: Location: (87360P,19679L) Band 1: gmted/30N000E_20101117_gmted_bln075.vrt Value: 183
i hope it helps you...
-
gdallocationinfo was the key:D thanks for pointing me to the right direction ;) Commented Apr 22, 2013 at 12:01