10 retileNocache(
void *map,
const char *nameOut,
int tileX,
int tileY,
int tileZ)
13 int x, y, z, saveType, nx, ny, nz;
16 int tileXsave, tileYsave, tileZsave;
40 for (z = 0; z < nz; z++) {
42 for (y = 0; y < ny; y++)
43 for (x = 0; x < nx; x++) {
45 tileX, tileY, tileZ, data, typeIntern);
50 (
"Rast3d_retileNocache: error in Rast3d_write_tile");
79 Rast3d_retile(
void *map,
const char *nameOut,
int tileX,
int tileY,
int tileZ)
83 int x, y, z, saveType;
84 int rows, cols, depths, typeIntern;
85 int xTile, yTile, zTile;
86 int xOffs, yOffs, zOffs, prev;
87 int tileXsave, tileYsave, tileZsave;
91 retileNocache(map, nameOut, tileX, tileY, tileZ);
112 &xTile, &yTile, &zTile, &xOffs, &yOffs, &zOffs);
121 for (z = 0; z < depths; z++) {
124 &xOffs, &yOffs, &zOffs);
131 for (y = 0; y < rows; y++)
132 for (x = 0; x < cols; x++) {
#define RASTER3D_USE_CACHE_DEFAULT
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...
void Rast3d_get_region_struct_map(RASTER3D_Map *, RASTER3D_Region *)
Returns in region the region of map.
void Rast3d_set_tile_dimension(int, int, int)
set Tile Dimension
void Rast3d_get_coords_map(RASTER3D_Map *, int *, int *, int *)
Returns the size of the region of map in cells.
int Rast3d_file_type_map(RASTER3D_Map *)
Returns the type with which tiles of map are stored on file.
int Rast3d_tile_use_cache_map(RASTER3D_Map *)
Returns 1 if map uses cache, returns 0 otherwise.
int Rast3d_close(RASTER3D_Map *)
Close 3D raster map files.
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_free_tiles(void *)
Is equivalent to Rast3d_free (tiles);
void Rast3d_fatal_error(const char *,...) __attribute__((format(printf
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...
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. The source code can be found in retile.c.
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 G_percent(long, long, int)
Print percent complete messages.
int Rast3d_get_file_type(void)
get G3d file type
void * Rast3d_alloc_tiles(RASTER3D_Map *, int)
Is equivalent to Rast3d_alloc_tiles_type (map, nofTiles, Rast3d_file_type_map (map)).
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_get_tile_dimension(int *, int *, int *)
get Tile Dimension
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_flush_all_tiles(RASTER3D_Map *)
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...
#define RASTER3D_NO_CACHE
int Rast3d_tile_type_map(RASTER3D_Map *)
Returns the type in which tiles of map are stored in memory.
void Rast3d_set_file_type(int)
set G3d file type
int Rast3d_tile2tile_index(RASTER3D_Map *, int, int, int)
Returns tile-index corresponding to tile-coordinates (xTile, yTile, zTile).