1 #ifndef GRASS_RASTERDEFS_H 2 #define GRASS_RASTERDEFS_H 164 unsigned char *,
unsigned char *,
int,
167 unsigned char *,
unsigned char *,
int,
170 unsigned char *,
unsigned char *,
int,
173 unsigned char *,
unsigned char *,
int,
176 unsigned char *,
unsigned char *,
int,
struct Colors *,
206 const DCELL *,
int,
int,
int,
209 const FCELL *,
int,
int,
int,
212 const CELL *,
int,
int,
int,
215 const void *,
int,
int,
int,
218 const DCELL *,
int,
int,
int,
221 const FCELL *,
int,
int,
int,
224 const CELL *,
int,
int,
int,
227 const void *,
int,
int,
int,
233 unsigned char *,
DCELL *,
unsigned char *,
234 unsigned char *,
unsigned char *,
235 const struct Colors *,
int);
239 DCELL *,
int *,
int *,
int *,
int *,
int *,
int *);
241 int *,
int *,
int *,
int *);
244 int *,
int *,
int *);
342 unsigned char *,
unsigned char *,
unsigned char *,
397 DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
398 DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
403 DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
404 DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
416 #define Rast_is_c_null_value(cellVal) \ 417 (*(const CELL *)(cellVal) == (CELL) 0x80000000) 418 #define Rast_is_f_null_value(fcellVal) \ 419 (*(const FCELL *)(fcellVal) != *(const FCELL *)(fcellVal)) 420 #define Rast_is_d_null_value(dcellVal) \ 421 (*(const DCELL *)(dcellVal) != *(const DCELL *)(dcellVal)) 429 #ifndef Rast_is_c_null_value 432 #ifndef Rast_is_f_null_value 435 #ifndef Rast_is_d_null_value int Rast_history_length(struct History *)
void Rast_get_null_value_row(int, char *, int)
Read or simulate null value row.
char * Rast_get_next_marked_c_cat(struct Categories *, CELL *, CELL *, long *)
Get next marked raster categories (CELL)
void Rast__write_colors(FILE *, struct Colors *)
Write map layer color table.
void Rast_close_gdal_link(struct GDAL_link *)
Close existing GDAL link.
void Rast_make_byg_fp_colors(struct Colors *, DCELL, DCELL)
Create BYG color table (floating-point)
int Rast_number_of_cats(struct Categories *)
Get number of raster categories.
void Rast_set_null_value(void *, int, RASTER_MAP_TYPE)
To set one or more raster values to null.
void Rast_make_byg_colors(struct Colors *, CELL, CELL)
Create BYG color table (integer)
void Rast_write_colors(const char *, const char *, struct Colors *)
Write map layer color table.
void Rast_set_fp_type(RASTER_MAP_TYPE)
Set raster map floating-point data format.
void void Rast_clear_history(struct History *)
void Rast_write_history(const char *, struct History *)
Write raster history file.
int Rast__read_history(struct History *, FILE *)
int Rast_is_reclassed_to(const char *, const char *, int *, char ***)
Get child reclass maps list.
void Rast_put_d_row(int, const DCELL *)
Writes the next row for dcell file (DCELL version)
int Rast_open_new_uncompressed(const char *, RASTER_MAP_TYPE)
Opens a new raster map (uncompressed)
int Rast_next_cell_stat(CELL *, long *, struct Cell_stats *)
Retrieve sorted cell stats.
void Rast_extend_histogram(CELL, long, struct Histogram *)
Extends histogram struct to accommodate a new value.
int Rast_raster_cmp(const void *, const void *, RASTER_MAP_TYPE)
Compares raster values.
void Rast_fpreclass_set_domain(struct FPReclass *, DCELL, DCELL)
int Rast_rewind_cell_stats(struct Cell_stats *)
Reset/rewind cell stats.
void Rast_set_c_null_value(CELL *, int)
To set a number of CELL raster values to NULL.
int Rast_input_window_cols(void)
Number of columns in active input window.
void Rast_fpreclass_perform_if(const struct FPReclass *, const CELL *, FCELL *, int)
DCELL Rast_get_d_value(const void *, RASTER_MAP_TYPE)
Retrieves the value of given type from pointer p (DCELL)
void Rast_set_d_color(DCELL, int, int, int, struct Colors *)
Set a category color (DCELL)
int Rast_add_modular_color_rule(const void *, int, int, int, const void *, int, int, int, struct Colors *, RASTER_MAP_TYPE)
Add modular color rule.
void Rast_fpreclass_perform_di(const struct FPReclass *, const DCELL *, CELL *, int)
void Rast_make_rainbow_colors(struct Colors *, CELL, CELL)
Make rainbow colors (integer)
void Rast_put_row(int, const void *, RASTER_MAP_TYPE)
Writes the next row for cell/fcell/dcell file.
void Rast_fpreclass_add_rule(struct FPReclass *, DCELL, DCELL, DCELL, DCELL)
int Rast_put_reclass(const char *, const struct Reclass *)
Put reclass.
int Rast_is_reclass(const char *, const char *, char *, char *)
Check if raster map is reclassified.
char * Rast_allocate_null_output_buf(void)
int Rast_output_window_rows(void)
Number of rows in active output window.
void Rast__remove_fp_range(const char *)
Remove floating-point range.
void Rast_make_gyr_fp_colors(struct Colors *, DCELL, DCELL)
Create GYR color table (floating-point)
struct GDAL_link * Rast_get_gdal_link(const char *, const char *)
Get GDAL link settings for given raster map.
void Rast_copy_cats(struct Categories *, const struct Categories *)
Copy raster categories.
void Rast_add_c_color_rule(const CELL *, int, int, int, const CELL *, int, int, int, struct Colors *)
Adds the integer color rule (CELL version)
DCELL Rast_interp_cubic_bspline(double, DCELL, DCELL, DCELL, DCELL)
int Rast_sort_histogram_by_count(struct Histogram *)
Sorts the histogram by counts.
void Rast_get_d_row_nomask(int, DCELL *, int)
Read raster row without masking (DCELL type)
int Rast_row_repeat_nomask(int, int)
Loops rows until mismatch?.
void Rast_init_gdal(void)
Initialization.
int Rast_quant_get_pos_infinite_rule(const struct Quant *, DCELL *, CELL *)
Returns in "dRight" and "c" the rule values.
int Rast_fpreclass_nof_rules(const struct FPReclass *)
int Rast__open_null_write(const char *)
void Rast__color_free_rules(struct _Color_Info_ *)
Free color rules structure.
2D/3D raster map header (used also for region)
#define Rast_is_d_null_value(dcellVal)
void Rast_free_reclass(struct Reclass *)
Free Reclass structure.
void Rast_make_histogram_cs(struct Cell_stats *, struct Histogram *)
Creates histogram based on cell statistics.
void Rast_print_colors(struct Colors *, DCELL, DCELL, FILE *, int)
Print color table.
int Rast_read_quant(const char *, const char *, struct Quant *)
Reads quantization rules for name in mapset and stores them in the quantization structure. If the map is in another mapset, first checks for quant2 table for this map in current mapset.
void Rast_make_ramp_fp_colors(struct Colors *, DCELL, DCELL)
Make color ramp (floating-point)
char * Rast_get_cell_title(const char *, const char *)
get raster map title
void Rast_fpreclass_perform_dd(const struct FPReclass *, const DCELL *, DCELL *, int)
struct GDAL_link * Rast_create_gdal_link(const char *, RASTER_MAP_TYPE)
Create GDAL settings for given raster map.
void Rast_quant_perform_f(struct Quant *, const FCELL *, CELL *, int)
Same as Rast_quant_perform_d(), except the type.
const char * Rast_parse_color_rule_error(int)
Parse color rule.
void Rast_quant_clear(struct Quant *)
Resets the number of defined rules and number of infinite rules to 0.
char * Rast_read_vdatum(const char *, const char *)
Get a raster map's vertical datum metadata string.
void Rast_construct_default_range(struct Range *)
Construct default range.
void Rast_invert_colors(struct Colors *)
void Rast_free_cell_stats(struct Cell_stats *)
Free cell stats structure.
void Rast_get_row_nomask(int, void *, int, RASTER_MAP_TYPE)
Read raster row without masking.
DCELL * Rast_allocate_d_output_buf(void)
void Rast_get_d_color_range(DCELL *, DCELL *, const struct Colors *)
Get color range values (DCELL)
void Rast_shift_c_colors(CELL, struct Colors *)
void Rast_set_cell_format(int)
Sets the format for subsequent opens on new integer cell files (uncompressed and random only)...
void Rast_get_d_row(int, DCELL *, int)
Get raster row (DCELL type)
double Rast_northing_to_row(double, const struct Cell_head *)
Northing to row.
int Rast_read_color_rule(void *, DCELL, DCELL, DCELL *, int *, int *, int *, int *, int *, int *)
Read color rule.
void Rast__convert_flags_01(char *, const unsigned char *, int)
?
int Rast__quant_organize_fp_lookup(struct Quant *)
Organized fp_lookup table.
int Rast_open_c_new_uncompressed(const char *)
Opens a new cell file in a database (uncompressed)
void Rast_histogram_eq(const struct Histogram *, unsigned char **, CELL *, CELL *)
void Rast_write_histogram(const char *, const struct Histogram *)
Writes the histogram information.
int Rast_remove_colors(const char *, const char *)
Remove color table of raster map.
void Rast_histogram_eq_colors(struct Colors *, struct Colors *, struct Cell_stats *)
Make histogram-stretched version of existing color table.
int Rast_get_cell_format(CELL)
Get cell value format.
void Rast__row_update_range(const CELL *, int, struct Range *, int)
Update range structure based on raster row.
void Rast_make_histogram_log_colors(struct Colors *, struct Cell_stats *, int, int)
Generates histogram with normalized log transformed grey scale.
int Rast__check_null_bit(const unsigned char *, int, int)
Check NULL.
int Rast__open_old(const char *, const char *)
Lower level function, open cell files, supercell files, and the MASK file.
void Rast_make_bgyr_colors(struct Colors *, CELL, CELL)
Create BGYR color table (integer)
void Rast_shift_d_colors(DCELL, struct Colors *)
void Rast_free_histogram(struct Histogram *)
Frees memory allocated for the histogram.
int Rast_quant_is_truncate(const struct Quant *)
Returns whether or not quant rules are set to truncate map.
void Rast_write_rstats(const char *, const struct R_stats *)
Write raster stats file.
int Rast_read_color_rules(struct Colors *, DCELL, DCELL, read_rule_fn *, void *)
Read color rules from file.
FCELL Rast_get_f_value(const void *, RASTER_MAP_TYPE)
Retrieves the value of given raster type from pointer p (FCELL)
void Rast_make_gyr_colors(struct Colors *, CELL, CELL)
Create GYR color table (integer)
struct R_vrt * Rast_get_vrt(const char *, const char *)
int Rast_input_window_rows(void)
Number of rows in active input window.
void Rast_zero_histogram(struct Histogram *)
Zero out histogram struct.
void Rast_set_d_color_range(DCELL, DCELL, struct Colors *)
Set color range (DCELL version)
void Rast_mark_d_cats(const DCELL *, int, struct Categories *)
Looks up the category label for each raster value (DCELL).
#define Rast_is_f_null_value(fcellVal)
char * Rast_get_next_marked_cat(struct Categories *, void *, void *, long *, RASTER_MAP_TYPE)
Get next marked raster categories.
void Rast_mark_c_cats(const CELL *, int, struct Categories *)
Looks up the category label for each raster value (CELL).
void Rast_free_history(struct History *)
int Rast_fpreclass_get_neg_infinite_rule(const struct FPReclass *, DCELL *, DCELL *)
void Rast__init_window(void)
char * Rast_get_ith_c_cat(const struct Categories *, int, void *, void *)
Get category description (CELL)
void Rast_close_vrt(struct R_vrt *)
void Rast_make_bgyr_fp_colors(struct Colors *, DCELL, DCELL)
Create BGYR color table (floating-point)
void Rast_set_input_window(struct Cell_head *)
Establishes 'window' as the current working window for input.
void Rast__interpolate_color_rule(DCELL, unsigned char *, unsigned char *, unsigned char *, const struct _Color_Rule_ *)
Interpolate color rules.
char * Rast_get_f_cat(FCELL *, struct Categories *)
Get a raster category label (FCELL)
void Rast_quantize_fp_map_range(const char *, const char *, DCELL, DCELL, CELL, CELL)
Write quant rules (f_quant) for floating-point raster map.
int Rast_set_cat(const void *, const void *, const char *, struct Categories *, RASTER_MAP_TYPE)
Set a raster category label.
void Rast_quant_init(struct Quant *)
Initialize the structure.
void Rast_truncate_fp_map(const char *, const char *)
Writes the quant rules.
void * Rast_allocate_input_buf(RASTER_MAP_TYPE)
void Rast_make_rainbow_fp_colors(struct Colors *, DCELL, DCELL)
Make rainbow colors (floating-point)
void Rast_mark_f_cats(const FCELL *, int, struct Categories *)
Looks up the category label for each raster value (FCELL).
int Rast_get_fp_color_rule(DCELL *, unsigned char *, unsigned char *, unsigned char *, DCELL *, unsigned char *, unsigned char *, unsigned char *, const struct Colors *, int)
Get color rule from both modular and fixed rules.
int Rast_quant_nof_rules(const struct Quant *)
Returns the number of quantization rules defined.
void Rast_get_default_color(int *, int *, int *, const struct Colors *)
Gets default color.
int Rast_read_range(const char *, const char *, struct Range *)
Read raster range (CELL)
void Rast_add_color_rule(const void *, int, int, int, const void *, int, int, int, struct Colors *, RASTER_MAP_TYPE)
Adds the color rule.
int Rast_get_vrt_row(int, void *, int, RASTER_MAP_TYPE)
void Rast_quant_free(struct Quant *)
Resets and frees allocated memory.
DCELL Rast_get_sample_cubic(int, const struct Cell_head *, struct Categories *, double, double, int)
Extract a cell value from raster map (cubic interpolation).
double Rast_easting_to_col(double, const struct Cell_head *)
Easting to column.
int Rast_load_fp_colors(struct Colors *, const char *, DCELL, DCELL)
Load color floating-point rules from file.
void Rast_init_histogram(struct Histogram *)
initializes the histogram structure
int Rast_get_color(const void *, int *, int *, int *, struct Colors *, RASTER_MAP_TYPE)
Gets color from raster map.
DCELL Rast_interp_bicubic_bspline(double, double, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL)
void Rast_set_history(struct History *, int, const char *)
Set the string of a specific history field.
unsigned char * Rast__allocate_null_bits(int)
Allocates memory for null bits.
int Rast__read_colors(const char *, const char *, const char *, struct Colors *)
void Rast_make_ryg_fp_colors(struct Colors *, DCELL, DCELL)
Create RYG color table (floating-point)
void Rast_set_window(struct Cell_head *)
Establishes 'window' as the current working window.
void Rast_get_fp_range_min_max(const struct FPRange *, DCELL *, DCELL *)
Get minimum and maximum value from fp range.
int Rast_put_cell_title(const char *, const char *)
void Rast_set_f_value(void *, FCELL, RASTER_MAP_TYPE)
Places a FCELL raster value.
char * Rast_get_cat(void *, struct Categories *, RASTER_MAP_TYPE)
Get a raster category label.
void Rast__set_null_value(void *, int, int, RASTER_MAP_TYPE)
To set one or more raster values to null.
int Rast_sort_cats(struct Categories *)
Sort categories.
void Rast_get_stats_for_null_value(long *, const struct Cell_stats *)
Get number of null values.
void Rast_insert_d_null_values(DCELL *, char *, int)
To insert null values into an floating-point raster map (FCELL)
int Rast__insert_color_into_lookup(CELL, int, int, int, struct _Color_Info_ *)
void Rast_unset_window(void)
Unset current window.
void Rast_get_input_window(struct Cell_head *)
Read the current input window.
void Rast_update_range(CELL, struct Range *)
Update range structure (CELL)
void Rast_get_output_window(struct Cell_head *)
Read the current output window.
void Rast_get_c_row(int, CELL *, int)
Get raster row (CELL type)
void Rast_get_f_row_nomask(int, FCELL *, int)
Read raster row without masking (FCELL type)
void Rast_quantize_fp_map(const char *, const char *, CELL, CELL)
Write quant rules (f_quant) for floating-point raster map.
CELL Rast_quant_get_cell_value(struct Quant *, DCELL)
Returns a CELL category for the floating-point value based on the quantization rules in q...
void Rast_mark_colors_as_fp(struct Colors *)
Mark colors as floating-point.
void Rast_get_row_colors(int, int, struct Colors *, unsigned char *, unsigned char *, unsigned char *, unsigned char *)
Reads a row of raster data and converts it to RGB.
CELL * Rast_allocate_c_output_buf(void)
int Rast_cell_stats_histo_eq(struct Cell_stats *, CELL, CELL, CELL, CELL, int, void(*)(CELL, CELL, CELL))
void Rast_get_c_row_nomask(int, CELL *, int)
Read raster row without masking (CELL type)
DCELL Rast_get_sample(int, const struct Cell_head *, struct Categories *, double, double, int, INTERP_TYPE)
Extract a cell value from raster map.
void Rast_init_range(struct Range *)
Initialize range structure.
void Rast__color_free_lookup(struct _Color_Info_ *)
Free color rules structure.
FCELL * Rast_allocate_f_output_buf(void)
int Rast__read_null_row_ptrs(int, int)
char * Rast_get_c_cat(CELL *, struct Categories *)
Get a raster category label (CELL)
void Rast_set_output_window(struct Cell_head *)
Establishes 'window' as the current working window for output.
int Rast_read_rstats(const char *, const char *, struct R_stats *)
Read raster stats.
DCELL * Rast_allocate_d_buf(void)
Allocates memory for a raster map of type DCELL.
void Rast_zero_buf(void *, RASTER_MAP_TYPE)
Zero a raster buffer.
int Rast_set_f_cat(const FCELL *, const FCELL *, const char *, struct Categories *)
Set a raster category label (FCELL)
void Rast_make_random_colors(struct Colors *, CELL, CELL)
make random colors
void Rast_zero_output_buf(void *, RASTER_MAP_TYPE)
int Rast__null_bitstream_size(int)
Determines null bitstream size.
void Rast_make_wave_colors(struct Colors *, CELL, CELL)
Make color wave (integer)
void Rast_write_vdatum(const char *, const char *)
Write a string into a raster's vertical datum metadata file.
void Rast_write_fp_range(const char *, const struct FPRange *)
Write raster range file (floating-point)
char * Rast_get_d_cat(DCELL *, struct Categories *)
Get a raster category label (DCELL)
int Rast_find_cell_stat(CELL, long *, const struct Cell_stats *)
Random query of cell stats.
void Rast_fpreclass_reset(struct FPReclass *)
void Rast_unopen(int)
Unopen a raster map.
void Rast_append_format_history(struct History *, const char *,...) __attribute__((format(printf
void Rast_histogram_eq_fp_colors(struct Colors *, struct Colors *, struct FP_stats *)
Make histogram-stretched version of existing color table (FP version)
int Rast_open_new(const char *, RASTER_MAP_TYPE)
Opens a new raster map.
int Rast_add_modular_f_color_rule(const FCELL *, int, int, int, const FCELL *, int, int, int, struct Colors *)
Add modular floating-point color rule (FCELL version)
size_t Rast_cell_size(RASTER_MAP_TYPE)
Returns size of a raster cell in bytes.
void Rast__write_history(struct History *, FILE *)
int Rast_add_modular_c_color_rule(const CELL *, int, int, int, const CELL *, int, int, int, struct Colors *)
Add modular integer color rule (CELL version)
void Rast_get_null_value_color(int *, int *, int *, const struct Colors *)
Gets color for null value.
int Rast_read_histogram(const char *, const char *, struct Histogram *)
read the histogram information
void Rast_suppress_masking(void)
Suppresses masking.
void Rast_insert_null_values(void *, char *, int, RASTER_MAP_TYPE)
To check if a CELL raster value is set to NULL.
int Rast_mark_cats(const void *, int, struct Categories *, RASTER_MAP_TYPE)
Looks up the category label for each raster value (DCELL).
void Rast_unsuppress_masking(void)
Unsuppresses masking.
void Rast_row_update_range(const CELL *, int, struct Range *)
Update range structure based on raster row (CELL)
int Rast_maskfd(void)
Test for MASK.
DCELL Rast_fpreclass_get_cell_value(const struct FPReclass *, DCELL)
const char * Rast_history_line(struct History *, int)
void Rast_make_wave_fp_colors(struct Colors *, DCELL, DCELL)
Make color wave (floating-point)
FCELL * Rast_allocate_f_input_buf(void)
void Rast_fpreclass_perform_fd(const struct FPReclass *, const FCELL *, DCELL *, int)
int Rast_fpreclass_get_pos_infinite_rule(const struct FPReclass *, DCELL *, DCELL *)
Raster history info (metadata)
int Rast_set_d_cat(const DCELL *, const DCELL *, const char *, struct Categories *)
Set a raster category label (DCELL)
int Rast__quant_import(const char *, const char *, struct Quant *)
Reads quantization rules (internal use only)
void Rast_want_histogram(int)
Save histogram for newly create raster map (cell)
void Rast_set_f_null_value(FCELL *, int)
To set a number of FCELL raster values to NULL.
char * Rast_mask_info(void)
int Rast_quant_get_neg_infinite_rule(const struct Quant *, DCELL *, CELL *)
Returns in "dLeft" and "c" the rule values.
void Rast_put_f_row(int, const FCELL *)
Writes the next row for fcell file (FCELL version)
void Rast__check_init(void)
Checks to see if GIS engine is initialized.
void Rast_free_colors(struct Colors *)
Free color structure memory.
void Rast_get_row(int, void *, int, RASTER_MAP_TYPE)
Get raster row.
int Rast__quant_export(const char *, const char *, const struct Quant *)
Writes the quantization rules (internal use only)
char * Rast_get_ith_d_cat(const struct Categories *, int, DCELL *, DCELL *)
Get category description (DCELL)
int Rast_read_vector_cats(const char *, const char *, struct Categories *)
Read vector category file.
void Rast_make_aspect_colors(struct Colors *, CELL, CELL)
Make aspect colors (integer)
RASTER_MAP_TYPE Rast__check_fp_type(const char *, const char *)
Determines whether the floating points cell file has double or float type.
int Rast_write_band_reference(const char *, const char *, const char *)
Write raster map band reference identifier.
int Rast_get_reclass(const char *, const char *, struct Reclass *)
Get reclass.
void Rast__color_reset(struct Colors *)
Reset colors structure.
int Rast_open_old(const char *, const char *)
Open an existing integer raster map (cell)
void Rast_make_ramp_colors(struct Colors *, CELL, CELL)
Make color ramp (integer)
void Rast_set_default_color(int, int, int, struct Colors *)
Set default color value.
void Rast_lookup_colors(const void *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, struct Colors *, RASTER_MAP_TYPE)
Lookup an array of colors.
int Rast_quant_is_round(const struct Quant *)
Returns whether or not quant rules are set to round map.
FCELL * Rast_allocate_f_buf(void)
Allocates memory for a raster map of type FCELL.
int Rast_open_fp_new_uncompressed(const char *)
Opens new fcell file in a database (uncompressed)
int Rast_read_history(const char *, const char *, struct History *)
Read raster history file.
void Rast_quant_set_pos_infinite_rule(struct Quant *, DCELL, CELL)
Defines a rule for values "dRight" and larger.
void Rast_lookup_d_colors(const DCELL *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, struct Colors *)
Lookup an array of colors (DCELL)
void Rast_rewind_cats(struct Categories *)
Rewind raster categories.
void Rast_make_byr_colors(struct Colors *, CELL, CELL)
Create BYR color table (integer)
void Rast_put_cellhd(const char *, struct Cell_head *)
Writes the raster file header.
CELL Rast_get_max_c_cat(const char *, const char *)
Get the max category number.
CELL Rast_get_c_value(const void *, RASTER_MAP_TYPE)
Retrieves the value of give type from pointer p.
void Rast_init_cats(const char *, struct Categories *)
Initialize category structure.
int Rast_set_c_cat(const CELL *, const CELL *, const char *, struct Categories *)
Set a raster category label (CELL)
void Rast_fpreclass_set_pos_infinite_rule(struct FPReclass *, DCELL, DCELL)
int Rast_close_gdal_write_link(struct GDAL_link *)
Close existing GDAL link and write out data.
void Rast__lookup_colors(const void *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, struct Colors *, int, int, RASTER_MAP_TYPE)
Lookup an array of colors.
void Rast_set_null_value_color(int, int, int, struct Colors *)
Set color for NULL-value.
void Rast__color_free_fp_lookup(struct _Color_Info_ *)
Free color rules structure.
DCELL Rast_interp_bicubic(double, double, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL)
int Rast_open_fp_new(const char *)
Opens new fcell file in a database.
void Rast_write_vector_cats(const char *, struct Categories *)
Write vector category file.
int Rast_sort_histogram(struct Histogram *)
Sorts the histogram.
void Rast__create_window_mapping(int)
Create window mapping.
int Rast__check_format(int)
int Rast_update_cell_stats(const CELL *, int, struct Cell_stats *)
Add data to cell stats.
int Rast_open_c_new(const char *)
Opens a new cell file in a database (compressed)
void Rast_set_c_color_range(CELL, CELL, struct Colors *)
Set color range (CELL version)
void Rast_fpreclass_perform_fi(const struct FPReclass *, const FCELL *, CELL *, int)
int Rast__write_row_ptrs(int)
void Rast_short_history(const char *, const char *, struct History *)
Initialize history structure.
DCELL * Rast_allocate_d_input_buf(void)
int Rast_get_d_color(const DCELL *, int *, int *, int *, struct Colors *)
Gets color from raster map (DCELL)
void Rast_update_fp_range(DCELL, struct FPRange *)
Update range structure (floating-point)
void Rast_set_c_value(void *, CELL, RASTER_MAP_TYPE)
Places a CELL raster value.
void Rast__error_handler(void *)
void Rast_fpreclass_perform_ii(const struct FPReclass *, const CELL *, CELL *, int)
void Rast__init_null_bits(unsigned char *, int)
?
void Rast_set_d_value(void *, DCELL, RASTER_MAP_TYPE)
Places a DCELL raster value.
int Rast_quant_get_limits(const struct Quant *, DCELL *, DCELL *, CELL *, CELL *)
Returns the minimum and maximum cell and dcell values of all the ranges defined.
int read_rule_fn(void *, DCELL, DCELL, DCELL *, int *, int *, int *, int *, int *, int *)
void Rast_row_update_fp_range(const void *, int, struct FPRange *, RASTER_MAP_TYPE)
Update range structure based on raster row (floating-point)
char * Rast_get_ith_cat(const struct Categories *, int, void *, void *, RASTER_MAP_TYPE)
Get category description.
void Rast_get_window(struct Cell_head *)
Read the current window.
int Rast_get_f_color(const FCELL *, int *, int *, int *, struct Colors *)
Gets color from raster map (FCELL)
void Rast_get_cellhd(const char *, const char *, struct Cell_head *)
Read the raster header.
int Rast_read_fp_range(const char *, const char *, struct FPRange *)
Read floating-point range.
int Rast_command_history(struct History *)
Save command line to raster history structure.
int Rast_get_c_color(const CELL *, int *, int *, int *, struct Colors *)
Gets color from raster map (CELL)
char * Rast_allocate_null_input_buf(void)
void Rast_fpreclass_perform_df(const struct FPReclass *, const DCELL *, FCELL *, int)
void Rast_log_colors(struct Colors *, struct Colors *, int)
Make logarithmically-scaled version of an existing color table.
DCELL Rast_interp_cubic(double, DCELL, DCELL, DCELL, DCELL)
void Rast_quant_add_rule(struct Quant *, DCELL, DCELL, CELL, CELL)
Adds a new rule to the set of quantization rules.
void Rast_add_f_color_rule(const FCELL *, int, int, int, const FCELL *, int, int, int, struct Colors *)
Adds the floating-point color rule (FCELL version)
double Rast_col_to_easting(double, const struct Cell_head *)
Column to easting.
int Rast_read_cats(const char *, const char *, struct Categories *)
Read raster category file.
void Rast_make_histogram_eq_colors(struct Colors *, struct Cell_stats *)
Make histogram-stretched grey colors.
void Rast_put_c_row(int, const CELL *)
Writes the next row for cell file (CELL version)
void Rast_init_cell_stats(struct Cell_stats *)
Initialize cell stats.
struct Quant_table * Rast__quant_get_rule_for_d_raster_val(const struct Quant *, DCELL)
Returns quant rule which will be applied.
void Rast_init_fp_range(struct FPRange *)
Initialize fp range.
void Rast_fpreclass_reverse_rule_order(struct FPReclass *)
void Rast_insert_f_null_values(FCELL *, char *, int)
To insert null values into an floating-point raster map (FCELL)
void Rast_quant_get_ith_rule(const struct Quant *, int, DCELL *, DCELL *, CELL *, CELL *)
Returns the i'th quantization rule.
int Rast_window_rows(void)
Number of rows in active window.
int Rast_read_colors(const char *, const char *, struct Colors *)
Read color table of raster map.
void * Rast_allocate_buf(RASTER_MAP_TYPE)
Allocate memory for a raster map of given type.
void Rast__organize_colors(struct Colors *)
void Rast__unopen_all(void)
Unopen all raster maps.
int Rast_window_cols(void)
Number of columns in active window.
void Rast_get_c_color_range(CELL *, CELL *, const struct Colors *)
Get color range values (CELL)
void Rast_round_fp_map(const char *, const char *)
Writes the quant rules.
void Rast_unmark_cats(struct Categories *)
Sets marks for all categories to 0.
int Rast__read_row_ptrs(int)
void Rast_fpreclass_clear(struct FPReclass *)
void * Rast_allocate_output_buf(RASTER_MAP_TYPE)
void Rast_set_quant_rules(int, struct Quant *)
Sets quant translation rules for raster map opened for reading.
void Rast_free_cats(struct Categories *)
Free category structure memory.
void Rast_fpreclass_get_ith_rule(const struct FPReclass *, int, DCELL *, DCELL *, DCELL *, DCELL *)
int Rast_set_histogram(CELL, long, struct Histogram *)
sets the histogram value for cat to count
char * Rast_read_units(const char *, const char *)
Get a raster map's units metadata string.
void Rast_write_cats(const char *, struct Categories *)
Write raster category file.
RASTER_MAP_TYPE Rast_get_map_type(int)
Determine raster type from descriptor.
Structure that stores option information.
void Rast_make_colors(struct Colors *, const char *, CELL, CELL)
Load color rules from predefined color table.
int Rast_add_modular_d_color_rule(const DCELL *, int, int, int, const DCELL *, int, int, int, struct Colors *)
Add modular floating-point color rule (DCELL version)
void Rast__close_null(int)
void Rast_set_cats_fmt(const char *, double, double, double, double, struct Categories *)
Set category fmt (?)
int Rast__mask_info(char *, char *)
void Rast_remove_histogram(const char *)
Removes the histogram.
void Rast_quant_round(struct Quant *)
Sets the quant rules to perform simple rounding on floats.
void Rast__convert_01_flags(const char *, unsigned char *, int)
?
char * Rast_allocate_null_buf(void)
Allocates memory for a null buffer.
long Rast_get_histogram_count(int, const struct Histogram *)
Returns count for the nth element in the histogram.
void Rast_add_d_color_rule(const DCELL *, int, int, int, const DCELL *, int, int, int, struct Colors *)
Adds the floating-point color rule (DCELL version)
void Rast_quant_set_neg_infinite_rule(struct Quant *, DCELL, CELL)
Defines a rule for values "dLeft" and smaller.
void const char * Rast_get_history(struct History *, int)
Set the string of a specific history field.
void Rast_make_byr_fp_colors(struct Colors *, DCELL, DCELL)
Create BYR color table (floating-point)
int Rast_fpreclass_get_limits(const struct FPReclass *, DCELL *, DCELL *, DCELL *, DCELL *)
void Rast_quant_perform_d(struct Quant *, const DCELL *, CELL *, int)
Returns in "cell" the quantized CELL values.
void Rast_format_history(struct History *, int, const char *,...) __attribute__((format(printf
int Rast_add_histogram(CELL, long, struct Histogram *)
adds count to the histogram value for cat
void Rast_fpreclass_perform_id(const struct FPReclass *, const CELL *, DCELL *, int)
void Rast_make_fp_colors(struct Colors *, const char *, DCELL, DCELL)
Load color rules from predefined floating-point color table.
void Rast_make_grey_scale_fp_colors(struct Colors *, DCELL, DCELL)
Make linear grey scale (floating-point)
void Rast_write_range(const char *, const struct Range *)
Write raster range file.
DCELL Rast_get_sample_nearest(int, const struct Cell_head *, struct Categories *, double, double, int)
Extract a cell value from raster map (neighbor interpolation)
void Rast_insert_c_null_values(CELL *, char *, int)
To insert null values into an integer raster map (CELL)
CELL * Rast_allocate_c_input_buf(void)
int Rast_parse_color_rule(DCELL, DCELL, const char *, DCELL *, int *, int *, int *, int *, int *, int *)
Read color rule.
DCELL Rast_interp_lanczos(double, double, DCELL *)
void Rast_make_grey_scale_colors(struct Colors *, CELL, CELL)
Make linear grey scale (integer)
void Rast_fpreclass_init(struct FPReclass *)
void Rast_make_aspect_fp_colors(struct Colors *, DCELL, DCELL)
Make aspect colors (floating-point)
void Rast_write_units(const char *, const char *)
Write a string to a raster map's units metadata file.
int Rast__write_null_row_ptrs(int, int)
void Rast_set_cats_title(const char *, struct Categories *)
Set title in category structure.
int Rast_option_to_interp_type(const struct Option *)
Get interpolation method from the option.
int Rast__check_for_auto_masking(void)
Checks for auto masking.
void Rast_write_histogram_cs(const char *, struct Cell_stats *)
Writes the histogram based on cell statistics to file.
char * Rast_get_next_marked_f_cat(struct Categories *, FCELL *, FCELL *, long *)
Get next marked raster categories (FCELL)
void Rast_lookup_c_colors(const CELL *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, struct Colors *)
Lookup an array of colors.
void Rast_raster_cpy(void *, const void *, int, RASTER_MAP_TYPE)
Copies raster values.
void Rast_fpreclass_perform_ff(const struct FPReclass *, const FCELL *, FCELL *, int)
void Rast_append_history(struct History *, const char *)
Append a string to a History structure.
int Rast_read_band_reference(const char *, const char *, char **, char **)
Read raster map band reference identifier.
char * Rast_get_cats_title(const struct Categories *)
Get title from category structure struct.
void Rast_init(void)
Initialize GRASS GIS engine.
DCELL Rast_interp_linear(double, DCELL, DCELL)
void Rast_abs_log_colors(struct Colors *, struct Colors *, int)
Make logarithmically-scaled version of an existing color table, allowing for signed values...
void Rast_fpreclass_set_range(struct FPReclass *, DCELL, DCELL)
int Rast_map_to_img_str(char *, int, unsigned char *)
CELL Rast_get_histogram_cat(int, const struct Histogram *)
Returns cat for the nth element in the histogram.
DCELL Rast_interp_bilinear(double, double, DCELL, DCELL, DCELL, DCELL)
void Rast_init_colors(struct Colors *)
Initialize color structure.
void Rast_set_c_color(CELL, int, int, int, struct Colors *)
Set a category color (CELL)
int Rast_colors_count(const struct Colors *)
Get both modular and fixed rules count.
char * Rast_get_next_marked_d_cat(struct Categories *, DCELL *, DCELL *, long *)
Get next marked raster categories (DCELL)
void Rast_align_window(struct Cell_head *, const struct Cell_head *)
Align two regions.
#define Rast_is_c_null_value(cellVal)
void Rast__write_null_bits(int, const unsigned char *)
Write null data.
int Rast_remove_band_reference(const char *)
Remove band reference from raster map.
void Rast_fpreclass_set_neg_infinite_rule(struct FPReclass *, DCELL, DCELL)
CELL * Rast_allocate_c_buf(void)
Allocate memory for a CELL type raster map.
void Rast_zero_input_buf(void *, RASTER_MAP_TYPE)
void Rast_quant_truncate(struct Quant *)
Sets the quant rules to perform simple truncation on floats.
void Rast_make_ryg_colors(struct Colors *, CELL, CELL)
Create RYG color table (integer)
void Rast_set_d_null_value(DCELL *, int)
To set a number of DCELL raster values to NULL.
DCELL Rast_get_sample_bilinear(int, const struct Cell_head *, struct Categories *, double, double, int)
Extract a cell value from raster map (bilinear interpolation).
void Rast_close(int)
Close a raster map.
int Rast_map_is_fp(const char *, const char *)
Check if raster map is floating-point.
int Rast_get_histogram_num(const struct Histogram *)
Sorts the histogram in ascending order by counts then category.
char * Rast_get_ith_f_cat(const struct Categories *, int, void *, void *)
Get category description (FCELL)
int Rast__read_null_bits(int, int, unsigned char *)
void Rast_quant_reverse_rule_order(struct Quant *)
Rreverses the order in which the qunatization rules are stored.
int Rast_load_colors(struct Colors *, const char *, CELL, CELL)
Load color rules from file.
void Rast_get_range_min_max(const struct Range *, CELL *, CELL *)
Get range min and max.
void Rast_get_f_row(int, FCELL *, int)
Get raster row (FCELL type)
void Rast_lookup_f_colors(const FCELL *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, struct Colors *)
Lookup an array of colors (FCELL)
int Rast_is_null_value(const void *, RASTER_MAP_TYPE)
To check if a raster value is set to NULL.
RASTER_MAP_TYPE Rast_map_type(const char *, const char *)
Determine raster data type.
void Rast_write_quant(const char *, const char *, const struct Quant *)
Writes the quant rule table for the raster map.
int Rast_output_window_cols(void)
Number of columns in active output window.
double Rast_row_to_northing(double, const struct Cell_head *)
Row to northing.
int Rast_has_band_reference(const char *, const char *)
Check if band reference for raster map exists.