GRASS 8 Programmer's Manual 8.6.0dev(2026)-4bb960b182
Loading...
Searching...
No Matches
output2d.c
Go to the documentation of this file.
1/*!
2 * \file output2d.c
3 *
4 * \author H. Mitasova, I. Kosinovsky, D. Gerdesm, Summer 1992 (original
5 * authors) \author modified by McCauley in August 1995 \author modified by
6 * Mitasova in August 1995 \author modified by Mitasova in August 1999 (fix for
7 * elev color) \author modified by Brown in September 1999 (fix for Timestamps)
8 * \author modified by Mitasova in Nov. 1999 (write given tension into hist)
9 *
10 * SPDX-FileCopyrightText: 1992-2006 Helena Mitasova
11 * SPDX-FileCopyrightText: GRASS Development Team
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 */
14
15#include <stdio.h>
16#include <math.h>
17#include <errno.h>
18
19#include <grass/gis.h>
20#include <grass/raster.h>
21#include <grass/bitmap.h>
22#include <grass/linkm.h>
23#include <grass/interpf.h>
24#include <grass/glocale.h>
25
26#define MULT 100000
27
28static void do_history(const char *name, int vect, const char *input,
29 const struct interp_params *params)
30{
31 struct History hist;
32
33 Rast_short_history(name, "raster", &hist);
34 if (params->elev)
35 Rast_append_format_history(&hist, "The elevation map is %s",
36 params->elev);
37 Rast_format_history(&hist, HIST_DATSRC_1, "%s %s",
38 vect ? "vector map" : "site file", input);
39
42 if (params->ts)
44
45 Rast_free_history(&hist);
46}
47
48/*!
49 * Creates output files as well as history files and color tables for them.
50 *
51 * *ertot* can be also called *RMS deviation of the interpolated surface*.
52 */
53int IL_output_2d(struct interp_params *params,
54 struct Cell_head *cellhd, /*!< current region */
55 double zmin, double zmax, /*!< min,max input z-values */
56 double zminac, double zmaxac, double c1min,
57 double c1max, /*!< min,max interpolated values */
58 double c2min, double c2max, double gmin G_UNUSED,
59 double gmax G_UNUSED,
60 double ertot, /*!< total interpolating func. error */
61 char *input, /*!< input file name */
62 double dnorm, /*!< normalization factor */
63 int dtens, int vect, int n_points)
64{
65 FCELL *cell1;
66 int cf1 = -1, cf2 = -1, cf3 = -1, cf4 = -1, cf5 = -1, cf6 = -1;
67 int nrows, ncols;
68 int i;
69 double zstep;
71 struct Colors colors;
72 struct History hist;
73 char *type;
74 const char *mapset = NULL;
75 int cond1, cond2;
77 CELL val1, val2;
78
79 cond2 = ((params->pcurv != NULL) || (params->tcurv != NULL) ||
80 (params->mcurv != NULL));
81 cond1 = ((params->slope != NULL) || (params->aspect != NULL) || cond2);
82
83 Rast_set_window(cellhd);
84
86
87 /*
88 * G_set_embedded_null_value_mode(1);
89 */
90 if (params->elev)
91 cf1 = Rast_open_new(params->elev, FCELL_TYPE);
92
93 if (params->slope)
95
96 if (params->aspect)
98
99 if (params->pcurv)
100 cf4 = Rast_open_new(params->pcurv, FCELL_TYPE);
101
102 if (params->tcurv)
103 cf5 = Rast_open_new(params->tcurv, FCELL_TYPE);
104
105 if (params->mcurv)
106 cf6 = Rast_open_new(params->mcurv, FCELL_TYPE);
107
108 nrows = cellhd->rows;
109 if (nrows != params->nsizr) {
110 G_warning(_("First change your rows number to nsizr! %d %d"), nrows,
111 params->nsizr);
112 return -1;
113 }
114
115 ncols = cellhd->cols;
116 if (ncols != params->nsizc) {
117 G_warning(_("First change your cols number to nsizc %d %d"), ncols,
118 params->nsizc);
119 return -1;
120 }
121
122 if (params->elev != NULL) {
123 G_fseek(params->Tmp_fd_z, 0L, 0); /* seek to the beginning */
124 for (i = 0; i < params->nsizr; i++) {
125 /* seek to the right row */
126 G_fseek(params->Tmp_fd_z,
127 (off_t)(params->nsizr - 1 - i) * params->nsizc *
128 sizeof(FCELL),
129 0);
130 if (fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_z) !=
131 (size_t)params->nsizc)
132 G_fatal_error(_("RST library temporary file reading error: %s"),
133 strerror(errno));
135 }
136 }
137
138 if (params->slope != NULL) {
139 G_fseek(params->Tmp_fd_dx, 0L, 0); /* seek to the beginning */
140 for (i = 0; i < params->nsizr; i++) {
141 /* seek to the right row */
142 G_fseek(params->Tmp_fd_dx,
143 (off_t)(params->nsizr - 1 - i) * params->nsizc *
144 sizeof(FCELL),
145 0);
146 if (fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_dx) !=
147 (size_t)params->nsizc)
148 G_fatal_error(_("RST library temporary file reading error: %s"),
149 strerror(errno));
151 }
152 }
153
154 if (params->aspect != NULL) {
155 G_fseek(params->Tmp_fd_dy, 0L, 0); /* seek to the beginning */
156 for (i = 0; i < params->nsizr; i++) {
157 /* seek to the right row */
158 G_fseek(params->Tmp_fd_dy,
159 (off_t)(params->nsizr - 1 - i) * params->nsizc *
160 sizeof(FCELL),
161 0);
162 if (fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_dy) !=
163 (size_t)params->nsizc)
164 G_fatal_error(_("RST library temporary file reading error: %s"),
165 strerror(errno));
167 }
168 }
169
170 if (params->pcurv != NULL) {
171 G_fseek(params->Tmp_fd_xx, 0L, 0); /* seek to the beginning */
172 for (i = 0; i < params->nsizr; i++) {
173 /* seek to the right row */
174 G_fseek(params->Tmp_fd_xx,
175 (off_t)(params->nsizr - 1 - i) * params->nsizc *
176 sizeof(FCELL),
177 0);
178 if (fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_xx) !=
179 (size_t)params->nsizc)
180 G_fatal_error(_("RST library temporary file reading error: %s"),
181 strerror(errno));
183 }
184 }
185
186 if (params->tcurv != NULL) {
187 G_fseek(params->Tmp_fd_yy, 0L, 0); /* seek to the beginning */
188 for (i = 0; i < params->nsizr; i++) {
189 /* seek to the right row */
190 G_fseek(params->Tmp_fd_yy,
191 (off_t)(params->nsizr - 1 - i) * params->nsizc *
192 sizeof(FCELL),
193 0);
194 if (fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_yy) !=
195 (size_t)params->nsizc)
196 G_fatal_error(_("RST library temporary file reading error: %s"),
197 strerror(errno));
199 }
200 }
201
202 if (params->mcurv != NULL) {
203 G_fseek(params->Tmp_fd_xy, 0L, 0); /* seek to the beginning */
204 for (i = 0; i < params->nsizr; i++) {
205 /* seek to the right row */
206 G_fseek(params->Tmp_fd_xy,
207 (off_t)(params->nsizr - 1 - i) * params->nsizc *
208 sizeof(FCELL),
209 0);
210 if (fread(cell1, sizeof(FCELL), params->nsizc, params->Tmp_fd_xy) !=
211 (size_t)params->nsizc)
212 G_fatal_error(_("RST library temporary file reading error: %s"),
213 strerror(errno));
215 }
216 }
217
218 if (cf1 >= 0)
220 if (cf2 >= 0)
222 if (cf3 >= 0)
224 if (cf4 >= 0)
226 if (cf5 >= 0)
228 if (cf6 >= 0)
230
231 /* colortable for elevations */
232 Rast_init_colors(&colors);
233 zstep = (FCELL)(zmaxac - zminac) / 5.;
234 for (i = 1; i <= 5; i++) {
235 data1 = (FCELL)(zminac + (i - 1) * zstep);
236 data2 = (FCELL)(zminac + i * zstep);
237 switch (i) {
238 case 1:
239 Rast_add_f_color_rule(&data1, 0, 191, 191, &data2, 0, 255, 0,
240 &colors);
241 break;
242 case 2:
243 Rast_add_f_color_rule(&data1, 0, 255, 0, &data2, 255, 255, 0,
244 &colors);
245 break;
246 case 3:
247 Rast_add_f_color_rule(&data1, 255, 255, 0, &data2, 255, 127, 0,
248 &colors);
249 break;
250 case 4:
251 Rast_add_f_color_rule(&data1, 255, 127, 0, &data2, 191, 127, 63,
252 &colors);
253 break;
254 case 5:
255 Rast_add_f_color_rule(&data1, 191, 127, 63, &data2, 200, 200, 200,
256 &colors);
257 break;
258 }
259 }
260
261 if (params->elev != NULL) {
262 mapset = G_find_file("cell", params->elev, "");
263 if (mapset == NULL) {
264 G_warning(_("Raster map <%s> not found"), params->elev);
265 return -1;
266 }
267 Rast_write_colors(params->elev, mapset, &colors);
268 Rast_quantize_fp_map_range(params->elev, mapset, (DCELL)zminac - 0.5,
269 (DCELL)zmaxac + 0.5, (CELL)(zminac - 0.5),
270 (CELL)(zmaxac + 0.5));
271 }
272
273 /* colortable for slopes */
274 if (cond1) {
275 if (!params->deriv) {
276 /*
277 * smin = (CELL) ((int)(gmin*scig)); smax = (CELL) gmax; fprintf
278 * (stderr, "min %d max %d \n", smin,smax); Rast_make_rainbow_colors
279 * (&colors,smin,smax);
280 */
281 Rast_init_colors(&colors);
282 val1 = 0;
283 val2 = 2;
284 Rast_add_c_color_rule(&val1, 255, 255, 255, &val2, 255, 255, 0,
285 &colors);
286 val1 = 2;
287 val2 = 5;
288 Rast_add_c_color_rule(&val1, 255, 255, 0, &val2, 0, 255, 0,
289 &colors);
290 val1 = 5;
291 val2 = 10;
292 Rast_add_c_color_rule(&val1, 0, 255, 0, &val2, 0, 255, 255,
293 &colors);
294 val1 = 10;
295 val2 = 15;
296 Rast_add_c_color_rule(&val1, 0, 255, 255, &val2, 0, 0, 255,
297 &colors);
298 val1 = 15;
299 val2 = 30;
300 Rast_add_c_color_rule(&val1, 0, 0, 255, &val2, 255, 0, 255,
301 &colors);
302 val1 = 30;
303 val2 = 50;
304 Rast_add_c_color_rule(&val1, 255, 0, 255, &val2, 255, 0, 0,
305 &colors);
306 val1 = 50;
307 val2 = 90;
308 Rast_add_c_color_rule(&val1, 255, 0, 0, &val2, 0, 0, 0, &colors);
309 }
310 else {
311 Rast_init_colors(&colors);
312 dat1 = (FCELL)-5.0; /* replace by min dx, amin1 (c1min,
313 * c2min); */
314 dat2 = (FCELL)-0.1;
315 Rast_add_f_color_rule(&dat1, 127, 0, 255, &dat2, 0, 0, 255,
316 &colors);
317 dat1 = dat2;
318 dat2 = (FCELL)-0.01;
319 Rast_add_f_color_rule(&dat1, 0, 0, 255, &dat2, 0, 127, 255,
320 &colors);
321 dat1 = dat2;
322 dat2 = (FCELL)-0.001;
323 Rast_add_f_color_rule(&dat1, 0, 127, 255, &dat2, 0, 255, 255,
324 &colors);
325 dat1 = dat2;
326 dat2 = (FCELL)0.0;
327 Rast_add_f_color_rule(&dat1, 0, 255, 255, &dat2, 200, 255, 200,
328 &colors);
329 dat1 = dat2;
330 dat2 = (FCELL)0.001;
331 Rast_add_f_color_rule(&dat1, 200, 255, 200, &dat2, 255, 255, 0,
332 &colors);
333 dat1 = dat2;
334 dat2 = (FCELL)0.01;
335 Rast_add_f_color_rule(&dat1, 255, 255, 0, &dat2, 255, 127, 0,
336 &colors);
337 dat1 = dat2;
338 dat2 = (FCELL)0.1;
339 Rast_add_f_color_rule(&dat1, 255, 127, 0, &dat2, 255, 0, 0,
340 &colors);
341 dat1 = dat2;
342 dat2 = (FCELL)5.0; /* replace by max dx, amax1 (c1max,
343 * c2max); */
344 Rast_add_f_color_rule(&dat1, 255, 0, 0, &dat2, 255, 0, 200,
345 &colors);
346 }
347
348 if (params->slope != NULL) {
349 mapset = G_find_file("cell", params->slope, "");
350 if (mapset == NULL) {
351 G_warning(_("Raster map <%s> not found"), params->slope);
352 return -1;
353 }
354 Rast_write_colors(params->slope, mapset, &colors);
355 Rast_quantize_fp_map_range(params->slope, mapset, 0., 90., 0, 90);
356
357 do_history(params->slope, vect, input, params);
358 }
359
360 /* colortable for aspect */
361 if (!params->deriv) {
362 Rast_init_colors(&colors);
363 val1 = 0;
364 val2 = 0;
365 Rast_add_c_color_rule(&val1, 255, 255, 255, &val2, 255, 255, 255,
366 &colors);
367 val1 = 1;
368 val2 = 90;
369 Rast_add_c_color_rule(&val1, 255, 255, 0, &val2, 0, 255, 0,
370 &colors);
371 val1 = 90;
372 val2 = 180;
373 Rast_add_c_color_rule(&val1, 0, 255, 0, &val2, 0, 255, 255,
374 &colors);
375 val1 = 180;
376 val2 = 270;
377 Rast_add_c_color_rule(&val1, 0, 255, 255, &val2, 255, 0, 0,
378 &colors);
379 val1 = 270;
380 val2 = 360;
381 Rast_add_c_color_rule(&val1, 255, 0, 0, &val2, 255, 255, 0,
382 &colors);
383 }
384 else {
385 Rast_init_colors(&colors);
386 dat1 = (FCELL)-5.0; /* replace by min dy, amin1 (c1min,
387 * c2min); */
388 dat2 = (FCELL)-0.1;
389 Rast_add_f_color_rule(&dat1, 127, 0, 255, &dat2, 0, 0, 255,
390 &colors);
391 dat1 = dat2;
392 dat2 = (FCELL)-0.01;
393 Rast_add_f_color_rule(&dat1, 0, 0, 255, &dat2, 0, 127, 255,
394 &colors);
395 dat1 = dat2;
396 dat2 = (FCELL)-0.001;
397 Rast_add_f_color_rule(&dat1, 0, 127, 255, &dat2, 0, 255, 255,
398 &colors);
399 dat1 = dat2;
400 dat2 = (FCELL)0.0;
401 Rast_add_f_color_rule(&dat1, 0, 255, 255, &dat2, 200, 255, 200,
402 &colors);
403 dat1 = dat2;
404 dat2 = (FCELL)0.001;
405 Rast_add_f_color_rule(&dat1, 200, 255, 200, &dat2, 255, 255, 0,
406 &colors);
407 dat1 = dat2;
408 dat2 = (FCELL)0.01;
409 Rast_add_f_color_rule(&dat1, 255, 255, 0, &dat2, 255, 127, 0,
410 &colors);
411 dat1 = dat2;
412 dat2 = (FCELL)0.1;
413 Rast_add_f_color_rule(&dat1, 255, 127, 0, &dat2, 255, 0, 0,
414 &colors);
415 dat1 = dat2;
416 dat2 = (FCELL)5.0; /* replace by max dy, amax1 (c1max,
417 * c2max); */
418 Rast_add_f_color_rule(&dat1, 255, 0, 0, &dat2, 255, 0, 200,
419 &colors);
420 }
421
422 if (params->aspect != NULL) {
423 mapset = G_find_file("cell", params->aspect, "");
424 if (mapset == NULL) {
425 G_warning(_("Raster map <%s> not found"), params->aspect);
426 return -1;
427 }
428 Rast_write_colors(params->aspect, mapset, &colors);
429 Rast_quantize_fp_map_range(params->aspect, mapset, 0., 360., 0,
430 360);
431
432 do_history(params->aspect, vect, input, params);
433 }
434
435 /* colortable for curvatures */
436 if (cond2) {
437 Rast_init_colors(&colors);
438 dat1 = (FCELL)amin1(c1min, c2min); /* for derivatives use min
439 * dxx,dyy,dxy */
440 dat2 = (FCELL)-0.01;
441 Rast_add_f_color_rule(&dat1, 127, 0, 255, &dat2, 0, 0, 255,
442 &colors);
443 dat1 = dat2;
444 dat2 = (FCELL)-0.001;
445 Rast_add_f_color_rule(&dat1, 0, 0, 255, &dat2, 0, 127, 255,
446 &colors);
447 dat1 = dat2;
448 dat2 = (FCELL)-0.00001;
449 Rast_add_f_color_rule(&dat1, 0, 127, 255, &dat2, 0, 255, 255,
450 &colors);
451 dat1 = dat2;
452 dat2 = (FCELL)0.0;
453 Rast_add_f_color_rule(&dat1, 0, 255, 255, &dat2, 200, 255, 200,
454 &colors);
455 dat1 = dat2;
456 dat2 = (FCELL)0.00001;
457 Rast_add_f_color_rule(&dat1, 200, 255, 200, &dat2, 255, 255, 0,
458 &colors);
459 dat1 = dat2;
460 dat2 = (FCELL)0.001;
461 Rast_add_f_color_rule(&dat1, 255, 255, 0, &dat2, 255, 127, 0,
462 &colors);
463 dat1 = dat2;
464 dat2 = (FCELL)0.01;
465 Rast_add_f_color_rule(&dat1, 255, 127, 0, &dat2, 255, 0, 0,
466 &colors);
467 dat1 = dat2;
468 dat2 = (FCELL)amax1(c1max, c2max); /* for derivatives use max
469 * dxx,dyy,dxy */
470 Rast_add_f_color_rule(&dat1, 255, 0, 0, &dat2, 255, 0, 200,
471 &colors);
472
473 if (params->pcurv != NULL) {
474 mapset = G_find_file("cell", params->pcurv, "");
475 if (mapset == NULL) {
476 G_warning(_("Raster map <%s> not found"), params->pcurv);
477 return -1;
478 }
479 Rast_write_colors(params->pcurv, mapset, &colors);
480 Rast_quantize_fp_map_range(params->pcurv, mapset, dat1, dat2,
481 (CELL)(dat1 * MULT),
482 (CELL)(dat2 * MULT));
483
484 do_history(params->pcurv, vect, input, params);
485 }
486
487 if (params->tcurv != NULL) {
488 mapset = G_find_file("cell", params->tcurv, "");
489 if (mapset == NULL) {
490 G_warning(_("Raster map <%s> not found"), params->tcurv);
491 return -1;
492 }
493 Rast_write_colors(params->tcurv, mapset, &colors);
494 Rast_quantize_fp_map_range(params->tcurv, mapset, dat1, dat2,
495 (CELL)(dat1 * MULT),
496 (CELL)(dat2 * MULT));
497
498 do_history(params->tcurv, vect, input, params);
499 }
500
501 if (params->mcurv != NULL) {
502 mapset = G_find_file("cell", params->mcurv, "");
503 if (mapset == NULL) {
504 G_warning(_("Raster map <%s> not found"), params->mcurv);
505 return -1;
506 }
507 Rast_write_colors(params->mcurv, mapset, &colors);
508 Rast_quantize_fp_map_range(params->mcurv, mapset, dat1, dat2,
509 (CELL)(dat1 * MULT),
510 (CELL)(dat2 * MULT));
511
512 do_history(params->mcurv, vect, input, params);
513 }
514 }
515 }
516
517 if (params->elev != NULL) {
518 mapset = G_find_file("cell", params->elev, "");
519 if (mapset == NULL) {
520 G_warning(_("Raster map <%s> not found"), params->elev);
521 return -1;
522 }
523 type = "raster";
524 Rast_short_history(params->elev, type, &hist);
525
526 params->dmin = sqrt(params->dmin);
527
528 /*
529 * sprintf (hist.edhist[0], "tension=%f, smoothing=%f", params->fi *
530 * dnorm / 1000., params->rsm);
531 */
532
533 if (dtens) {
534 if (params->rsm == -1)
536 &hist, "giventension=%f, smoothing att=%d",
537 params->fi * 1000. / dnorm, params->smatt);
538 else
540 &hist, "giventension=%f, smoothing=%f",
541 params->fi * 1000. / dnorm, params->rsm);
542 }
543 else {
544 if (params->rsm == -1)
546 &hist, "tension=%f, smoothing att=%d",
547 params->fi * 1000. / dnorm, params->smatt);
548 else
549 Rast_append_format_history(&hist, "tension=%f, smoothing=%f",
550 params->fi, params->rsm);
551 }
552
553 Rast_append_format_history(&hist, "dnorm=%f, dmin=%f, zmult=%f", dnorm,
554 params->dmin, params->zmult);
555 /*
556 * sprintf(hist.edhist[2], "segmax=%d, npmin=%d, errtotal=%f",
557 * params->kmax,params->kmin,ertot);
558 */
559 /*
560 * sprintf (hist.edhist[2], "segmax=%d, npmin=%d, errtotal =%f",
561 * params->kmax, params->kmin, sqrt (ertot) / n_points);
562 */
563
564 Rast_append_format_history(&hist, "segmax=%d, npmin=%d, rmsdevi=%f",
565 params->kmax, params->kmin,
566 sqrt(ertot / n_points));
567
568 Rast_append_format_history(&hist, "zmin_data=%f, zmax_data=%f", zmin,
569 zmax);
570 Rast_append_format_history(&hist, "zmin_int=%f, zmax_int=%f", zminac,
571 zmaxac);
572
573 if ((params->theta) && (params->scalex))
574 Rast_append_format_history(&hist, "theta=%f, scalex=%f",
575 params->theta, params->scalex);
576
577 Rast_format_history(&hist, HIST_DATSRC_1, "%s %s",
578 vect ? "vector map" : "site file", input);
579
581 Rast_write_history(params->elev, &hist);
582 if (params->ts)
583 G_write_raster_timestamp(params->elev, params->ts);
584
585 Rast_free_history(&hist);
586 }
587
588 /*
589 * if (title) Rast_put_cell_title (output, title);
590 */
591 return 1;
592}
#define NULL
Definition ccmath.h:32
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_warning(const char *,...) __attribute__((format(printf
int G_write_raster_timestamp(const char *, const struct TimeStamp *)
Write timestamp of raster map.
Definition timestamp.c:389
const char * G_find_file(const char *, char *, const char *)
Searches for a file from the mapset search list or in a specified mapset.
Definition find_file.c:182
void G_fseek(FILE *, off_t, int)
Change the file position of the stream.
Definition gis/seek.c:48
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.
Definition quant_rw.c:121
FCELL * Rast_allocate_f_buf(void)
Allocates memory for a raster map of type FCELL.
Definition alloc_cell.c:91
void Rast_format_history(struct History *, int, const char *,...)
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)
Definition color_rule.c:55
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)
Definition color_rule.c:74
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.
int Rast_open_new(const char *, RASTER_MAP_TYPE)
Opens a new raster map.
void Rast_init_colors(struct Colors *)
Initialize color structure.
Definition color_init.c:23
void Rast_short_history(const char *, const char *, struct History *)
Initialize history structure.
void Rast_set_window(struct Cell_head *)
Establishes 'window' as the current working window.
int Rast_command_history(struct History *)
Save command line to raster history structure.
void Rast_write_colors(const char *, const char *, struct Colors *)
Write map layer color table.
void Rast_free_history(struct History *)
float FCELL
Definition gis.h:633
#define G_UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.
Definition gis.h:43
double DCELL
Definition gis.h:632
int CELL
Definition gis.h:631
#define _(str)
Definition glocale.h:10
double amin1(double, double)
Definition minmax.c:68
double amax1(double, double)
Definition minmax.c:55
const char * name
Definition named_colr.c:6
int IL_output_2d(struct interp_params *params, struct Cell_head *cellhd, 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, int dtens, int vect, int n_points)
Definition output2d.c:53
#define MULT
Definition output2d.c:26
@ HIST_DATSRC_1
Description of original data source (two lines)
Definition raster.h:162
#define FCELL_TYPE
Definition raster.h:12
2D/3D raster map header (used also for region)
Definition gis.h:443
int rows
Number of rows for 2D data.
Definition gis.h:458
int cols
Number of columns for 2D data.
Definition gis.h:462
Definition gis.h:689
Raster history info (metadata)
Definition raster.h:172
double zmult
Definition interpf.h:72
FILE * Tmp_fd_xx
Definition interpf.h:123
FILE * Tmp_fd_xy
Definition interpf.h:123
char * pcurv
Definition interpf.h:107
FILE * Tmp_fd_yy
Definition interpf.h:123
double fi
Definition interpf.h:97
double theta
Definition interpf.h:116
double rsm
Definition interpf.h:105
FILE * Tmp_fd_dx
Definition interpf.h:123
FILE * Tmp_fd_z
Definition interpf.h:123
double dmin
Definition interpf.h:110
char * tcurv
Definition interpf.h:107
double scalex
Definition interpf.h:119
struct TimeStamp * ts
Definition interpf.h:121
char * mcurv
Definition interpf.h:107
FILE * Tmp_fd_dy
Definition interpf.h:123
char * aspect
Definition interpf.h:107
char * elev
Definition interpf.h:107
char * slope
Definition interpf.h:107