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

Fulop Barna
  • 43
  • 1
  • 3
  • 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 Dec 02 '12 at 18:20

1 Answers1

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

urcm
  • 22,533
  • 4
  • 57
  • 109