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

Re: [gdal-dev] ogrinfo segmentation fault

2010-08-21 Thread Chaitanya kumar CH
Bryn, Segfault is a serious problem. Please provide a small sample dataset that shows this problem so the problem can be identified. On Sun, Aug 22, 2010 at 5:06 AM, Bryn Roberts wrote: > Hi Chaitanya, > > Thanks for getting back to me. > I've modified my system to use the debian testing packag

Re: [gdal-dev] Create copy without any bands

2010-08-21 Thread Tim Keitt
On Sun, Aug 22, 2010 at 1:21 AM, Tim Keitt wrote: > On Sat, Aug 21, 2010 at 7:41 PM, Frank Warmerdam wrote: >> Tim Keitt wrote: >>> >>> How about: >> >> Tim, >> >> I don't really like!  I think instead it would be better to have >> a method/function to copy a variety of types of metadata - possib

Re: [gdal-dev] Create copy without any bands

2010-08-21 Thread Tim Keitt
On Sat, Aug 21, 2010 at 7:41 PM, Frank Warmerdam wrote: > Tim Keitt wrote: >> >> How about: > > Tim, > > I don't really like!  I think instead it would be better to have > a method/function to copy a variety of types of metadata - possibly > taking some flags to control what should be copied.  Per

[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

Re: [gdal-dev] Create copy without any bands

2010-08-21 Thread Frank Warmerdam
Tim Keitt wrote: How about: Tim, I don't really like! I think instead it would be better to have a method/function to copy a variety of types of metadata - possibly taking some flags to control what should be copied. Perhaps something that works similar to the GDALPamDataset::CloneInfo() and

Re: [gdal-dev] Create copy without any bands

2010-08-21 Thread Tim Keitt
Oops. This would have to be made a non-member function so a different driver could be specified. THK On Sat, Aug 21, 2010 at 7:24 PM, Tim Keitt wrote: > How about: > > // > /*                         ShallowCopy()          

Re: [gdal-dev] Create copy without any bands

2010-08-21 Thread Tim Keitt
How about: // /* ShallowCopy()*/ // GDALDataset *GDALDriver::ShallowCopy( const char * pszFilenam

Re: [gdal-dev] Create copy without any bands

2010-08-21 Thread Tim Keitt
OK. I found the source. Yes, that is fairly straightforward to copy and modify. It seems making a copy without propagating the raster bands would be very common operation. Would it make sense to introduce a new function to GDAL? ShallowCopy? THK On Sat, Aug 21, 2010 at 7:05 PM, Tim Keitt wrote:

Re: [gdal-dev] Create copy without any bands

2010-08-21 Thread Tim Keitt
I noticed DefaultCreateCopy, but appears not to be documented. At least there is no click through link in the class reference. What does it do? How is it modified? In the driver code? THK On Sat, Aug 21, 2010 at 7:00 PM, Chaitanya kumar CH wrote: > Tim, > > You can create it easily by modifying

Re: [gdal-dev] Create copy without any bands

2010-08-21 Thread Chaitanya kumar CH
Tim, You can create it easily by modifying GDALDriver::DefaultCreateCopy() On Sat, Aug 21, 2010 at 9:51 PM, Tim Keitt wrote: > I am writing a utility that takes a raster as input and outputs a > raster with all attributes the same, except that I only want one > output band and I want to specify

[gdal-dev] Create copy without any bands

2010-08-21 Thread Tim Keitt
I am writing a utility that takes a raster as input and outputs a raster with all attributes the same, except that I only want one output band and I want to specify its type independent of the data type in the input file. Is there a function that creates a copy of a dataset (or creates a virtual da

[gdal-dev] on-the-fly TMS translation

2010-08-21 Thread Jeffrey Warren
Hello all - At OpenMapsCaucasus/JumpStart and in other places I've had trouble reconciling the standard OSGeo implementation (origin at bottom-left) of TMS which gdal2tiles.py generates, and the OSM convention (origin at top-left). There may be a simpler way to do this, but for on-the-fly transla