Re: [gdal-dev] Working with NED elevation data - part 2

2010-08-23 Thread Stephen Woodbridge
On 8/23/2010 3:05 PM, Even Rouault wrote: Le lundi 23 août 2010 05:28:17, Stephen Woodbridge a écrit : Even, It seems the adding: #include resolves the segv issue. Strange, I think there's no particular good reason why it worked with GTiff and not VRT. I assume you compile on a 64bit platfo

Re: [gdal-dev] Working with NED elevation data - part 2

2010-08-23 Thread Even Rouault
Le lundi 23 août 2010 05:28:17, Stephen Woodbridge a écrit : > Even, > > It seems the adding: > > #include > > resolves the segv issue. Strange, I think there's no particular good reason why it worked with GTiff and not VRT. I assume you compile on a 64bit platform and that without header the

Re: [gdal-dev] Working with NED elevation data - part 2

2010-08-23 Thread Brent Fraser
Steve, Excellent info! I had been contemplating using GDAL's VRT format to create an elevation web service so I could display X,Y and Z on mouse moves in web mapping, but was unsure about the performance. Looks like fcgi could work. FYI, I think I'll use Google's XML format (http://co

Re: [gdal-dev] Working with NED elevation data - part 2

2010-08-22 Thread Stephen Woodbridge
Even, It seems the adding: #include resolves the segv issue. I would recommend changing the example in: http://www.gdal.org/gdal_tutorial.html To include that in the section "Reading Raster Data" because the example C code uses CPLMalloc(). It would also be very helpful to add: ... CPLFr

Re: [gdal-dev] Working with NED elevation data - part 2

2010-08-22 Thread Even Rouault
Stephen, at first sight, I don't see anything wrong with your code. You need to include "cpl_conv.h" for CPLMalloc(). And memory allocated with CPLMalloc() should be freed with CPLFree(). The doc is there : http://gdal.org/cpl__conv_8h.html (http://gdal.org/ -> API reference documentation ->

Re: [gdal-dev] Working with NED elevation data - part 2

2010-08-21 Thread Stephen Woodbridge
OK, well may to answer my own question by reading the GDAL API Tutorial and taking a guess at some parts I came up with the following. This is basically just a copy of the tutorial and at the end I added some code that I'm hoping reads the correct pixel for my lat,lon and prints out the elevati

Re: [gdal-dev] Working with NED elevation data - part 2

2010-08-21 Thread Chaitanya kumar CH
Stephen, Refer to http://www.gdal.org/gdal_tutorial.html for help in opening the vrt dataset using gdal. Use the transformation coefficients from GDALGetGeoTransform() to translate between lat/long and line/pixel. http://www.gdal.org/classGDALDataset.html On Sun, Aug 22, 2010 at 3:37 AM, Stephen

[gdal-dev] Working with NED elevation data - part 2

2010-08-21 Thread Stephen Woodbridge
So I have been able to download the NED data and I have US coverage. The data is in GeoTiff and all in a single band Int16 format. I have create a ned.vrt file. So I'm interested in writing a simple program in C that I can pass a lat, lon and get the elevation. I assume I need to open the .vrt f