Migel,<br><br>You have the corner coordinates. Now you need to know the pixel value at a particular position. You can calculate the pixel value from the projection coordinates using the affine transformation coordinates. You can get the these coordinates using GDALDataset::GetGeoTransform() method. Knowing the pixel/line information, you can read the pixel value using GDALDataset::RasterIO().<br>
<br>You can check out the code [1] of the gdallocationinfo utility [2].<br><br>[1]: <a href="http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdallocationinfo.cpp">http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdallocationinfo.cpp</a><br>
[2]: <a href="http://www.gdal.org/gdallocationinfo.html">http://www.gdal.org/gdallocationinfo.html</a><br><br><div class="gmail_quote">On Fri, Jul 8, 2011 at 7:15 PM, migelanjel <span dir="ltr">&lt;<a href="mailto:edarel256@gmail.com">edarel256@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello there!<br>
First let me you that i&#39;m quite new in this, so if there&#39;s anything that you<br>
may is basic, please let me know anyway, cause to me it may be the puzzle<br>
piece i&#39;m missing.<br>
<br>
So, here&#39;s what i need to do. I have a DTED file (dt2), and i&#39;m trying to<br>
get the elevation data to map it over a jpg image, and show it in the screen<br>
so i can know the elevation of the point the mouse is over in any moment.<br>
I&#39;ve loaded the DTED file, and i&#39;ve been able to read the coordinates of the<br>
corners of te raster band, but i don&#39;t if i can get the elevation data in a<br>
numeric way. I&#39;ve been reading the doc in the GDAL website but all i could<br>
find about this was &quot;How to draw the data to images&quot;.<br>
<br>
Could anyone tell me how to get the numeric elevation data?<br>
<br>
I&#39;m using the C# inteface (because i&#39;ll be using XNA to do all the drawing),<br>
but i can understand C, and a little bit of C++ too, so don&#39;t worry about<br>
that.<br>
<br>
Thanks a lot for reading this!<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/GDAL-Newbie-Get-Height-from-a-DTED-tp6562549p6562549.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/GDAL-Newbie-Get-Height-from-a-DTED-tp6562549p6562549.html</a><br>

Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>