[Gdal-dev] Use of individual drivers

Kor de Jong k.dejong at geo.uu.nl
Fri Nov 11 14:10:43 EST 2005


Hi Frank,

Op vrijdag 11 november 2005 15:58, schreef Frank Warmerdam:
> On 11/11/05, Kor de Jong <k.dejong at geo.uu.nl> wrote:
> > In short, is it possible to get around the high level GDAL functions and
> > use the individual GDAL drivers directly? If not, does the design of GDAL
> > allow it to be changed to allow such use?
>
> I can imagine a couple solutions.
>
> 1) I could implement a GDALOpenWithDriver() with an
>    extra argument that is the driver that should be used (as
>    opposed to scanling the GDALDriverManager list).

This would be a pretty clean solution I guess, also because GDALOpen can use 
this function too.

> 2) You could manipulate the GDALDriverManager ensuring
>     that only the one driver at a time is registered.  That way
>     only that driver would be used by GDALOpen().

Yes, I think I can get this to work. It is a bit of a hassle to manipulate the 
manager for each format driver, but if I have to I will do it like this.

> If (2) is fine for you, then no core changes are required.  If not,
> then I would be willing to implement option 1, which I have
> occationally wished existed for other reasons.

Given your last remark I opt for (1) and I am willing to help ofcourse. As far 
as I can see this would mean creating a new function whose body is similar to 
GDALOpen, except for the looping over all drivers and making this function a 
friend of GDALDataset.

Thanks for your help Frank.

Kor

-- 
Kor de Jong, k.dejong at geo.uu.nl
Fysische Geografie, Geowetenschappen, Universiteit Utrecht




More information about the Gdal-dev mailing list