Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
    
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 2 '12 at 18:20
add comment

1 Answer

up vote 1 down vote accepted

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

share|improve this answer
    
gdallocationinfo was the key:D thanks for pointing me to the right direction ;) –  Fulop Barna Apr 22 '13 at 12:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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