grass  7.8.6
About: GRASS (Geographic Resources Analysis Support System) is a raster- and vector-based GIS, image processing system, graphics production system and spatial modeling system.
  Fossies Dox: grass-7.8.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

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 66 of file getvalue.c.

References DCELL_TYPE, Rast3d_get_value(), and x.

Referenced by read_g3d_slice(), read_g3d_value(), and read_g3d_vol().

◆ 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 207 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_value_region(), and Rast3d_get_volume_a().

◆ 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 43 of file getvalue.c.

References FCELL_TYPE, Rast3d_get_value(), and x.

Referenced by read_g3d_slice(), read_g3d_value(), and read_g3d_vol().

◆ 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_value_region(), and Rast3d_get_volume_a().

◆ 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.

References RASTER3D_Region::cols, depth, RASTER3D_Region::depths, Rast3d_get_value_region(), Rast3d_location2coord(), Rast3d_set_null_value(), RASTER3D_Map::region, RASTER3D_Region::rows, and type.

Referenced by Rast3d_getMaskFloat().

◆ 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.

References RASTER3D_Map::resampleFun, type, and x.

Referenced by N_read_rast3d_to_array_3d(), 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 256 of file getvalue.c.

References FCELL_TYPE, Rast3d_get_double_region(), Rast3d_get_float_region(), type, and x.

Referenced by Rast3d_compare_files(), Rast3d_get_block(), Rast3d_get_region_value(), Rast3d_nearest_neighbor(), Rast3d_retile(), and 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 94 of file getvalue.c.

References RASTER3D_Region::cols, depth, RASTER3D_Region::depths, Rast3d_location2coord(), Rast3d_set_null_value(), RASTER3D_Map::resampleFun, RASTER3D_Region::rows, type, and RASTER3D_Map::window.