GDAL virtual raster file

Nuno Gil nunoragil at GMAIL.COM
Thu Apr 14 16:12:37 EDT 2005


Dear Frank/Listers,
There was no problem in creating the virtual files or the shape index file.
The problem now is with the overviews... Each original Landsat file is
about 300 Mb, so when MapServer is requesting each tile it is asking
for a 300 x 3 Mb file (RGB bands).
I created overviews with "gdaladdo -r average cover.vrt 5 10 50 100"
but when trying to access all of them (100 landsat images) in the
webclient it takes a lot of time. If I first zoom in (lets say the UK)
and then request the layer (Europe Landsat 5) the performance is ok.
You can take a look at
http://iceds.ge.ucl.ac.uk:8080/viewer/iceds/index.html
Could this have to do with the overviews? Perhaps not enough levels? 
Can it be also the number of tiles MapServer is requesting at the same
time (100 tiles)? Should I aggregate them first?

Thanks,
Nuno

On 4/12/05, Frank Warmerdam <fwarmerdam at gmail.com> wrote:
> On Apr 12, 2005 2:44 PM, Nuno Gil <nunoragil at gmail.com> wrote:
> > Dear Listers,
> > I have some Landsat5 images in arcinfo grid format - they are
> > separated by bands.
> > I was trying to compose the bands together without creating more files.
> > Is it possible to create a vrt GDAL virtual raster file from three
> > different grid files (one for each visible band)?
> 
> Nuno,
> 
> Yes, you can do this.  The "easiest" way would likely be to
> use gdal_translate to convert one of the files to VRT format.
> Then hand edit that .vrt file, duplicating the band data for the
> additional two bands and editing the filenames, and band index
> values accordingly.
> 
> Copying to VRT with gdal_translate is done like this:
> 
>  gdal_translate -of VRT incover out.vrt
> 
> This just makes a VRT file "linked" back to the source file, but
> with all metadata and georeferencing duplicated in the VRT.
> 
> > Is it possible afterwards to get MapServer to read it? What do I need
> > to include in my map file?
> 
> Just reference the .vrt file.
> 
> > Since I have a bunch of grids (5º x 5º) can I use something like
> > gdaltindex to create a shapefile index for the virtual files?
> 
> Yes, you should be able to run gdaltindex on the .vrt's normally.
> 
> Best regards,
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>



More information about the mapserver-users mailing list