15 int rows,
int cols,
int depths,
16 int xRedundant,
int yRedundant,
17 int zRedundant
UNUSED,
int nofNum,
int type)
22 range = &(map->
range);
31 for (z = 0; z < depths; z++) {
32 for (y = 0; y < rows; y++) {
44 for (z = 0; z < depths; z++) {
72 G_warning(
_(
"Unable to open range file for [%s in %s]"),
name, mapset);
79 if (bytes_read == 0) {
86 G_warning(
_(
"Error reading range file for [%s in %s]"),
name, mapset);
138 static int writeRange(
const char *
name,
struct FPRange *range)
194 Rast3d_error(
"Rast3d_closeCellNew: error in writeRange");
void G_warning(const char *,...) __attribute__((format(printf
int G_open_old_misc(const char *, const char *, const char *, const char *)
open a database misc file for reading
const char * G_mapset(void)
Get current mapset name.
int G_remove_misc(const char *, const char *, const char *)
Remove a database misc file.
void G_xdr_put_double(void *, const double *)
void G_xdr_get_double(double *, const void *)
#define G_incr_void_ptr(ptr, size)
int G_open_new_misc(const char *, const char *, const char *)
open a new database misc file
int Rast3d_g3d_type2cell_type(int)
void Rast3d_filename(char *, const char *, const char *, const char *)
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.
void Rast_init_fp_range(struct FPRange *)
Initialize fp range.
void Rast_row_update_fp_range(const void *, int, struct FPRange *, RASTER_MAP_TYPE)
Update range structure based on raster row (floating-point)
void Rast_update_fp_range(DCELL, struct FPRange *)
Update range structure (floating-point)
#define UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.
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.
int Rast3d_range_init(RASTER3D_Map *map)
int Rast3d_range_load(RASTER3D_Map *map)
Loads the range into the range structure of map.
int Rast3d_read_range(const char *name, const char *mapset, struct FPRange *drange)
void Rast3d_range_update_from_tile(RASTER3D_Map *map, const void *tile, int rows, int cols, int depths, int xRedundant, int yRedundant, int zRedundant UNUSED, int nofNum, int type)
int Rast3d_range_write(RASTER3D_Map *map)
Writes the range which is stored in the range structure of map. (This function is invoked automatical...
#define RASTER3D_DIRECTORY
#define RASTER3D_RANGE_ELEMENT
#define RASTER3D_XDR_DOUBLE_LENGTH
#define RASTER3D_WRITE_DATA