16 int depths,
int xRedundant,
int yRedundant,
17 int zRedundant,
int nofNum,
int type)
22 range = &(map->
range);
31 for (z = 0; z < depths; z++) {
32 for (y = 0; y < rows; y++) {
39 map->
tileX * yRedundant *
46 for (z = 0; z < depths; z++) {
73 G_warning(
_(
"Unable to open range file for [%s in %s]"), name, mapset);
80 if (bytes_read == 0) {
88 G_warning(
_(
"Error reading range file for [%s in %s]"), name, mapset);
142 static int writeRange(
const char *
name,
struct FPRange *range)
163 if (write(fd, xdr_buf, RASTER3D_XDR_DOUBLE_LENGTH * 2) != RASTER3D_XDR_DOUBLE_LENGTH * 2)
197 Rast3d_error(
"Rast3d_closeCellNew: error in writeRange");
void Rast3d_range_update_from_tile(RASTER3D_Map *map, const void *tile, int rows, int cols, int depths, int xRedundant, int yRedundant, int zRedundant, int nofNum, int type)
int Rast3d_read_range(const char *name, const char *mapset, struct FPRange *drange)
#define RASTER3D_WRITE_DATA
int G_open_new_misc(const char *, const char *, const char *)
open a new database file
#define RASTER3D_XDR_DOUBLE_LENGTH
#define G_incr_void_ptr(ptr, size)
void Rast3d_filename(char *, const char *, const char *, const char *)
int G_remove_misc(const char *, const char *, const char *)
Remove a database misc file.
int Rast3d_range_load(RASTER3D_Map *map)
Loads the range into the range structure of map.
void Rast3d_error(const char *,...) __attribute__((format(printf
void Rast_get_fp_range_min_max(const struct FPRange *, DCELL *, DCELL *)
Get minimum and maximum value from fp range.
int G_open_old_misc(const char *, const char *, const char *, const char *)
open a database file for reading
void G_xdr_put_double(void *, const double *)
int Rast3d_g3d_type2cell_type(int)
#define RASTER3D_RANGE_ELEMENT
void Rast_update_fp_range(DCELL, struct FPRange *)
Update range structure (floating-point)
void Rast_row_update_fp_range(const void *, int, struct FPRange *, RASTER_MAP_TYPE)
Update range structure based on raster row (floating-point)
#define RASTER3D_DIRECTORY
void Rast3d_range_min_max(RASTER3D_Map *map, double *min, double *max)
Returns in min and max the minimum and maximum values of the range.
const char * G_mapset(void)
Get current mapset name.
void Rast_init_fp_range(struct FPRange *)
Initialize fp range.
void G_warning(const char *,...) __attribute__((format(printf
int Rast3d_range_init(RASTER3D_Map *map)
int Rast3d_range_write(RASTER3D_Map *map)
Writes the range which is stored in the range structure of map. (This function is invoked automatical...
void G_xdr_get_double(double *, const void *)