#include <string.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
void | G__init_null_patterns (void) |
void | G__set_null_value (void *rast, int numVals, int null_is_zero, RASTER_MAP_TYPE data_type) |
void | G_set_null_value (void *buf, int numVals, RASTER_MAP_TYPE data_type) |
void | G_set_c_null_value (CELL *cellVals, int numVals) |
void | G_set_f_null_value (FCELL *fcellVals, int numVals) |
void | G_set_d_null_value (DCELL *dcellVals, int numVals) |
int | G_is_null_value (const void *rast, RASTER_MAP_TYPE data_type) |
If the data_type is CELL_TYPE, calls G_is_c_null_value ((CELL *) rast); If the data_type is FCELL_TYPE, calls G_is_f_null_value ((FCELL *) rast); If the data_type is DCELL_TYPE, calls G_is_d_null_value ((DCELL *) rast);. | |
int | G_is_c_null_value (const CELL *cellVal) |
Returns 1 if cell is NULL, 0 otherwise. This will test if the value cell is the largest int . | |
int | G_is_f_null_value (const FCELL *fcellVal) |
Returns 1 if fcell is NULL, 0 otherwise. This will test if the value fcell is a NaN. It isn't good enough to test for a particular NaN bit pattern since the machine code may change this bit pattern to a different NaN. The test will be. | |
int | G_is_d_null_value (const DCELL *dcellVal) |
Returns 1 if dcell is NULL, 0 otherwise. This will test if the value dcell is a NaN. Same test as in G_is_f_null_value() . | |
int | G_insert_null_values (void *rast, char *null_row, int ncols, RASTER_MAP_TYPE data_type) |
Insert NULL value. | |
int | G_insert_c_null_values (CELL *cellVal, char *null_row, int ncols) |
Insert CELL NULL value. | |
int | G_insert_f_null_values (FCELL *fcellVal, char *null_row, int ncols) |
Insert FCELL NULL value. | |
int | G_insert_d_null_values (DCELL *dcellVal, char *null_row, int ncols) |
Insert DCELL NULL value. | |
int | G__check_null_bit (unsigned char *flags, int bit_num, int n) |
int | G__set_flags_from_01_random (char *zero_ones, unsigned char *flags, int col, int n, int ncols) |
int | G__convert_01_flags (char *zero_ones, unsigned char *flags, int n) |
int | G__convert_flags_01 (char *zero_ones, unsigned char *flags, int n) |
int | G__init_null_bits (unsigned char *flags, int cols) |
int G__check_null_bit | ( | unsigned char * | flags, | |
int | bit_num, | |||
int | n | |||
) |
Definition at line 641 of file null_val.c.
References G__null_bitstream_size(), and G_warning().
Referenced by G__set_flags_from_01_random().
int G__convert_01_flags | ( | char * | zero_ones, | |
unsigned char * | flags, | |||
int | n | |||
) |
Definition at line 729 of file null_val.c.
References G__null_bitstream_size().
Referenced by G__set_flags_from_01_random().
int G__convert_flags_01 | ( | char * | zero_ones, | |
unsigned char * | flags, | |||
int | n | |||
) |
int G__init_null_bits | ( | unsigned char * | flags, | |
int | cols | |||
) |
void G__init_null_patterns | ( | void | ) |
Definition at line 134 of file null_val.c.
int G__set_flags_from_01_random | ( | char * | zero_ones, | |
unsigned char * | flags, | |||
int | col, | |||
int | n, | |||
int | ncols | |||
) |
Definition at line 676 of file null_val.c.
References G__check_null_bit(), G__convert_01_flags(), and G__null_bitstream_size().
void G__set_null_value | ( | void * | rast, | |
int | numVals, | |||
int | null_is_zero, | |||
RASTER_MAP_TYPE | data_type | |||
) |
Definition at line 191 of file null_val.c.
References G_raster_size(), G_set_null_value(), and G_zero().
int G_insert_c_null_values | ( | CELL * | cellVal, | |
char * | null_row, | |||
int | ncols | |||
) |
Insert CELL NULL value.
For each of the count flags which is true(!=0), set the corresponding cell to the NULL value.
cell | ||
flags | ||
count |
Definition at line 571 of file null_val.c.
int G_insert_d_null_values | ( | DCELL * | dcellVal, | |
char * | null_row, | |||
int | ncols | |||
) |
Insert DCELL NULL value.
For each for the count flag which is true(!=0), set the corresponding dcell to the NULL value.
dcell | ||
flags | ||
count |
Definition at line 627 of file null_val.c.
int G_insert_f_null_values | ( | FCELL * | fcellVal, | |
char * | null_row, | |||
int | ncols | |||
) |
Insert FCELL NULL value.
For each of the count flags which is true(!=0), set the corresponding fcell to the NULL value.
fcell | ||
flags | ||
count |
Definition at line 599 of file null_val.c.
int G_insert_null_values | ( | void * | rast, | |
char * | null_row, | |||
int | ncols, | |||
RASTER_MAP_TYPE | data_type | |||
) |
Insert NULL value.
If the data_type is CELL_TYPE, calls G_insert_c_null_values ((CELL *) rast, flags, count); If the data_type is FCELL_TYPE, calls G_insert_f_null_values ((FCELL *) rast, flags, count); If the data_type is DCELL_TYPE, calls G_insert_d_null_values ((DCELL *) rast, flags, count);
rast | ||
flags | ||
count | ||
data_type |
Definition at line 542 of file null_val.c.
int G_is_c_null_value | ( | const CELL * | cellVal | ) |
Returns 1 if cell is NULL, 0 otherwise. This will test if the value cell is the largest int
.
cell |
Definition at line 392 of file null_val.c.
Referenced by G__row_update_range(), G_find_cell_stat(), G_fpreclass_perform_id(), G_fpreclass_perform_if(), G_fpreclass_perform_ii(), G_get_range_min_max(), G_get_raster_cat(), G_is_null_value(), G_mark_raster_cats(), G_number_of_cats(), G_put_reclass(), G_read_colors(), G_set_color(), G_set_raster_value_c(), G_update_cell_stats(), and G_update_range().
int G_is_d_null_value | ( | const DCELL * | dcellVal | ) |
Returns 1 if dcell is NULL, 0 otherwise. This will test if the value dcell is a NaN. Same test as in G_is_f_null_value()
.
dcell |
Definition at line 489 of file null_val.c.
Referenced by G_fpreclass_perform_dd(), G_fpreclass_perform_df(), G_fpreclass_perform_di(), G_get_fp_range_min_max(), G_is_null_value(), G_make_colors(), G_quant_get_cell_value(), G_quant_perform_d(), G_quantize_fp_map(), G_read_colors(), G_set_d_color(), G_set_d_raster_cat(), G_set_raster_value_d(), and G_update_fp_range().
int G_is_f_null_value | ( | const FCELL * | fcellVal | ) |
Returns 1 if fcell is NULL, 0 otherwise. This will test if the value fcell is a NaN. It isn't good enough to test for a particular NaN bit pattern since the machine code may change this bit pattern to a different NaN. The test will be.
if(fcell==0.0) return 0; if(fcell>0.0) return 0; if(fcell<0.0) return 0; return 1;
return (fcell != fcell);
fcell |
Definition at line 446 of file null_val.c.
Referenced by G_fpreclass_perform_fd(), G_fpreclass_perform_ff(), G_fpreclass_perform_fi(), G_is_null_value(), G_quant_perform_f(), and G_set_raster_value_f().
int G_is_null_value | ( | const void * | rast, | |
RASTER_MAP_TYPE | data_type | |||
) |
If the data_type is CELL_TYPE, calls G_is_c_null_value ((CELL *) rast); If the data_type is FCELL_TYPE, calls G_is_f_null_value ((FCELL *) rast); If the data_type is DCELL_TYPE, calls G_is_d_null_value ((DCELL *) rast);.
rast | ||
data_type |
Definition at line 354 of file null_val.c.
References G_is_c_null_value(), G_is_d_null_value(), G_is_f_null_value(), and G_warning().
Referenced by G__lookup_colors(), G_get_raster_cat(), G_get_raster_row_colors(), G_get_raster_value_c(), G_get_raster_value_d(), G_get_raster_value_f(), G_raster_cmp(), and G_row_update_fp_range().
void G_set_c_null_value | ( | CELL * | cellVals, | |
int | numVals | |||
) |
Definition at line 245 of file null_val.c.
Referenced by G_fpreclass_perform_di(), G_fpreclass_perform_fi(), G_fpreclass_perform_ii(), G_get_range_min_max(), G_get_raster_value_c(), G_init_range(), G_quant_get_limits(), G_quant_perform_d(), G_quant_perform_f(), and G_set_null_value().
void G_set_d_null_value | ( | DCELL * | dcellVals, | |
int | numVals | |||
) |
Definition at line 307 of file null_val.c.
Referenced by G_fpreclass_get_cell_value(), G_fpreclass_perform_dd(), G_fpreclass_perform_fd(), G_fpreclass_perform_id(), G_get_fp_range_min_max(), G_get_ith_d_raster_cat(), G_get_raster_value_d(), G_init_fp_range(), G_quant_get_limits(), and G_set_null_value().
void G_set_f_null_value | ( | FCELL * | fcellVals, | |
int | numVals | |||
) |
Definition at line 276 of file null_val.c.
Referenced by G_fpreclass_perform_df(), G_fpreclass_perform_ff(), G_fpreclass_perform_if(), G_get_raster_value_f(), and G_set_null_value().
void G_set_null_value | ( | void * | buf, | |
int | numVals, | |||
RASTER_MAP_TYPE | data_type | |||
) |
Definition at line 214 of file null_val.c.
References G_set_c_null_value(), G_set_d_null_value(), G_set_f_null_value(), and G_warning().
Referenced by G__set_null_value(), G_set_raster_value_c(), G_set_raster_value_d(), and G_set_raster_value_f().