GRASS 8 Programmer's Manual 8.6.0dev(2026)-ddeab64dbf
Loading...
Searching...
No Matches
putvalue.c File Reference
#include <grass/raster.h>
#include "raster3d_intern.h"
Include dependency graph for putvalue.c:

Go to the source code of this file.

Functions

int Rast3d_put_float (RASTER3D_Map *map, int x, int y, int z, float value)
 Is equivalent to Rast3d_put_value (map, x, y, z, &value, FCELL_TYPE).
 
int Rast3d_put_double (RASTER3D_Map *map, int x, int y, int z, double value)
 Is equivalent to Rast3d_put_value (map, x, y, z, &value, DCELL_TYPE).
 
int Rast3d_put_value (RASTER3D_Map *map, int x, int y, int z, const void *value, int type)
 After converting *value of type into the type specified at the initialization time (i.e. typeIntern) this function writes the value into the tile buffer corresponding to cell-coordinate (x, y, z).
 

Function Documentation

◆ Rast3d_put_double()

int Rast3d_put_double ( RASTER3D_Map map,
int  x,
int  y,
int  z,
double  value 
)

Is equivalent to Rast3d_put_value (map, x, y, z, &value, DCELL_TYPE).

Parameters
map
x
y
z
value
Returns
1 ... if successful, 0 ... otherwise.

Definition at line 51 of file putvalue.c.

References FCELL_TYPE, NULL, Rast3d_coord2tile_index(), Rast3d_error(), Rast3d_get_tile_ptr(), Rast3d_put_float(), RASTER3D_Map::typeIntern, and x.

Referenced by N_write_array_3d_to_rast3d(), Rast3d_put_float(), and Rast3d_put_value().

◆ Rast3d_put_float()

int Rast3d_put_float ( RASTER3D_Map map,
int  x,
int  y,
int  z,
float  value 
)

Is equivalent to Rast3d_put_value (map, x, y, z, &value, FCELL_TYPE).

Parameters
map
x
y
z
value
Returns
1 ... if successful, 0 ... otherwise.

Definition at line 17 of file putvalue.c.

References DCELL_TYPE, NULL, Rast3d_coord2tile_index(), Rast3d_error(), Rast3d_get_tile_ptr(), Rast3d_put_double(), RASTER3D_Map::typeIntern, and x.

Referenced by N_write_array_3d_to_rast3d(), Rast3d_put_double(), and Rast3d_put_value().

◆ Rast3d_put_value()

int Rast3d_put_value ( RASTER3D_Map map,
int  x,
int  y,
int  z,
const void value,
int  type 
)

After converting *value of type into the type specified at the initialization time (i.e. typeIntern) this function writes the value into the tile buffer corresponding to cell-coordinate (x, y, z).

Parameters
map
x
y
z
value
type
Returns
1 ... if successful, 0 ... otherwise.

Definition at line 89 of file putvalue.c.

References FCELL_TYPE, Rast3d_put_double(), Rast3d_put_float(), and x.

Referenced by Rast3d_make_aligned_volume_file(), and Rast3d_retile().