Thanks Frank, the gdalbuildvrt seems to be a good option for me.
One more question.
A single deted file level 1 takes almost 6 seconds to be loaded here, since I'm
worried about processing time I was thinking about generate and save Gtiff's of
all my dted files and work direct with them instead of loading deted files.
I've made a simple test here with dted level 0 (I'm having problems to save
gtiffs from dted's level 1) and it seems to be much faster. Is it a good way to
improve processing time? do you have any other idea?
And here is the code to creates tiffs which works for dted level 0, but dont
for dted level 1, It compiles, but breaks and and points an internal error in
"xstring" code, if does someone see what is wrong, pls let me know.
...
GDALDataset *poDataset;
GDALAllRegister();
poDataset = (GDALDataset *) GDALOpen( "s20.dt1", GA_ReadOnly );
...
GDALDataset *poDstDS;
poDstDS = poDriver->CreateCopy( "output.tif", poDataset, FALSE,
NULL, NULL, NULL );
GDALClose(poDstDS);
...
Thanks
Ricardo Rodrigues
Brazil
> Date: Mon, 22 Feb 2010 08:14:49 -0500
> From: [email protected]
> To: [email protected]
> CC: [email protected]
> Subject: Re: [gdal-dev] Loading various DTED files in a single block
>
> Ricardo Cezar Bonfim Rodrigues wrote:
> > Hi everyone,
> >
> > I'm writing a code to find highest terrain elevation in dted files.
> > I'm already reading the elevations from a dted with gdal. But there
> > are cases where the region I'm searching the highest elevation
> > contains more then one file (e.g. s20.dt1, s20.dt1 etc...). So I was
> > wondering how could I load more than one file in a single pafScanline
> > and if would be a good strategy to work with.
>
> Ricardo,
>
> There is no handy function in GDAL for searching a set of GDALDataset's
> to find out which ones overlap a particular region. So you would
> pretty much need to do this yourself. The normal way to do this
> might be to open all the files and identify which are overlapping.
> However, with special knowledge of the dted tiling scheme and naming
> convention you could likely identify the correct files without having
> to pre-open any unnecessary files.
>
> Another approach would be to treat all the DTED files as one large
> virtual image. Then you just ask for a region and it will take
> care of opening the required files. To build a virtual raster suitable
> for this purpose you can use the gdalbuildvrt program (possibly only
> available in recent versions of GDAL).
>
> > I have also read about
> > GDAL_DTED_SINGLE_BLOCK=TRUE, but where I set it? is it for a single
> > file?
>
> This only affects whether a DTED file is treated as a single block
> or with one block per column. I don't see it as being relavent to
> your purpose.
>
> Best regards,
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up | Frank Warmerdam, [email protected]
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial Programmer for Rent
>
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev