[Gdal-dev] Creating overviews in different folder

Frank Warmerdam warmerdam at pobox.com
Tue Sep 28 09:00:38 EDT 2004


Daniel Bäck wrote:
> Hi,
> 
> I would like to be able to create external overviews in a different folder from 
 > the original file. The data might be on a shared nework drive where i don't have
 > write access and it could be very handy to be able to be able to keep the data
 > from others clean from my files.
> 
> It would be very easy to use if you could supply the overview filename to 
 > BuildOverviews and GDALOpen but that would break the binary compatibility.
> 
> GDALDefaultOverviews allready supports overviews with a different location 
 > trough the pszBasename parameter of Initialize and BuildOverviews.
> 
> Any thoughts on how to change/add the interface to support this?

Daniel,

Do you want to be able to use the overviews with the original file?  If
so, it isn't clear how GDAL is going to put the overviews and the original
file back together again.

On unix, a solution to the problem would be to create a soft link on a
filesystem you do have write permissions to, pointing to the original file.
Then gdaladdo would be able to create an external overview file in the
same directory as the soft link.

On Windows, this isn't really practical.  One relatively recent change made
in GDAL was to support building overviews for virtual files.  So on windows
you could do something like:

  gdal_translate -of VRT x:\target.tif c:\target.vrt
  gdaladdo c:\target.vrt 2 4 8 16

This should result in creating a small .vrt file that refers back to the
original .tif file.  And the overviews should be built as c:\target.vrt.ovr
and used automatically when you work with target.vrt.

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 Gdal-dev mailing list