#include "gis.h"
Include dependency graph for raster.c:
Go to the source code of this file.
Functions | |
void * | G_incr_void_ptr (void *ptr, int size) |
Advances void pointer by n bytes. returns new pointer value. Usefull in raster row processing loops, substitutes. | |
int | G_raster_cmp (void *v1, void *v2, RASTER_MAP_TYPE data_type) |
Compares raster vlues p and q. Returns 1 if p > q or only q is null value -1 if p < q or only p is null value 0 if p == q or p==q==null value. | |
int | G_raster_cpy (void *v1, void *v2, int n, RASTER_MAP_TYPE data_type) |
Copies raster values q into p. If q is null value, sets q to null value. | |
int | G_set_raster_value_c (void *rast, CELL cval, RASTER_MAP_TYPE data_type) |
If G_is_c_null_value(val) is true, sets p to null value. Converts CELL val to data_type (type of p) and stores result in p. Used for assigning CELL values to raster cells of any type. | |
int | G_set_raster_value_f (void *rast, FCELL fval, RASTER_MAP_TYPE data_type) |
If G_is_f_null_value(val) is true, sets p to null value. Converts FCELL val to data_type (type of p) and stores result in p. Used for assigning FCELL values to raster cells of any type. | |
int | G_set_raster_value_d (void *rast, DCELL dval, RASTER_MAP_TYPE data_type) |
If G_is_d_null_value(val) is true, sets p to null value. Converts DCELL val to data_type (type of p) and stores result in p. Used for assigning DCELL values to raster cells of any type. | |
CELL | G_get_raster_value_c (void *rast, RASTER_MAP_TYPE data_type) |
Retrieves the value of type data_type from pointer p, converts it to CELL type and returns the result. If null value is stored in p, returns CELL null value. Used for retreiving CELL values from raster cells of any type. NOTE: when data_type != CELL_TYPE, no quantization is used, only type conversion. | |
FCELL | G_get_raster_value_f (void *rast, RASTER_MAP_TYPE data_type) |
Retrieves the value of type data_type from pointer p, converts it to FCELL type and returns the result. If null value is stored in p, returns FCELL null value. Used for retreiving FCELL values from raster cells of any type. | |
DCELL | G_get_raster_value_d (void *rast, RASTER_MAP_TYPE data_type) |
Retrieves the value of type data_type from pointer p, converts it to DCELL type and returns the result. If null value is stored in p, returns DCELL null value. Used for retreiving DCELL values from raster cells of any type. |
CELL G_get_raster_value_c | ( | void * | rast, | |
RASTER_MAP_TYPE | data_type | |||
) |
Retrieves the value of type data_type from pointer p, converts it to CELL type and returns the result. If null value is stored in p, returns CELL null value. Used for retreiving CELL values from raster cells of any type. NOTE: when data_type != CELL_TYPE, no quantization is used, only type conversion.
p | ||
data_type |
Definition at line 229 of file raster.c.
References G_is_null_value(), and G_set_c_null_value().
DCELL G_get_raster_value_d | ( | void * | rast, | |
RASTER_MAP_TYPE | data_type | |||
) |
Retrieves the value of type data_type from pointer p, converts it to DCELL type and returns the result. If null value is stored in p, returns DCELL null value. Used for retreiving DCELL values from raster cells of any type.
p | ||
data_type |
Definition at line 297 of file raster.c.
References G_is_null_value(), and G_set_d_null_value().
Referenced by G__lookup_colors(), G_get_raster_cat(), G_mark_raster_cats(), and G_set_raster_cat().
FCELL G_get_raster_value_f | ( | void * | rast, | |
RASTER_MAP_TYPE | data_type | |||
) |
Retrieves the value of type data_type from pointer p, converts it to FCELL type and returns the result. If null value is stored in p, returns FCELL null value. Used for retreiving FCELL values from raster cells of any type.
p | ||
data_type |
Definition at line 263 of file raster.c.
References G_is_null_value(), and G_set_f_null_value().
void* G_incr_void_ptr | ( | void * | ptr, | |
int | size | |||
) |
Advances void pointer by n bytes. returns new pointer value. Usefull in raster row processing loops, substitutes.
Now
rast = G_incr_void_ptr(rast, G_raster_size(data_type))
ptr | ||
size |
Definition at line 27 of file raster.c.
Referenced by G__lookup_colors(), G_get_raster_row_colors(), G_mark_raster_cats(), and G_row_update_fp_range().
int G_raster_cmp | ( | void * | v1, | |
void * | v2, | |||
RASTER_MAP_TYPE | data_type | |||
) |
Compares raster vlues p and q. Returns 1 if p > q or only q is null value -1 if p < q or only p is null value 0 if p == q or p==q==null value.
p | ||
q | ||
data_type |
Definition at line 50 of file raster.c.
References G_is_null_value().
Referenced by G__lookup_colors().
int G_raster_cpy | ( | void * | v1, | |
void * | v2, | |||
int | n, | |||
RASTER_MAP_TYPE | data_type | |||
) |
Copies raster values q into p. If q is null value, sets q to null value.
p | ||
q | ||
n | ||
data_type |
Definition at line 97 of file raster.c.
References G_copy(), and G_raster_size().
int G_set_raster_value_c | ( | void * | rast, | |
CELL | cval, | |||
RASTER_MAP_TYPE | data_type | |||
) |
If G_is_c_null_value(val) is true, sets p to null value. Converts CELL val to data_type (type of p) and stores result in p. Used for assigning CELL values to raster cells of any type.
p | ||
val | ||
data_type |
Definition at line 120 of file raster.c.
References G_is_c_null_value(), and G_set_null_value().
int G_set_raster_value_d | ( | void * | rast, | |
DCELL | dval, | |||
RASTER_MAP_TYPE | data_type | |||
) |
If G_is_d_null_value(val) is true, sets p to null value. Converts DCELL val to data_type (type of p) and stores result in p. Used for assigning DCELL values to raster cells of any type.
p | ||
val | ||
data_type |
Definition at line 192 of file raster.c.
References G_is_d_null_value(), and G_set_null_value().
Referenced by G_get_ith_c_raster_cat(), G_get_ith_f_raster_cat(), G_get_ith_raster_cat(), and G_get_next_marked_raster_cat().
int G_set_raster_value_f | ( | void * | rast, | |
FCELL | fval, | |||
RASTER_MAP_TYPE | data_type | |||
) |
If G_is_f_null_value(val) is true, sets p to null value. Converts FCELL val to data_type (type of p) and stores result in p. Used for assigning FCELL values to raster cells of any type.
p | ||
val | ||
data_type |
Definition at line 156 of file raster.c.
References G_is_f_null_value(), and G_set_null_value().