[gdal-dev] Question about using a specific Driver to access a file.

Frank Warmerdam warmerdam at pobox.com
Tue Mar 25 10:41:13 EDT 2008


Daniele Romagnoli wrote:
> Hi list,
> I have a question about the use of the available Drivers to get access to a
> file.
> Suppose I have built GDAL with support for JP2KAK, JP2MrSID, JP2ECW.
> Is there a way to use a desired driver to obtain a Dataset from a File
> without defining/customizing the GDAL_SKIP env variable/config option?
> I would like allow the user to know what drivers are available and let him
> decide which driver use to open a file. (gdal.GetDriverByName already let me
> know if a driver is available).
> 
> Actually, I'm working with JAVA bindings thus, probably, this capability is
> already available on GDAL and I just need to expose this with SWIG.

Daniele,

There is no convenient mechanism for doing this. The main way would be
to deregister any drivers you don't want to be used.

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    | President OSGeo, http://osgeo.org



More information about the gdal-dev mailing list