Generate random data

 

DSpGMIdentity: DSpGMCreateRandomBand

In this operation a new band is added to a raster, and every pixel is assigned a random value. The newly added band is of type dspRasterBandContinuous and has a default NULL value. The band must be of type dspUInt32 or dspFloat32. In the first case a random value between 0 and $7FFFFFFF is generated, in the latter case a value between 0 and 1.

 

Declaration

procedure DSpGMCreateRandomBand(const r: TDSpRaster; const token: integer;
                                datatype: TDSpDataType);

Parameter Description
r A valid raster object. It must be opened for write access.
token The access token for the raster. The token has to be generated for write access.
datatype The data type of the raster band that will be generated. The value of this parameter must be dspUInt32 or dspFloat32.


Go to SourceForge
Last modified: 6 January 2005. Page maintained by pvanlaake