9static void retileNocache(
void *map,
const char *
nameOut,
int tileX,
int tileY,
41 for (z = 0; z < nz; z++) {
43 for (y = 0; y < ny; y++)
44 for (x = 0;
x < nx;
x++) {
46 tileY, tileZ, data, typeIntern);
51 "Rast3d_retileNocache: error in Rast3d_write_tile");
83 int rows, cols, depths, typeIntern;
90 retileNocache(map,
nameOut, tileX, tileY, tileZ);
120 for (z = 0; z < depths; z++) {
127 "Rast3d_retile: error in Rast3d_flush_all_tiles");
131 for (y = 0; y < rows; y++)
132 for (
x = 0;
x < cols;
x++) {
137 "Rast3d_retile: error in Rast3d_put_value");
void G_percent(long, long, int)
Print percent complete messages.
int Rast3d_flush_all_tiles(RASTER3D_Map *)
int Rast3d_file_type_map(RASTER3D_Map *)
Returns the type with which tiles of map are stored on file.
int Rast3d_tile_type_map(RASTER3D_Map *)
Returns the type in which tiles of map are stored in memory.
void Rast3d_get_nof_tiles_map(RASTER3D_Map *, int *, int *, int *)
Returns the dimensions of the tile-cube used to tile the region of map. These numbers include partial...
void Rast3d_get_tile_dimension(int *, int *, int *)
get Tile Dimension
void Rast3d_get_region_struct_map(RASTER3D_Map *, RASTER3D_Region *)
Returns in region the region of map.
void * Rast3d_alloc_tiles(RASTER3D_Map *, int)
Is equivalent to Rast3d_alloc_tiles_type (map, nofTiles, Rast3d_file_type_map (map)).
void Rast3d_free_tiles(void *)
Is equivalent to Rast3d_free (tiles);
void Rast3d_set_tile_dimension(int, int, int)
set Tile Dimension
void * Rast3d_open_cell_new(const char *, int, int, RASTER3D_Region *)
Opens new g3d-file with name in the current mapset. Tiles are stored in memory with type which must b...
void Rast3d_get_coords_map(RASTER3D_Map *, int *, int *, int *)
Returns the size of the region of map in cells.
void Rast3d_get_block(RASTER3D_Map *, int, int, int, int, int, int, void *, int)
Copies the cells contained in the block (cube) with vertices (x0, y0, z0) and (x0 + nx - 1,...
int Rast3d_tile_use_cache_map(RASTER3D_Map *)
Returns 1 if map uses cache, returns 0 otherwise.
void Rast3d_set_file_type(int)
set G3d file type
int Rast3d_get_file_type(void)
get G3d file type
int Rast3d_put_value(RASTER3D_Map *, int, int, int, const void *, int)
After converting *value of type into the type specified at the initialization time (i....
int Rast3d_tile2tile_index(RASTER3D_Map *, int, int, int)
Returns tile-index corresponding to tile-coordinates (xTile, yTile, zTile).
void Rast3d_get_value_region(RASTER3D_Map *, int, int, int, void *, int)
Returns in *value the cell-value of the cell with region-coordinate (x, y, z). The value returned is ...
void Rast3d_coord2tile_coord(RASTER3D_Map *, int, int, int, int *, int *, int *, int *, int *, int *)
Converts cell-coordinates (x, y, z) into tile-coordinates (xTile, yTile, zTile) and the coordinate of...
int Rast3d_write_tile(RASTER3D_Map *, int, const void *, int)
Writes tile with index tileIndex to the file corresponding to map. It is assumed that the cells in ti...
void Rast3d_fatal_error(const char *,...) __attribute__((format(printf
int Rast3d_close(RASTER3D_Map *)
Close 3D raster map files.
#define RASTER3D_USE_CACHE_DEFAULT
#define RASTER3D_NO_CACHE
void Rast3d_retile(void *map, const char *nameOut, int tileX, int tileY, int tileZ)
Makes a copy of map with name nameOut which has tile dimensions tileX, tileY, tileZ....