GDAL and raster calibration

Frank Warmerdam warmerdam at p...
Tue Apr 23 09:30:17 EDT 2002


Andrey Kiselev wrote:
> Frank,
> 
> Is it possible to read and write calibration coeffisients when raster
> data processed with GDAL? I can't find note about calibration in `Data
> Model' section of docs. What a best method for this purpose?
> Calibration is important thing and can be linear and stored in two
> values (gain/intercept), poliline with several nodes, polinomial curve
> and, moreover, it can be a lookup table. It will be very good to have a
> possibility to use calibration.

Andrey,

In theory simple gain and intercept values can be returned from a band
via the GetOffset() and GetScale() methods. These are primarily intended
to map between raw pixel values and some linearly related output value with
physical meaning. A common example would be when elevation data is rendered
to 16 bit after applying some offset or scaling operation.

More general models of calibration information should be handled as metadata.
Metadata is a set of string name/value pairs. You would basically pick a
set of names for your particular calibration information and encode the
values into string values.

Within a driver, the SetMetadata() call on a GDALRasterBand or GDALDataSource
can be used to attach metadata to the object in the default domain.

Applications can then fetch the metadata with the GetMetadata() or
GetMetadataItem() calls.

If we were to formalize a model for calibration information we could pick
specific metadata names to be used for calibration information and define
their semantics in the data model documentation; however, in my experience
calibration information for different formats, sensors, and applications
tends to vary quite a bit in organization so I doubt we are ready to do that
yet.

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