[gdal-dev] Driver options in GDAL

Frank Warmerdam warmerdam at p...
Wed May 22 09:51:08 EDT 2002


Andrey Kiselev wrote:
> Frank,
> 
> I have two chained questions about GDAL and OpenEV.
> 
> 1. Is it possible to use GDAL driver options in OpenEV? For example my
> driver can return raw data or calibrated values and I want to say to OpenEV
> what kind of data I need. Band selection question also very useful. I can
> look, how it may be implemented and do it.

Andrey,

Note that currently GDAL provides no reasonably mechanism to supply options
when opening an existing dataset. The papszOptions argument currently is
only available when creating a new dataset. This makes it difficult to select
options to control access to existing datasets that might affect behaviour like
whether to apply calibration on the fly.

My off hand suggestion would be append something to the filename to mean that
the calibrated values should be returned. eg. "abc/l2a.dat" might be direct
values from the file while "abc/l2a.dat/calib" might return calibrated values.


> 2. What about special structure for the driver options handling? Driver will
> get parameters by queriyng GDALDriver class, not by processing commanline,
> all options will be known to the GDAL core when driver registered. Using
> this method driver help system may be organized. For example, I have say
> something like
> 
> gdal_translate -of GTiff HELP
> 
> and list of GeoTIFF options with descriptions will be displayed. Also
> external applications may get a list of driver supported options and
> construct a GUI widgets based on it.

This would certainly be very desirable, especially if we want to populate
a GUI with a set of controls related to the options, and do it automatically.
As far as documentation, my assumption todate has been the user should browse
the html documentation for a driver when they want more information.

We would need to determine how we want to describe the options, embed
appropriate structures in the driver, and update all the existing drivers with
file creation support.

I would also like some of the existing driver internals, such as whether a
pfnCreate or pfnCreateCopy method is available to be more transparent to C
applications. Currently this info is only available to C++ applications who
have to look directly into the GDBDriver object data members.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
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