[gdal-dev] Re: Calibration in GDAL

Frank Warmerdam warmerdam at p...
Thu Aug 1 11:36:16 EDT 2002


Andrey Kiselev wrote:
> Frank,
> 
> Now I'm suggest the next scheme for implementing calibration.
> 
> class GDALCalibrationModel
> {
> public:
> 
> GDALCalibrationModel( char **papszModelDescription );
> GDALCalibrationModel( );
> CreateFromDescription( char **papszModelDescription );
> ~GDALCalibrationModel( );
> double GetCalibratedValue( int iXPos, int iYPos, double dfValue );
> CPLErr DumpToFile( const char * pszFilename );
> CPLErr ReadFromFile( const char * pszFilename ); /* ??? */
> }
> 
> Class instances will be initialized by the string list like this:
> 
> "METHOD=<method for applying calibration>" [PIXEL|ROW|COLUMN]
> "FUNCTION=<type of calibration function>" [POLY|PICEWISE_POLY|LUT]
> "COEFFS0=<list of the zero-order coefficients>" [number of coefficients
> depends from value of the METHOD field]
> "COEFFS1=<list of the first-order coefficients>"
> ...


> Only "METHOD" and "FUNCTION" keys are obligatory, number and meaning of
> other parameters depends from "FUNCTION" field. 

Andrey,

this all sounds right on.

> During the initialization
> the new metadata domain (GDAL_CALIBRATION) will be created and filled by the
> corresponding values.

File formats supporting calibration information will respond to the
GetMetadata() call for the GDAL_CALIBRATION domain. This is usually
done by overriding GetMetadata() since the internal metadata maintaining
code only supports the default domain ... perhaps we should change this.

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