GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-bea8435a9e
getvalue.c File Reference
#include <grass/raster.h>
#include "raster3d_intern.h"
Include dependency graph for getvalue.c:

Go to the source code of this file.

Functions

void Rast3d_get_value (RASTER3D_Map *map, int x, int y, int z, void *value, int type)
 Returns in *value the resampled cell-value of the cell with window-coordinate (x, y, z). The value returned is of type. This function invokes a fatal error if an error occurs. More...
 
float Rast3d_get_float (RASTER3D_Map *map, int x, int y, int z)
 Is equivalent to Rast3d_get_value (map, x, y, z, &value, FCELL_TYPE); return value. More...
 
double Rast3d_get_double (RASTER3D_Map *map, int x, int y, int z)
 Is equivalent to Rast3d_get_value (map, x, y, z, &value, DCELL_TYPE); return value. More...
 
void Rast3d_get_window_value (RASTER3D_Map *map, double north, double east, double top, void *value, int type)
 Returns in value the value of the map which corresponds to window coordinates (north, east, top). The value is resampled using the resampling function specified for map. The value is of type. More...
 
void Rast3d_get_region_value (RASTER3D_Map *map, double north, double east, double top, void *value, int type)
 Returns in value the value of the map which corresponds to region coordinates (north, east, top). More...
 
float Rast3d_get_float_region (RASTER3D_Map *map, int x, int y, int z)
 Is equivalent to Rast3d_get_value_region (map, x, y, z, &value, FCELL_TYPE); return value. More...
 
double Rast3d_get_double_region (RASTER3D_Map *map, int x, int y, int z)
 Is equivalent to Rast3d_get_value_region (map, x, y, z, &value, DCELL_TYPE); return value. More...
 
void Rast3d_get_value_region (RASTER3D_Map *map, int x, int y, int z, void *value, int type)
 Returns in *value the cell-value of the cell with region-coordinate (x, y, z). The value returned is of type. Here region means the coordinate in the cube of data in the file, i.e. ignoring geographic coordinates. In case the region coordinates are out of bounds, the Null value will be returned. This function invokes a fatal error if an error occurs. More...
 

Function Documentation

◆ Rast3d_get_double()

double Rast3d_get_double ( RASTER3D_Map map,
int  x,
int  y,
int  z 
)

Is equivalent to Rast3d_get_value (map, x, y, z, &value, DCELL_TYPE); return value.

Parameters
map
x
y
z
Returns
double

Definition at line 68 of file getvalue.c.

References DCELL_TYPE, Rast3d_get_value(), and x.

◆ Rast3d_get_double_region()

double Rast3d_get_double_region ( RASTER3D_Map map,
int  x,
int  y,
int  z 
)

Is equivalent to Rast3d_get_value_region (map, x, y, z, &value, DCELL_TYPE); return value.

Parameters
map
x
y
z
Returns
double

Definition at line 208 of file getvalue.c.

References RASTER3D_Region::cols, DCELL_TYPE, RASTER3D_Region::depths, FCELL_TYPE, NULL, Rast3d_coord2tile_index(), Rast3d_fatal_error(), Rast3d_get_float_region(), Rast3d_get_tile_ptr(), Rast3d_set_null_value(), RASTER3D_Map::region, RASTER3D_Region::rows, RASTER3D_Map::typeIntern, and x.

Referenced by Rast3d_get_float_region().

◆ Rast3d_get_float()

float Rast3d_get_float ( RASTER3D_Map map,
int  x,
int  y,
int  z 
)

Is equivalent to Rast3d_get_value (map, x, y, z, &value, FCELL_TYPE); return value.

Parameters
map
x
y
z
Returns
float

Definition at line 44 of file getvalue.c.

References FCELL_TYPE, Rast3d_get_value(), and x.

◆ Rast3d_get_float_region()

float Rast3d_get_float_region ( RASTER3D_Map map,
int  x,
int  y,
int  z 
)

Is equivalent to Rast3d_get_value_region (map, x, y, z, &value, FCELL_TYPE); return value.

Parameters
map
x
y
z
Returns
float

Definition at line 165 of file getvalue.c.

References RASTER3D_Region::cols, DCELL_TYPE, RASTER3D_Region::depths, FCELL_TYPE, NULL, Rast3d_coord2tile_index(), Rast3d_fatal_error(), Rast3d_get_double_region(), Rast3d_get_tile_ptr(), Rast3d_set_null_value(), RASTER3D_Map::region, RASTER3D_Region::rows, RASTER3D_Map::typeIntern, and x.

Referenced by Rast3d_get_double_region().

◆ Rast3d_get_region_value()

void Rast3d_get_region_value ( RASTER3D_Map map,
double  north,
double  east,
double  top,
void *  value,
int  type 
)

Returns in value the value of the map which corresponds to region coordinates (north, east, top).

Parameters
map
north
east
top
value
type
Returns
void

Definition at line 131 of file getvalue.c.

◆ Rast3d_get_value()

void Rast3d_get_value ( RASTER3D_Map map,
int  x,
int  y,
int  z,
void *  value,
int  type 
)

Returns in *value the resampled cell-value of the cell with window-coordinate (x, y, z). The value returned is of type. This function invokes a fatal error if an error occurs.

Parameters
map
x
y
z
value
type
Returns
void

Definition at line 22 of file getvalue.c.

Referenced by Rast3d_get_double(), and Rast3d_get_float().

◆ Rast3d_get_value_region()

void Rast3d_get_value_region ( RASTER3D_Map map,
int  x,
int  y,
int  z,
void *  value,
int  type 
)

Returns in *value the cell-value of the cell with region-coordinate (x, y, z). The value returned is of type. Here region means the coordinate in the cube of data in the file, i.e. ignoring geographic coordinates. In case the region coordinates are out of bounds, the Null value will be returned. This function invokes a fatal error if an error occurs.

Parameters
map
x
y
z
value
type
Returns
void

Definition at line 257 of file getvalue.c.

Referenced by Rast3d_write_ascii().

◆ Rast3d_get_window_value()

void Rast3d_get_window_value ( RASTER3D_Map map,
double  north,
double  east,
double  top,
void *  value,
int  type 
)

Returns in value the value of the map which corresponds to window coordinates (north, east, top). The value is resampled using the resampling function specified for map. The value is of type.

Parameters
map
north
east
top
value
type
Returns
void

Definition at line 95 of file getvalue.c.