GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71933
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

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, and Rast3d_get_value().

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

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, and RASTER3D_Map::typeIntern.

Referenced by Rast3d_get_float_region(), Rast3d_get_value_region(), and Rast3d_get_volume_a().

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, and Rast3d_get_value().

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

float Rast3d_get_float_region ( RASTER3D_Map map,
int  x,
int  y,
int  z 
)
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, RASTER3D_Region::depths, Rast3d_get_value_region(), Rast3d_location2coord(), Rast3d_set_null_value(), RASTER3D_Map::region, and RASTER3D_Region::rows.

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.

Referenced by N_read_rast3d_to_array_3d(), Rast3d_get_double(), and Rast3d_get_float().

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(), and Rast3d_get_float_region().

Referenced by Rast3d_compare_files(), Rast3d_get_block(), Rast3d_get_region_value(), Rast3d_nearest_neighbor(), Rast3d_retile(), and Rast3d_write_ascii().

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, RASTER3D_Region::depths, Rast3d_location2coord(), Rast3d_set_null_value(), RASTER3D_Map::resampleFun, RASTER3D_Region::rows, and RASTER3D_Map::window.