4

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
  • Are you interested in extracting the profile using a linear feature or just the elevation at a given pixel? Do you know the start / end coordinates (GCS or PCS) of the profile?
    – Jay Laura
    Commented Dec 2, 2012 at 18:20

1 Answer 1

3

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...

1
  • gdallocationinfo was the key:D thanks for pointing me to the right direction ;) Commented Apr 22, 2013 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.