23#include <grass/interpf.h>
28static void do_history(
const char *
name,
const char *input,
55 char *smooth,
int n_points)
82 _(
"Temporarily changing the region to desired resolution..."));
107 if (nrows != params->
nsizr) {
108 G_warning(
_(
"First change your rows number(%d) to %d"), nrows,
114 if (ncols != params->
nsizc) {
115 G_warning(
_(
"First change your columns number(%d) to %d"), ncols,
122 for (i = 0; i < params->
nsizr; i++) {
129 (
size_t)params->
nsizc)
138 for (i = 0; i < params->
nsizr; i++) {
145 (
size_t)params->
nsizc)
154 for (i = 0; i < params->
nsizr; i++) {
161 (
size_t)params->
nsizc)
170 for (i = 0; i < params->
nsizr; i++) {
177 (
size_t)params->
nsizc)
186 for (i = 0; i < params->
nsizr; i++) {
193 (
size_t)params->
nsizc)
202 for (i = 0; i < params->
nsizr; i++) {
209 (
size_t)params->
nsizc)
235 G_warning(
_(
"Raster map <%s> not found"), input);
250 for (; rule; rule = rule->
prev) {
254 &
value1, rule->low.red, rule->low.grn, rule->low.blu,
260 if (colors.
fixed.rules) {
261 rule = colors.
fixed.rules;
266 for (; rule; rule = rule->
prev) {
289 G_warning(
_(
"No color table for input raster map -- will not "
290 "create color table"));
329 do_history(params->
slope, input, params);
362 do_history(params->
aspect, input, params);
414 do_history(params->
pcurv, input, params);
429 do_history(params->
tcurv, input, params);
444 do_history(params->
mcurv, input, params);
459 params->
fi * 1000. / (*
dnorm), smooth);
462 params->
fi * 1000. / (*
dnorm));
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_warning(const char *,...) __attribute__((format(printf
const char * G_find_file(const char *, char *, const char *)
Searches for a file from the mapset search list or in a specified mapset.
void G_fseek(FILE *, off_t, int)
Change the file position of the stream.
void void G_verbose_message(const char *,...) __attribute__((format(printf
const char * G_find_file2(const char *, const char *, const char *)
Searches for a file from the mapset search list or in a specified mapset. (look but don't touch)
const char * G_mapset(void)
Get current mapset name.
void Rast_set_output_window(struct Cell_head *)
Establishes 'window' as the current working window for output.
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)
int Rast_read_colors(const char *, const char *, struct Colors *)
Read color table of raster map.
void Rast_close(int)
Close a raster map.
void Rast_quantize_fp_map_range(const char *, const char *, DCELL, DCELL, CELL, CELL)
Write quant rules (f_quant) for floating-point raster map.
void Rast_format_history(struct History *, int, const char *,...)
FCELL * Rast_allocate_f_output_buf(void)
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)
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)
void Rast_put_f_row(int, const FCELL *)
Writes the next row for fcell file (FCELL version)
void Rast_write_history(const char *, struct History *)
Write raster history file.
void Rast_append_format_history(struct History *, const char *,...)
Append a formatted string to a History structure.
void Rast_init_colors(struct Colors *)
Initialize color structure.
void Rast_short_history(const char *, const char *, struct History *)
Initialize history structure.
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_write_colors(const char *, const char *, struct Colors *)
Write map layer color table.
int Rast_open_fp_new(const char *)
Opens new fcell file in a database.
void Rast_free_history(struct History *)
#define G_UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.
double amin1(double, double)
double amax1(double, double)
@ HIST_DATSRC_1
Description of original data source (two lines)
int IL_resample_output_2d(struct interp_params *params, double zmin, double zmax, double zminac, double zmaxac, double c1min, double c1max, double c2min, double c2max, double gmin, double gmax, double ertot, char *input, double *dnorm, struct Cell_head *outhd, struct Cell_head *winhd, char *smooth, int n_points)
2D/3D raster map header (used also for region)
struct _Color_Info_ fixed
struct _Color_Info_ modular
Raster history info (metadata)
struct _Color_Rule_ * prev
struct _Color_Rule_ * next
struct _Color_Value_ low high