GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Go to the source code of this file.
Macros | |
#define | G3D_MASKNUM(map, Xmask, Ymask, Zmask, VALUEmask, TYPEmask) |
Functions | |
int | G3d_maskClose () |
int | G3d_maskFileExists () |
Returns 1 if the 3d mask file exists. More... | |
int | G3d_maskOpenOld () |
int | G3d_maskReopen (int cache) |
This function should be used to adjust the cache size used for the 3d-mask. First the open 3d-mask is closed and then opened again with a cache size as specified with cache. More... | |
int | G3d_isMasked (G3D_Map *map, int x, int y, int z) |
Returns 1 if the cell with cell-coordinates (x, y, z) is masked out. Returns 0 otherwise. More... | |
void | G3d_maskNum (G3D_Map *map, int x, int y, int z, void *value, int type) |
Replaces the value stored in value with the NULL-value if G3d_isMasked (x, y, z) returns 1. Does nothing otherwise. value is assumed to be oftype. More... | |
void | G3d_maskFloat (G3D_Map *map, int x, int y, int z, float *value) |
Same as G3d_maskNum (x, y, z, value, FCELL_TYPE). More... | |
void | G3d_maskDouble (G3D_Map *map, int x, int y, int z, double *value) |
Same as G3d_maskNum (x, y, z, value, DCELL_TYPE). More... | |
void | G3d_maskTile (G3D_Map *map, int tileIndex, void *tile, int type) |
Replaces the values stored in tile (with tileIndex) for which G3d_isMasked returns 1 with NULL-values. Does not change the remaining values. The values are assumed to be of type. Whether replacement is performed or not only depends on location of the cells of the tile and not on the status of the mask for map (i.e. turned on or off). More... | |
void | G3d_maskOn (G3D_Map *map) |
Turns on the mask for map. Do not invoke this function after the first tile has been read since the result might be inconsistent cell-values. More... | |
void | G3d_maskOff (G3D_Map *map) |
Turns off the mask for map. This is the default. Do not invoke this function after the first tile has been read since the result might be inconsistent cell-values. More... | |
int | G3d_maskIsOn (G3D_Map *map) |
Returns 1 if the mask for map is turned on. Returns 0 otherwise. More... | |
int | G3d_maskIsOff (G3D_Map *map) |
Returns 1 if the mask for map is turned off. Returns 0 otherwise. More... | |
const char * | G3d_maskFile (void) |
Returns the name of the 3d mask file. More... | |
int | G3d_maskMapExists (void) |
Returns 1 if the 3d mask is loaded. More... | |
#define G3D_MASKNUM | ( | map, | |
Xmask, | |||
Ymask, | |||
Zmask, | |||
VALUEmask, | |||
TYPEmask | |||
) |
Definition at line 28 of file g3dmask.c.
Referenced by G3d_maskDouble(), G3d_maskFloat(), G3d_maskNum(), and G3d_maskTile().
Returns 1 if the cell with cell-coordinates (x, y, z) is masked out. Returns 0 otherwise.
x | |
y | |
z |
Definition at line 176 of file g3dmask.c.
References G3d_isNullValueNum().
int G3d_maskClose | ( | ) |
Definition at line 36 of file g3dmask.c.
References G3d_closeCell(), and G3d_error().
Referenced by G3d_maskReopen().
Same as G3d_maskNum (x, y, z, value, DCELL_TYPE).
x | |
y | |
z | |
value |
Definition at line 247 of file g3dmask.c.
References G3D_MASKNUM.
const char* G3d_maskFile | ( | void | ) |
int G3d_maskFileExists | ( | ) |
Returns 1 if the 3d mask file exists.
Definition at line 64 of file g3dmask.c.
References buf, G_find_file(), G_mapset(), NULL, and sprintf().
Referenced by G3d_maskOpenOld(), N_read_rast3d_to_array_3d(), and N_write_array_3d_to_rast3d().
Same as G3d_maskNum (x, y, z, value, FCELL_TYPE).
x | |
y | |
z | |
value |
Definition at line 225 of file g3dmask.c.
References G3D_MASKNUM.
int G3d_maskIsOff | ( | G3D_Map * | map | ) |
Returns 1 if the mask for map is turned off. Returns 0 otherwise.
map |
Definition at line 383 of file g3dmask.c.
Referenced by G3d_readTile(), N_read_rast3d_to_array_3d(), and N_write_array_3d_to_rast3d().
int G3d_maskIsOn | ( | G3D_Map * | map | ) |
Returns 1 if the mask for map is turned on. Returns 0 otherwise.
map |
Definition at line 368 of file g3dmask.c.
Referenced by N_read_rast3d_to_array_3d(), and N_write_array_3d_to_rast3d().
int G3d_maskMapExists | ( | void | ) |
Replaces the value stored in value with the NULL-value if G3d_isMasked (x, y, z) returns 1. Does nothing otherwise. value is assumed to be oftype.
x | |
y | |
z | |
value | |
type |
Definition at line 203 of file g3dmask.c.
References G3D_MASKNUM.
void G3d_maskOff | ( | G3D_Map * | map | ) |
Turns off the mask for map. This is the default. Do not invoke this function after the first tile has been read since the result might be inconsistent cell-values.
map |
Definition at line 352 of file g3dmask.c.
Referenced by G3d_openCellNew(), G3d_openCellOldNoHeader(), N_read_rast3d_to_array_3d(), and N_write_array_3d_to_rast3d().
void G3d_maskOn | ( | G3D_Map * | map | ) |
Turns on the mask for map. Do not invoke this function after the first tile has been read since the result might be inconsistent cell-values.
map |
Definition at line 335 of file g3dmask.c.
Referenced by N_read_rast3d_to_array_3d(), and N_write_array_3d_to_rast3d().
int G3d_maskOpenOld | ( | ) |
Definition at line 76 of file g3dmask.c.
References G3d_error(), G3d_getRegionStructMap(), G3d_maskFileExists(), G3d_openCellOld(), G3d_setWindowMap(), G_mapset(), and NULL.
Referenced by G3d_maskReopen(), G3d_openCellNew(), and G3d_openCellOldNoHeader().
This function should be used to adjust the cache size used for the 3d-mask. First the open 3d-mask is closed and then opened again with a cache size as specified with cache.
cache |
Definition at line 137 of file g3dmask.c.
References G3d_error(), G3d_maskClose(), and G3d_maskOpenOld().
Replaces the values stored in tile (with tileIndex) for which G3d_isMasked returns 1 with NULL-values. Does not change the remaining values. The values are assumed to be of type. Whether replacement is performed or not only depends on location of the cells of the tile and not on the status of the mask for map (i.e. turned on or off).
map | |
tileIndex | |
tile | |
type |
Definition at line 274 of file g3dmask.c.
References dialogs::cols, G3d_computeClippedTileDimensions(), G3d_getTileDimensionsMap(), G3d_length(), G3D_MASKNUM, G3d_tileIndexOrigin(), and y.
Referenced by G3d_readTile().