DBaddRasterElement |
Top Previous Next |
Grid element add. With this function a new grid element is generated in a data bank in an object. This can be an element stored in the data bank, as well as a file. 1, 8 and 24 bits can be awarded pixel. With 1 and 8 bits a palette is used. The differentiation whether it concerns a file or an internal grid happens in hand of the field data. If ZERO hands over here, the file name is understood as a TIFF file. Grid elements cannot be stored in all plan kinds. This element type is ignored, for example, in DBB plans. Parametre obj (POBJECT) [IN] The new grid element is assigned to this object. typ (int) [IN] RASTER_TYP_1BPP 1 1 bit pixel. RASTER_TYP_8BPP 2 8 bits pixel RASTER_TYP_24BPP 3 24 bits pixel sizeX (long int) [IN] Width of the grid in pixels, is only used with internal grid data. sizeY (long int) [IN] Height of the grid in pixels, is only used with internal grid data. data (char *) [IN] The grid data. They are expected packed. flags (int) [IN] At the moment is defined only one Flag: RASTER_FLAG_SIZE 1 The data are fitted between (xlow, ylow) and (xhigh, yhigh). Without information this Flags corresponds 1 pixel of the issue 1 pixel of the grid file. xLow (stands in) [IN] yLow (stands in) [IN] Geo-co-ordinates of the lower, left corner of the grid xHigh (stands in) [IN] yHigh (stands in) [IN] Geo-co-ordinates of the upper, right corner of the grid palette (long int *) [IN] Pointer on a field in which the palette is stored if a format this needs. Every entry contains in lower 24 bits them Red (16-23), green (8-15) and blue values (0-7). datalen (long int) [IN] Length of the field Data in bytes. filename (char *) [IN] Name of the file if the grid from a TIFF file should be loaded. The file name must be entire. filetype (char *) [IN] Up to now always "TIF". There is an other type RDV for a grid data bank. DKY (int) [IN] Sign key. If no graphic meaning has, serves for the differentiation of the grids in an object. PaletteLen (int) [IN] Number of the entries in the palette. If no palette is given the value is ignored. If a palette is given, the length from the grid data type is calculated with value 0, with values greater 0 the value than length is taken over. Values greater than 256 generate an enlarged palette, e.g., for DEMs. Result (PRASTER_ELEMENT) [OUT] The procedure delivers either the trading of the new grid element or ZERO in case of a mistake. Declaration #include "database.h"
PRASTER_ELEMENT DLLENTRY DBaddRasterElement ( POBJECT obj, int typ, long int sizeX, long int sizeY, char * data, int flags, stand in xLow, stand in yLow, stand in xHigh, stand in yHigh, long int * palette, long int datalen, char * filename, char * filetype );
|