|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-ddeab64dbf
|

Go to the source code of this file.
Macros | |
| #define | RASTER3D_MASKNUM(map, Xmask, Ymask, Zmask, VALUEmask, TYPEmask) |
Functions | |
| int | Rast3d_mask_close (void) |
| int | Rast3d_mask_file_exists (void) |
| Returns 1 if the 3d mask file exists. | |
| int | Rast3d_mask_open_old (void) |
| int | Rast3d_mask_reopen (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. | |
| int | Rast3d_is_masked (RASTER3D_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. | |
| void | Rast3d_mask_num (RASTER3D_Map *map, int x, int y, int z, void *value, int type) |
| Replaces the value stored in value with the NULL-value if Rast3d_is_masked (x, y, z) returns 1. Does nothing otherwise. value is assumed to be oftype. | |
| void | Rast3d_mask_float (RASTER3D_Map *map, int x, int y, int z, float *value) |
| Same as Rast3d_mask_num (x, y, z, value, FCELL_TYPE). | |
| void | Rast3d_mask_double (RASTER3D_Map *map, int x, int y, int z, double *value) |
| Same as Rast3d_mask_num (x, y, z, value, DCELL_TYPE). | |
| void | Rast3d_mask_tile (RASTER3D_Map *map, int tileIndex, void *tile, int type) |
| Replaces the values stored in tile (with tileIndex) for which Rast3d_is_masked 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). | |
| void | Rast3d_mask_on (RASTER3D_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. | |
| void | Rast3d_mask_off (RASTER3D_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. | |
| int | Rast3d_mask_is_on (RASTER3D_Map *map) |
| Returns 1 if the mask for map is turned on. Returns 0 otherwise. | |
| int | Rast3d_mask_is_off (RASTER3D_Map *map) |
| Returns 1 if the mask for map is turned off. Returns 0 otherwise. | |
| const char * | Rast3d_mask_file (void) |
| Returns the name of the 3d mask file. | |
| int | Rast3d_mask_map_exists (void) |
| Returns 1 if the 3d mask is loaded. | |
| int Rast3d_is_masked | ( | RASTER3D_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.
| x | |
| y | |
| z |
Definition at line 172 of file mask.c.
References FCELL_TYPE, Rast3d_is_null_value_num(), and x.
Definition at line 37 of file mask.c.
References Rast3d_close(), and Rast3d_error().
Referenced by Rast3d_mask_reopen().
Same as Rast3d_mask_num (x, y, z, value, DCELL_TYPE).
| map | |
| x | |
| y | |
| z | |
| value |
Definition at line 241 of file mask.c.
References DCELL_TYPE, RASTER3D_MASKNUM, and x.
Returns the name of the 3d mask file.
Definition at line 378 of file mask.c.
References RASTER3D_MASK_MAP.
Returns 1 if the 3d mask file exists.
Definition at line 63 of file mask.c.
References G_find_file_misc(), G_mapset(), NULL, RASTER3D_CELL_ELEMENT, RASTER3D_DIRECTORY, and RASTER3D_MASK_MAP.
Referenced by N_read_rast3d_to_array_3d(), N_write_array_3d_to_rast3d(), and Rast3d_mask_open_old().
Same as Rast3d_mask_num (x, y, z, value, FCELL_TYPE).
| map | |
| x | |
| y | |
| z | |
| value |
Definition at line 220 of file mask.c.
References FCELL_TYPE, RASTER3D_MASKNUM, and x.
| int Rast3d_mask_is_off | ( | RASTER3D_Map * | map | ) |
Returns 1 if the mask for map is turned off. Returns 0 otherwise.
| map |
Definition at line 366 of file mask.c.
References RASTER3D_Map::useMask.
Referenced by N_read_rast3d_to_array_3d(), N_write_array_3d_to_rast3d(), and Rast3d_read_tile().
| int Rast3d_mask_is_on | ( | RASTER3D_Map * | map | ) |
Returns 1 if the mask for map is turned on. Returns 0 otherwise.
| map |
Definition at line 353 of file mask.c.
References RASTER3D_Map::useMask.
Referenced by N_read_rast3d_to_array_3d(), and N_write_array_3d_to_rast3d().
Replaces the value stored in value with the NULL-value if Rast3d_is_masked (x, y, z) returns 1. Does nothing otherwise. value is assumed to be oftype.
| map | |
| x | |
| y | |
| z | |
| value | |
| type |
Definition at line 198 of file mask.c.
References RASTER3D_MASKNUM, and x.
| void Rast3d_mask_off | ( | RASTER3D_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 339 of file mask.c.
References RASTER3D_Map::useMask.
Referenced by N_read_rast3d_to_array_3d(), N_write_array_3d_to_rast3d(), Rast3d_open_cell_new(), and Rast3d_open_cell_old_no_header().
| void Rast3d_mask_on | ( | RASTER3D_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 324 of file mask.c.
References RASTER3D_Map::useMask.
Referenced by N_read_rast3d_to_array_3d(), and N_write_array_3d_to_rast3d().
Definition at line 73 of file mask.c.
References FCELL_TYPE, G_mapset(), NULL, Rast3d_error(), Rast3d_get_region_struct_map(), Rast3d_mask_file_exists(), Rast3d_open_cell_old(), Rast3d_set_window_map(), RASTER3D_DEFAULT_WINDOW, and RASTER3D_MASK_MAP.
Referenced by Rast3d_mask_reopen(), Rast3d_open_cell_new(), and Rast3d_open_cell_old_no_header().
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 135 of file mask.c.
References Rast3d_error(), Rast3d_mask_close(), and Rast3d_mask_open_old().
| void Rast3d_mask_tile | ( | RASTER3D_Map * | map, |
| int | tileIndex, | ||
| void * | tile, | ||
| int | type | ||
| ) |
Replaces the values stored in tile (with tileIndex) for which Rast3d_is_masked 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 266 of file mask.c.
References Rast3d_compute_clipped_tile_dimensions(), Rast3d_get_tile_dimensions_map(), Rast3d_length(), Rast3d_tile_index_origin(), RASTER3D_MASKNUM, RASTER3D_Map::tileSize, RASTER3D_Map::tileX, and x.
Referenced by Rast3d_read_tile().