GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
defs/raster.h
Go to the documentation of this file.
1 #ifndef GRASS_RASTERDEFS_H
2 #define GRASS_RASTERDEFS_H
3 
4 #include <grass/gis.h>
5 
6 /* --- ANSI prototypes for the lib/raster functions --- */
7 
8 /* align_window.c */
9 void Rast_align_window(struct Cell_head *, const struct Cell_head *);
10 
11 /* alloc_cell.c */
17 char *Rast_allocate_null_buf(void);
18 unsigned char *Rast__allocate_null_bits(int);
20 
26 
32 
33 /* auto_mask.c */
35 void Rast_suppress_masking(void);
36 void Rast_unsuppress_masking(void);
37 
38 /* cats.c */
39 int Rast_read_cats(const char *, const char *, struct Categories *);
40 int Rast_read_vector_cats(const char *, const char *, struct Categories *);
41 CELL Rast_get_max_c_cat(const char *, const char *);
42 char *Rast_get_cats_title(const struct Categories *);
43 char *Rast_get_c_cat(CELL *, struct Categories *);
44 char *Rast_get_f_cat(FCELL *, struct Categories *);
45 char *Rast_get_d_cat(DCELL *, struct Categories *);
46 char *Rast_get_cat(void *, struct Categories *, RASTER_MAP_TYPE);
47 void Rast_unmark_cats(struct Categories *);
48 void Rast_mark_c_cats(const CELL *, int, struct Categories *);
49 void Rast_mark_f_cats(const FCELL *, int, struct Categories *);
50 void Rast_mark_d_cats(const DCELL *, int, struct Categories *);
51 int Rast_mark_cats(const void *, int, struct Categories *, RASTER_MAP_TYPE);
52 void Rast_rewind_cats(struct Categories *);
54  long *);
55 char *Rast_get_next_marked_c_cat(struct Categories *, CELL *, CELL *,
56  long *);
58  long *);
59 char *Rast_get_next_marked_cat(struct Categories *, void *, void *,
60  long *, RASTER_MAP_TYPE);
61 int Rast_set_c_cat(const CELL *, const CELL *, const char *, struct Categories *);
62 int Rast_set_f_cat(const FCELL *, const FCELL *, const char *, struct Categories *);
63 int Rast_set_d_cat(const DCELL *, const DCELL *, const char *, struct Categories *);
64 int Rast_set_cat(const void *, const void *, const char *, struct Categories *,
66 void Rast_write_cats(const char *, struct Categories *);
67 void Rast_write_vector_cats(const char *, struct Categories *);
68 char *Rast_get_ith_d_cat(const struct Categories *, int, DCELL *,
69  DCELL *);
70 char *Rast_get_ith_f_cat(const struct Categories *, int, void *, void *);
71 char *Rast_get_ith_c_cat(const struct Categories *, int, void *, void *);
72 char *Rast_get_ith_cat(const struct Categories *, int, void *, void *,
74 void Rast_init_cats(const char *, struct Categories *);
75 void Rast_set_cats_title(const char *, struct Categories *);
76 void Rast_set_cats_fmt(const char *, double, double, double, double,
77  struct Categories *);
78 void Rast_free_cats(struct Categories *);
79 void Rast_copy_cats(struct Categories *, const struct Categories *);
80 int Rast_number_of_cats(struct Categories *);
81 int Rast_sort_cats(struct Categories *);
82 
83 /* cell_stats.c */
84 void Rast_init_cell_stats(struct Cell_stats *);
85 int Rast_update_cell_stats(const CELL *, int, struct Cell_stats *);
86 int Rast_find_cell_stat(CELL, long *, const struct Cell_stats *);
88 int Rast_next_cell_stat(CELL *, long *, struct Cell_stats *);
89 void Rast_get_stats_for_null_value(long *, const struct Cell_stats *);
90 void Rast_free_cell_stats(struct Cell_stats *);
91 
92 /* cell_title.c */
93 char *Rast_get_cell_title(const char *, const char *);
94 
95 /* cellstats_eq.c */
97  void (*)(CELL, CELL, CELL));
98 
99 /* close.c */
100 void Rast_close(int);
101 void Rast_unopen(int);
102 void Rast__unopen_all(void);
103 void Rast__close_null(int);
104 
105 /* color_compat.c */
106 void Rast_make_ryg_colors(struct Colors *, CELL, CELL);
107 void Rast_make_ryg_fp_colors(struct Colors *, DCELL, DCELL);
108 void Rast_make_aspect_colors(struct Colors *, CELL, CELL);
110 void Rast_make_byr_colors(struct Colors *, CELL, CELL);
111 void Rast_make_byr_fp_colors(struct Colors *, DCELL, DCELL);
112 void Rast_make_bgyr_colors(struct Colors *, CELL, CELL);
113 void Rast_make_bgyr_fp_colors(struct Colors *, DCELL, DCELL);
114 void Rast_make_byg_colors(struct Colors *, CELL, CELL);
115 void Rast_make_byg_fp_colors(struct Colors *, DCELL, DCELL);
118 void Rast_make_gyr_colors(struct Colors *, CELL, CELL);
119 void Rast_make_gyr_fp_colors(struct Colors *, DCELL, DCELL);
120 void Rast_make_rainbow_colors(struct Colors *, CELL, CELL);
122 void Rast_make_ramp_colors(struct Colors *, CELL, CELL);
123 void Rast_make_ramp_fp_colors(struct Colors *, DCELL, DCELL);
124 void Rast_make_wave_colors(struct Colors *, CELL, CELL);
125 void Rast_make_wave_fp_colors(struct Colors *, DCELL, DCELL);
126 
127 /* color_free.c */
128 void Rast_free_colors(struct Colors *);
129 void Rast__color_free_rules(struct _Color_Info_ *);
132 void Rast__color_reset(struct Colors *);
133 
134 /* color_get.c */
135 int Rast_get_color(const void *, int *, int *, int *, struct Colors *,
137 int Rast_get_c_color(const CELL *, int *, int *, int *, struct Colors *);
138 int Rast_get_f_color(const FCELL *, int *, int *, int *, struct Colors *);
139 int Rast_get_d_color(const DCELL *, int *, int *, int *, struct Colors *);
140 void Rast_get_null_value_color(int *, int *, int *, const struct Colors *);
141 void Rast_get_default_color(int *, int *, int *, const struct Colors *);
142 
143 /* color_hist.c */
144 void Rast_make_histogram_eq_colors(struct Colors *, struct Cell_stats *);
145 void Rast_make_histogram_log_colors(struct Colors *, struct Cell_stats *, int, int);
146 
147 /* color_init.c */
148 void Rast_init_colors(struct Colors *);
149 
150 /* color_insrt.c */
151 int Rast__insert_color_into_lookup(CELL, int, int, int, struct _Color_Info_ *);
152 
153 /* color_invrt.c */
154 void Rast_invert_colors(struct Colors *);
155 
156 /* color_look.c */
157 void Rast_lookup_c_colors(const CELL *, unsigned char *, unsigned char *,
158  unsigned char *, unsigned char *, int,
159  struct Colors *);
160 void Rast_lookup_colors(const void *, unsigned char *, unsigned char *,
161  unsigned char *, unsigned char *, int,
162  struct Colors *, RASTER_MAP_TYPE);
163 void Rast_lookup_f_colors(const FCELL *, unsigned char *, unsigned char *,
164  unsigned char *, unsigned char *, int,
165  struct Colors *);
166 void Rast_lookup_d_colors(const DCELL *, unsigned char *, unsigned char *,
167  unsigned char *, unsigned char *, int,
168  struct Colors *);
169 void Rast__lookup_colors(const void *, unsigned char *, unsigned char *,
170  unsigned char *, unsigned char *, int, struct Colors *,
171  int, int, RASTER_MAP_TYPE);
172 void Rast__interpolate_color_rule(DCELL, unsigned char *, unsigned char *,
173  unsigned char *, const struct _Color_Rule_ *);
174 
175 /* color_org.c */
176 void Rast__organize_colors(struct Colors *);
177 
178 /* color_out.c */
179 void Rast_print_colors(struct Colors *, DCELL, DCELL, FILE *, int);
180 
181 /* color_rand.c */
182 void Rast_make_random_colors(struct Colors *, CELL, CELL);
183 
184 /* color_range.c */
185 void Rast_set_c_color_range(CELL, CELL, struct Colors *);
186 void Rast_set_d_color_range(DCELL, DCELL, struct Colors *);
187 void Rast_get_c_color_range(CELL *, CELL *, const struct Colors *);
188 void Rast_get_d_color_range(DCELL *, DCELL *, const struct Colors *);
189 
190 /* color_read.c */
191 int Rast_read_colors(const char *, const char *, struct Colors *);
192 int Rast__read_colors(const char *, const char *, const char *, struct Colors *);
193 void Rast_mark_colors_as_fp(struct Colors *);
194 
195 /* color_remove.c */
196 int Rast_remove_colors(const char *, const char *);
197 
198 /* color_rule.c */
199 void Rast_add_d_color_rule(const DCELL *, int, int, int,
200  const DCELL *, int, int, int,
201  struct Colors *);
202 void Rast_add_f_color_rule(const FCELL *, int, int, int,
203  const FCELL *, int, int, int,
204  struct Colors *);
205 void Rast_add_c_color_rule(const CELL *, int, int, int,
206  const CELL *, int, int, int,
207  struct Colors *);
208 void Rast_add_color_rule(const void *, int, int, int,
209  const void *, int, int, int,
210  struct Colors *, RASTER_MAP_TYPE);
211 int Rast_add_modular_d_color_rule(const DCELL *, int, int, int,
212  const DCELL *, int, int, int,
213  struct Colors *);
214 int Rast_add_modular_f_color_rule(const FCELL *, int, int, int,
215  const FCELL *, int, int, int,
216  struct Colors *);
217 int Rast_add_modular_c_color_rule(const CELL *, int, int, int,
218  const CELL *, int, int, int,
219  struct Colors *);
220 int Rast_add_modular_color_rule(const void *, int, int, int,
221  const void *, int, int, int,
222  struct Colors *, RASTER_MAP_TYPE);
223 
224 /* color_rule_get.c */
225 int Rast_colors_count(const struct Colors *);
226 int Rast_get_fp_color_rule(DCELL *, unsigned char *, unsigned char *,
227  unsigned char *, DCELL *, unsigned char *,
228  unsigned char *, unsigned char *,
229  const struct Colors *, int);
230 
231 /* color_rules.c */
232 typedef int read_rule_fn(void *, DCELL, DCELL,
233  DCELL *, int *, int *, int *, int *, int *, int *);
234 int Rast_parse_color_rule(DCELL, DCELL, const char *, DCELL *, int *, int *,
235  int *, int *, int *, int *);
236 const char *Rast_parse_color_rule_error(int);
237 int Rast_read_color_rule(void *, DCELL, DCELL, DCELL *, int *, int *, int *,
238  int *, int *, int *);
239 int Rast_read_color_rules(struct Colors *, DCELL, DCELL, read_rule_fn *, void *);
240 int Rast_load_colors(struct Colors *, const char *, CELL, CELL);
241 int Rast_load_fp_colors(struct Colors *, const char *, DCELL, DCELL);
242 void Rast_make_colors(struct Colors *, const char *, CELL, CELL);
243 void Rast_make_fp_colors(struct Colors *, const char *, DCELL, DCELL);
244 
245 /* color_set.c */
246 void Rast_set_c_color(CELL, int, int, int, struct Colors *);
247 void Rast_set_d_color(DCELL, int, int, int, struct Colors *);
248 void Rast_set_null_value_color(int, int, int, struct Colors *);
249 void Rast_set_default_color(int, int, int, struct Colors *);
250 
251 /* color_shift.c */
252 void Rast_shift_c_colors(CELL, struct Colors *);
253 void Rast_shift_d_colors(DCELL, struct Colors *);
254 
255 /* color_write.c */
256 void Rast_write_colors(const char *, const char *, struct Colors *);
257 void Rast__write_colors(FILE *, struct Colors *);
258 
259 /* color_xform.c */
260 void Rast_histogram_eq_colors(struct Colors *, struct Colors *,
261  struct Cell_stats *);
262 void Rast_histogram_eq_fp_colors(struct Colors *,
263  struct Colors *, struct FP_stats *);
264 void Rast_log_colors(struct Colors *, struct Colors *, int);
265 void Rast_abs_log_colors(struct Colors *, struct Colors *, int);
266 
267 /* format.c */
268 int Rast__check_format(int);
269 int Rast__read_row_ptrs(int);
270 int Rast__read_null_row_ptrs(int, int);
271 int Rast__write_row_ptrs(int);
272 int Rast__write_null_row_ptrs(int, int);
273 
274 /* fpreclass.c */
275 void Rast_fpreclass_clear(struct FPReclass *);
276 void Rast_fpreclass_reset(struct FPReclass *);
277 void Rast_fpreclass_init(struct FPReclass *);
280 int Rast_fpreclass_get_limits(const struct FPReclass *, DCELL *, DCELL *,
281  DCELL *, DCELL *);
282 int Rast_fpreclass_nof_rules(const struct FPReclass *);
283 void Rast_fpreclass_get_ith_rule(const struct FPReclass *, int, DCELL *, DCELL *,
284  DCELL *, DCELL *);
287  DCELL *);
290  DCELL *);
294 void Rast_fpreclass_perform_di(const struct FPReclass *, const DCELL *, CELL *,
295  int);
296 void Rast_fpreclass_perform_df(const struct FPReclass *, const DCELL *, FCELL *,
297  int);
298 void Rast_fpreclass_perform_dd(const struct FPReclass *, const DCELL *, DCELL *,
299  int);
300 void Rast_fpreclass_perform_fi(const struct FPReclass *, const FCELL *, CELL *,
301  int);
302 void Rast_fpreclass_perform_ff(const struct FPReclass *, const FCELL *, FCELL *,
303  int);
304 void Rast_fpreclass_perform_fd(const struct FPReclass *, const FCELL *, DCELL *,
305  int);
306 void Rast_fpreclass_perform_ii(const struct FPReclass *, const CELL *, CELL *,
307  int);
308 void Rast_fpreclass_perform_if(const struct FPReclass *, const CELL *, FCELL *,
309  int);
310 void Rast_fpreclass_perform_id(const struct FPReclass *, const CELL *, DCELL *,
311  int);
312 /* gdal.c */
313 void Rast_init_gdal(void);
314 struct GDAL_link *Rast_get_gdal_link(const char *, const char *);
315 struct GDAL_link *Rast_create_gdal_link(const char *, RASTER_MAP_TYPE);
316 void Rast_close_gdal_link(struct GDAL_link *);
318 
319 /* get_cellhd.c */
320 void Rast_get_cellhd(const char *, const char *, struct Cell_head *);
321 
322 /* get_row.c */
323 void Rast_get_row_nomask(int, void *, int, RASTER_MAP_TYPE);
324 void Rast_get_c_row_nomask(int, CELL *, int);
325 void Rast_get_f_row_nomask(int, FCELL *, int);
326 void Rast_get_d_row_nomask(int, DCELL *, int);
327 void Rast_get_row(int, void *, int, RASTER_MAP_TYPE);
328 void Rast_get_c_row(int, CELL *, int);
329 void Rast_get_f_row(int, FCELL *, int);
330 void Rast_get_d_row(int, DCELL *, int);
331 void Rast_get_null_value_row(int, char *, int);
332 int Rast__read_null_bits(int, int, unsigned char *);
333 
334 /* get_row_colr.c */
335 void Rast_get_row_colors(int, int, struct Colors *,
336  unsigned char *, unsigned char *, unsigned char *,
337  unsigned char *);
338 /* histo_eq.c */
339 void Rast_histogram_eq(const struct Histogram *, unsigned char **,
340  CELL *, CELL *);
341 
342 /* histogram.c */
343 void Rast_init_histogram(struct Histogram *);
344 int Rast_read_histogram(const char *, const char *, struct Histogram *);
345 void Rast_write_histogram(const char *, const struct Histogram *);
346 void Rast_write_histogram_cs(const char *, struct Cell_stats *);
347 void Rast_make_histogram_cs(struct Cell_stats *, struct Histogram *);
348 int Rast_get_histogram_num(const struct Histogram *);
349 CELL Rast_get_histogram_cat(int, const struct Histogram *);
350 long Rast_get_histogram_count(int, const struct Histogram *);
351 void Rast_free_histogram(struct Histogram *);
352 int Rast_sort_histogram(struct Histogram *);
354 void Rast_remove_histogram(const char *);
355 int Rast_add_histogram(CELL, long, struct Histogram *);
356 int Rast_set_histogram(CELL, long, struct Histogram *);
357 void Rast_extend_histogram(CELL, long, struct Histogram *);
358 void Rast_zero_histogram(struct Histogram *);
359 
360 /* history.c */
361 int Rast__read_history(struct History *, FILE *);
362 int Rast_read_history(const char *, const char *, struct History *);
363 void Rast__write_history(struct History *, FILE *);
364 void Rast_write_history(const char *, struct History *);
365 void Rast_short_history(const char *, const char *, struct History *);
366 int Rast_command_history(struct History *);
367 void Rast_append_history(struct History *, const char *);
368 void Rast_append_format_history(struct History *, const char *, ...)
369  __attribute__ ((format(printf, 2, 3)));
370 const char *Rast_get_history(struct History *, int);
371 void Rast_set_history(struct History *, int, const char *);
372 void Rast_format_history(struct History *, int, const char *, ...)
373  __attribute__ ((format(printf, 3, 4)));
374 void Rast_clear_history(struct History *);
375 void Rast_free_history(struct History *);
376 int Rast_history_length(struct History *);
377 const char *Rast_history_line(struct History *, int);
378 
379 /* init.c */
380 void Rast_init(void);
381 void Rast__check_init(void);
382 void Rast_init_all(void);
383 void Rast__init(void);
384 void Rast__error_handler(void *);
385 
386 /* interp.c */
387 DCELL Rast_interp_linear(double, DCELL, DCELL);
388 DCELL Rast_interp_bilinear(double, double, DCELL, DCELL, DCELL, DCELL);
389 DCELL Rast_interp_cubic(double, DCELL, DCELL, DCELL, DCELL);
390 DCELL Rast_interp_bicubic(double, double,
391  DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
392  DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
393  DCELL);
394 DCELL Rast_interp_lanczos(double, double, DCELL *);
395 DCELL Rast_interp_cubic_bspline(double, DCELL, DCELL, DCELL, DCELL);
396 DCELL Rast_interp_bicubic_bspline(double, double,
397  DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
398  DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
399  DCELL);
400 int Rast_option_to_interp_type(const struct Option *);
401 
402 /* mask_info.c */
403 char *Rast_mask_info(void);
404 int Rast__mask_info(char *, char *);
405 
406 /* maskfd.c */
407 int Rast_maskfd(void);
408 
409 /* null_val.c */
410 #define Rast_is_c_null_value(cellVal) \
411  (*(const CELL *)(cellVal) == (CELL) 0x80000000)
412 #define Rast_is_f_null_value(fcellVal) \
413  (*(const FCELL *)(fcellVal) != *(const FCELL *)(fcellVal))
414 #define Rast_is_d_null_value(dcellVal) \
415  (*(const DCELL *)(dcellVal) != *(const DCELL *)(dcellVal))
416 
417 void Rast__set_null_value(void *, int, int, RASTER_MAP_TYPE);
418 void Rast_set_null_value(void *, int, RASTER_MAP_TYPE);
419 void Rast_set_c_null_value(CELL *, int);
420 void Rast_set_f_null_value(FCELL *, int);
421 void Rast_set_d_null_value(DCELL *, int);
422 int Rast_is_null_value(const void *, RASTER_MAP_TYPE);
423 #ifndef Rast_is_c_null_value
424 int Rast_is_c_null_value(const CELL *);
425 #endif
426 #ifndef Rast_is_f_null_value
427 int Rast_is_f_null_value(const FCELL *);
428 #endif
429 #ifndef Rast_is_d_null_value
430 int Rast_is_d_null_value(const DCELL *);
431 #endif
432 void Rast_insert_null_values(void *, char *, int, RASTER_MAP_TYPE);
433 void Rast_insert_c_null_values(CELL *, char *, int);
434 void Rast_insert_f_null_values(FCELL *, char *, int);
435 void Rast_insert_d_null_values(DCELL *, char *, int);
436 int Rast__check_null_bit(const unsigned char *, int, int);
437 void Rast__convert_01_flags(const char *, unsigned char *, int);
438 void Rast__convert_flags_01(char *, const unsigned char *, int);
439 void Rast__init_null_bits(unsigned char *, int);
440 
441 /* open.c */
442 int Rast_open_old(const char *, const char *);
443 int Rast__open_old(const char *, const char *);
444 int Rast_open_c_new(const char *);
445 int Rast_open_c_new_uncompressed(const char *);
446 void Rast_want_histogram(int);
447 void Rast_set_cell_format(int);
449 int Rast_open_fp_new(const char *);
450 int Rast_open_fp_new_uncompressed(const char *);
452 int Rast_map_is_fp(const char *, const char *);
453 RASTER_MAP_TYPE Rast_map_type(const char *, const char *);
454 RASTER_MAP_TYPE Rast__check_fp_type(const char *, const char *);
456 int Rast_open_new(const char *, RASTER_MAP_TYPE);
458 void Rast_set_quant_rules(int, struct Quant *);
459 int Rast__open_null_write(const char *);
460 
461 /* put_cellhd.c */
462 void Rast_put_cellhd(const char *, struct Cell_head *);
463 
464 /* put_row.c */
465 void Rast_put_row(int, const void *, RASTER_MAP_TYPE);
466 void Rast_put_c_row(int, const CELL *);
467 void Rast_put_f_row(int, const FCELL *);
468 void Rast_put_d_row(int, const DCELL *);
469 void Rast__write_null_bits(int, const unsigned char *);
470 
471 /* put_title.c */
472 int Rast_put_cell_title(const char *, const char *);
473 
474 /* quant.c */
475 void Rast_quant_clear(struct Quant *);
476 void Rast_quant_free(struct Quant *);
478 void Rast_quant_init(struct Quant *);
479 int Rast_quant_is_truncate(const struct Quant *);
480 int Rast_quant_is_round(const struct Quant *);
481 void Rast_quant_truncate(struct Quant *);
482 void Rast_quant_round(struct Quant *);
483 int Rast_quant_get_limits(const struct Quant *, DCELL *, DCELL *, CELL *,
484  CELL *);
485 int Rast_quant_nof_rules(const struct Quant *);
486 void Rast_quant_get_ith_rule(const struct Quant *, int, DCELL *, DCELL *, CELL *,
487  CELL *);
488 void Rast_quant_set_neg_infinite_rule(struct Quant *, DCELL, CELL);
489 int Rast_quant_get_neg_infinite_rule(const struct Quant *, DCELL *, CELL *);
490 void Rast_quant_set_pos_infinite_rule(struct Quant *, DCELL, CELL);
491 int Rast_quant_get_pos_infinite_rule(const struct Quant *, DCELL *, CELL *);
492 void Rast_quant_add_rule(struct Quant *, DCELL, DCELL, CELL, CELL);
493 void Rast_quant_reverse_rule_order(struct Quant *);
494 CELL Rast_quant_get_cell_value(struct Quant *, DCELL);
495 void Rast_quant_perform_d(struct Quant *, const DCELL *, CELL *, int);
496 void Rast_quant_perform_f(struct Quant *, const FCELL *, CELL *, int);
498  DCELL);
499 
500 /* quant_io.c */
501 int Rast__quant_import(const char *, const char *, struct Quant *);
502 int Rast__quant_export(const char *, const char *, const struct Quant *);
503 
504 /* quant_rw.c */
505 void Rast_truncate_fp_map(const char *, const char *);
506 void Rast_round_fp_map(const char *, const char *);
507 void Rast_quantize_fp_map(const char *, const char *, CELL, CELL);
508 void Rast_quantize_fp_map_range(const char *, const char *, DCELL, DCELL, CELL,
509  CELL);
510 void Rast_write_quant(const char *, const char *, const struct Quant *);
511 int Rast_read_quant(const char *, const char *, struct Quant *);
512 
513 /* range.c */
514 void Rast__remove_fp_range(const char *);
515 void Rast_construct_default_range(struct Range *);
516 int Rast_read_fp_range(const char *, const char *, struct FPRange *);
517 int Rast_read_range(const char *, const char *, struct Range *);
518 void Rast_write_range(const char *, const struct Range *);
519 void Rast_write_fp_range(const char *, const struct FPRange *);
520 void Rast_update_range(CELL, struct Range *);
521 void Rast_update_fp_range(DCELL, struct FPRange *);
522 void Rast_row_update_range(const CELL *, int, struct Range *);
523 void Rast__row_update_range(const CELL *, int, struct Range *, int);
524 void Rast_row_update_fp_range(const void *, int, struct FPRange *,
526 void Rast_init_range(struct Range *);
527 void Rast_get_range_min_max(const struct Range *, CELL *, CELL *);
528 void Rast_init_fp_range(struct FPRange *);
529 void Rast_get_fp_range_min_max(const struct FPRange *, DCELL *, DCELL *);
530 
531 int Rast_read_rstats(const char *, const char *, struct R_stats *);
532 void Rast_write_rstats(const char *, const struct R_stats *);
533 
534 /* raster.c */
535 int Rast_raster_cmp(const void *, const void *, RASTER_MAP_TYPE);
536 void Rast_raster_cpy(void *, const void *, int, RASTER_MAP_TYPE);
537 void Rast_set_c_value(void *, CELL, RASTER_MAP_TYPE);
538 void Rast_set_f_value(void *, FCELL, RASTER_MAP_TYPE);
539 void Rast_set_d_value(void *, DCELL, RASTER_MAP_TYPE);
540 CELL Rast_get_c_value(const void *, RASTER_MAP_TYPE);
541 FCELL Rast_get_f_value(const void *, RASTER_MAP_TYPE);
542 DCELL Rast_get_d_value(const void *, RASTER_MAP_TYPE);
543 
544 /* raster_metadata.c */
545 char *Rast_read_units(const char *, const char *);
546 char *Rast_read_vdatum(const char *, const char *);
547 char *Rast_read_semantic_label(const char *, const char *);
548 char *Rast_get_semantic_label_or_name(const char *, const char *);
549 void Rast_write_units(const char *, const char *);
550 void Rast_write_vdatum(const char *, const char *);
551 void Rast_write_semantic_label(const char *, const char *);
552 bool Rast_legal_semantic_label(const char *);
553 
554 /* rast_to_img_string.c */
555 int Rast_map_to_img_str(char *, int, unsigned char*);
556 
557 /* reclass.c */
558 int Rast_is_reclass(const char *, const char *, char *, char *);
559 int Rast_is_reclassed_to(const char *, const char *, int *, char ***);
560 int Rast_get_reclass(const char *, const char *, struct Reclass *);
561 void Rast_free_reclass(struct Reclass *);
562 int Rast_put_reclass(const char *, const struct Reclass *);
563 
564 /* sample.c */
565 DCELL Rast_get_sample_nearest(int, const struct Cell_head *, struct Categories *, double, double, int);
566 DCELL Rast_get_sample_bilinear(int, const struct Cell_head *, struct Categories *, double, double, int);
567 DCELL Rast_get_sample_cubic(int, const struct Cell_head *, struct Categories *, double, double, int);
568 DCELL Rast_get_sample(int, const struct Cell_head *, struct Categories *, double, double, int, INTERP_TYPE);
569 
570 /* set_window.c */
571 void Rast__init_window(void);
572 void Rast_set_window(struct Cell_head *);
573 void Rast_unset_window(void);
574 void Rast_set_output_window(struct Cell_head *);
575 void Rast_set_input_window(struct Cell_head *);
576 
577 /* vrt.c */
578 struct R_vrt *Rast_get_vrt(const char *, const char *);
579 void Rast_close_vrt(struct R_vrt *);
580 int Rast_get_vrt_row(int, void *, int, RASTER_MAP_TYPE);
581 
582 /* window.c */
583 void Rast_get_window(struct Cell_head *);
584 void Rast_get_input_window(struct Cell_head *);
585 void Rast_get_output_window(struct Cell_head *);
586 int Rast_window_rows(void);
587 int Rast_window_cols(void);
588 int Rast_input_window_rows(void);
589 int Rast_input_window_cols(void);
590 int Rast_output_window_rows(void);
591 int Rast_output_window_cols(void);
592 double Rast_northing_to_row(double, const struct Cell_head *);
593 double Rast_easting_to_col(double, const struct Cell_head *);
594 double Rast_row_to_northing(double, const struct Cell_head *);
595 double Rast_col_to_easting(double, const struct Cell_head *);
596 
597 /* window_map.c */
599 int Rast_row_repeat_nomask(int, int);
600 
601 /* zero_cell.c */
602 void Rast_zero_buf(void *, RASTER_MAP_TYPE);
605 
606 #endif /* GRASS_RASTERDEFS_H */
int Rast_history_length(struct History *)
Definition: history.c:330
void Rast_get_null_value_row(int, char *, int)
Read or simulate null value row.
bool Rast_legal_semantic_label(const char *)
Check for legal semantic label.
char * Rast_get_next_marked_c_cat(struct Categories *, CELL *, CELL *, long *)
Get next marked raster categories (CELL)
Definition: raster/cats.c:643
void Rast__write_colors(FILE *, struct Colors *)
Write map layer color table.
void Rast_close_gdal_link(struct GDAL_link *)
Close existing GDAL link.
Definition: gdal.c:401
void Rast_make_byg_fp_colors(struct Colors *, DCELL, DCELL)
Create BYG color table (floating-point)
Definition: color_compat.c:285
int Rast_number_of_cats(struct Categories *)
Get number of raster categories.
Definition: raster/cats.c:1269
void Rast_set_null_value(void *, int, RASTER_MAP_TYPE)
To set one or more raster values to null.
Definition: null_val.c:98
void Rast_make_byg_colors(struct Colors *, CELL, CELL)
Create BYG color table (integer)
Definition: color_compat.c:271
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.
Definition: raster/open.c:820
void void Rast_clear_history(struct History *)
Definition: history.c:303
void Rast_write_history(const char *, struct History *)
Write raster history file.
Definition: history.c:158
int Rast__read_history(struct History *, FILE *)
Definition: history.c:59
int Rast_is_reclassed_to(const char *, const char *, int *, char ***)
Get child reclass maps list.
Definition: reclass.c:79
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)
Definition: raster/open.c:1012
int Rast_next_cell_stat(CELL *, long *, struct Cell_stats *)
Retrieve sorted cell stats.
Definition: cell_stats.c:314
void Rast_extend_histogram(CELL, long, struct Histogram *)
Extends histogram struct to accommodate a new value.
Definition: histogram.c:410
int Rast_raster_cmp(const void *, const void *, RASTER_MAP_TYPE)
Compares raster values.
Definition: raster/raster.c:29
void Rast_fpreclass_set_domain(struct FPReclass *, DCELL, DCELL)
Definition: fpreclass.c:291
int Rast_rewind_cell_stats(struct Cell_stats *)
Reset/rewind cell stats.
Definition: cell_stats.c:250
void Rast_set_c_null_value(CELL *, int)
To set a number of CELL raster values to NULL.
Definition: null_val.c:124
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)
Definition: fpreclass.c:685
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)
Definition: color_set.c:60
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.
Definition: color_rule.c:218
void Rast_fpreclass_perform_di(const struct FPReclass *, const DCELL *, CELL *, int)
Definition: fpreclass.c:587
void Rast_make_rainbow_colors(struct Colors *, CELL, CELL)
Make rainbow colors (integer)
Definition: color_compat.c:124
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)
Definition: fpreclass.c:461
int Rast_put_reclass(const char *, const struct Reclass *)
Put reclass.
Definition: reclass.c:262
int Rast_is_reclass(const char *, const char *, char *, char *)
Check if raster map is reclassified.
Definition: reclass.c:43
char * Rast_allocate_null_output_buf(void)
Definition: alloc_cell.c:203
int Rast_output_window_rows(void)
Number of rows in active output window.
void Rast__remove_fp_range(const char *)
Remove floating-point range.
Definition: range.c:33
void Rast_make_gyr_fp_colors(struct Colors *, DCELL, DCELL)
Create GYR color table (floating-point)
Definition: color_compat.c:170
struct GDAL_link * Rast_get_gdal_link(const char *, const char *)
Get GDAL link settings for given raster map.
Definition: gdal.c:61
void Rast_copy_cats(struct Categories *, const struct Categories *)
Copy raster categories.
Definition: raster/cats.c:1248
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:75
DCELL Rast_interp_cubic_bspline(double, DCELL, DCELL, DCELL, DCELL)
Definition: interp.c:145
int Rast_sort_histogram_by_count(struct Histogram *)
Sorts the histogram by counts.
Definition: histogram.c:288
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.
Definition: gdal.c:39
int Rast_quant_get_pos_infinite_rule(const struct Quant *, DCELL *, CELL *)
Returns in "dRight" and "c" the rule values.
Definition: quant.c:442
int Rast_fpreclass_nof_rules(const struct FPReclass *)
Definition: fpreclass.c:371
int Rast__open_null_write(const char *)
Definition: raster/open.c:752
void Rast__color_free_rules(struct _Color_Info_ *)
Free color rules structure.
Definition: color_free.c:43
2D/3D raster map header (used also for region)
Definition: gis.h:423
#define Rast_is_d_null_value(dcellVal)
Definition: defs/raster.h:414
void Rast_free_reclass(struct Reclass *)
Free Reclass structure.
Definition: reclass.c:183
void Rast_make_histogram_cs(struct Cell_stats *, struct Histogram *)
Creates histogram based on cell statistics.
Definition: histogram.c:141
void Rast_print_colors(struct Colors *, DCELL, DCELL, FILE *, int)
Print color table.
Definition: color_out.c:41
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.
Definition: quant_rw.c:186
void Rast_make_ramp_fp_colors(struct Colors *, DCELL, DCELL)
Make color ramp (floating-point)
Definition: color_compat.c:106
char * Rast_get_cell_title(const char *, const char *)
get raster map title
Definition: cell_title.c:27
void Rast_fpreclass_perform_dd(const struct FPReclass *, const DCELL *, DCELL *, int)
Definition: fpreclass.c:615
struct GDAL_link * Rast_create_gdal_link(const char *, RASTER_MAP_TYPE)
Create GDAL settings for given raster map.
Definition: gdal.c:242
void Rast_quant_perform_f(struct Quant *, const FCELL *, CELL *, int)
Same as Rast_quant_perform_d(), except the type.
Definition: quant.c:736
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.
Definition: quant.c:41
char * Rast_read_vdatum(const char *, const char *)
Get a raster map&#39;s vertical datum metadata string.
void Rast_construct_default_range(struct Range *)
Construct default range.
Definition: range.c:45
void Rast_invert_colors(struct Colors *)
Definition: color_invrt.c:17
double DCELL
Definition: gis.h:614
void Rast_free_cell_stats(struct Cell_stats *)
Free cell stats structure.
Definition: cell_stats.c:385
void Rast_get_row_nomask(int, void *, int, RASTER_MAP_TYPE)
Read raster row without masking.
DCELL * Rast_allocate_d_output_buf(void)
Definition: alloc_cell.c:198
void Rast_get_d_color_range(DCELL *, DCELL *, const struct Colors *)
Get color range values (DCELL)
Definition: color_range.c:87
void Rast_shift_c_colors(CELL, struct Colors *)
Definition: color_shift.c:17
void Rast_set_cell_format(int)
Sets the format for subsequent opens on new integer cell files (uncompressed and random only)...
Definition: raster/open.c:455
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)
?
Definition: null_val.c:461
int Rast__quant_organize_fp_lookup(struct Quant *)
Organized fp_lookup table.
Definition: quant.c:90
int Rast_open_c_new_uncompressed(const char *)
Opens a new cell file in a database (uncompressed)
Definition: raster/open.c:425
void Rast_histogram_eq(const struct Histogram *, unsigned char **, CELL *, CELL *)
Definition: histo_eq.c:15
void Rast_write_histogram(const char *, const struct Histogram *)
Writes the histogram information.
Definition: histogram.c:90
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.
Definition: color_xform.c:30
int Rast_get_cell_format(CELL)
Get cell value format.
Definition: raster/open.c:472
void Rast__row_update_range(const CELL *, int, struct Range *, int)
Update range structure based on raster row.
Definition: range.c:587
void Rast_make_histogram_log_colors(struct Colors *, struct Cell_stats *, int, int)
Generates histogram with normalized log transformed grey scale.
Definition: color_hist.c:101
int Rast__check_null_bit(const unsigned char *, int, int)
Check NULL.
Definition: null_val.c:338
int Rast__open_old(const char *, const char *)
Lower level function, open cell files, supercell files, and the MASK file.
Definition: raster/open.c:152
void Rast_make_bgyr_colors(struct Colors *, CELL, CELL)
Create BGYR color table (integer)
Definition: color_compat.c:243
void Rast_shift_d_colors(DCELL, struct Colors *)
Definition: color_shift.c:22
void Rast_free_histogram(struct Histogram *)
Frees memory allocated for the histogram.
Definition: histogram.c:211
int Rast_quant_is_truncate(const struct Quant *)
Returns whether or not quant rules are set to truncate map.
Definition: quant.c:191
void Rast_write_rstats(const char *, const struct R_stats *)
Write raster stats file.
Definition: range.c:448
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)
Definition: color_compat.c:156
struct R_vrt * Rast_get_vrt(const char *, const char *)
Definition: vrt.c:47
int Rast_input_window_rows(void)
Number of rows in active input window.
void Rast_zero_histogram(struct Histogram *)
Zero out histogram struct.
Definition: histogram.c:426
void Rast_set_d_color_range(DCELL, DCELL, struct Colors *)
Set color range (DCELL version)
Definition: color_range.c:42
void Rast_mark_d_cats(const DCELL *, int, struct Categories *)
Looks up the category label for each raster value (DCELL).
Definition: raster/cats.c:536
#define Rast_is_f_null_value(fcellVal)
Definition: defs/raster.h:412
char * Rast_get_next_marked_cat(struct Categories *, void *, void *, long *, RASTER_MAP_TYPE)
Get next marked raster categories.
Definition: raster/cats.c:676
void Rast_mark_c_cats(const CELL *, int, struct Categories *)
Looks up the category label for each raster value (CELL).
Definition: raster/cats.c:494
void Rast_free_history(struct History *)
Definition: history.c:317
int Rast_fpreclass_get_neg_infinite_rule(const struct FPReclass *, DCELL *, DCELL *)
Definition: fpreclass.c:422
void Rast__init_window(void)
char * Rast_get_ith_c_cat(const struct Categories *, int, void *, void *)
Get category description (CELL)
Definition: raster/cats.c:1084
void Rast_close_vrt(struct R_vrt *)
Definition: vrt.c:150
void Rast_make_bgyr_fp_colors(struct Colors *, DCELL, DCELL)
Create BGYR color table (floating-point)
Definition: color_compat.c:257
void Rast_set_input_window(struct Cell_head *)
Establishes &#39;window&#39; 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.
Definition: color_look.c:417
char * Rast_get_f_cat(FCELL *, struct Categories *)
Get a raster category label (FCELL)
Definition: raster/cats.c:347
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:124
int Rast_set_cat(const void *, const void *, const char *, struct Categories *, RASTER_MAP_TYPE)
Set a raster category label.
Definition: raster/cats.c:914
void Rast_quant_init(struct Quant *)
Initialize the structure.
Definition: quant.c:174
void Rast_truncate_fp_map(const char *, const char *)
Writes the quant rules.
Definition: quant_rw.c:31
void * Rast_allocate_input_buf(RASTER_MAP_TYPE)
Definition: alloc_cell.c:157
void Rast_make_rainbow_fp_colors(struct Colors *, DCELL, DCELL)
Make rainbow colors (floating-point)
Definition: color_compat.c:142
void Rast_mark_f_cats(const FCELL *, int, struct Categories *)
Looks up the category label for each raster value (FCELL).
Definition: raster/cats.c:515
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.
Definition: quant.c:310
void Rast_get_default_color(int *, int *, int *, const struct Colors *)
Gets default color.
Definition: color_get.c:155
int Rast_read_range(const char *, const char *, struct Range *)
Read raster range (CELL)
Definition: range.c:160
void Rast_add_color_rule(const void *, int, int, int, const void *, int, int, int, struct Colors *, RASTER_MAP_TYPE)
Adds the color rule.
Definition: color_rule.c:104
void Rast_write_semantic_label(const char *, const char *)
Write a string into a rasters semantic label metadata file.
int Rast_get_vrt_row(int, void *, int, RASTER_MAP_TYPE)
Definition: vrt.c:171
void Rast_quant_free(struct Quant *)
Resets and frees allocated memory.
Definition: quant.c:55
DCELL Rast_get_sample_cubic(int, const struct Cell_head *, struct Categories *, double, double, int)
Extract a cell value from raster map (cubic interpolation).
Definition: sample.c:238
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
Definition: histogram.c:23
int Rast_get_color(const void *, int *, int *, int *, struct Colors *, RASTER_MAP_TYPE)
Gets color from raster map.
Definition: color_get.c:38
DCELL Rast_interp_bicubic_bspline(double, double, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL)
Definition: interp.c:153
void Rast_set_history(struct History *, int, const char *)
Set the string of a specific history field.
Definition: history.c:192
unsigned char * Rast__allocate_null_bits(int)
Allocates memory for null bits.
Definition: alloc_cell.c:135
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)
Definition: color_compat.c:74
void Rast_set_window(struct Cell_head *)
Establishes &#39;window&#39; 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.
Definition: range.c:764
Definition: raster.h:31
int Rast_put_cell_title(const char *, const char *)
Definition: put_title.c:16
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.
Definition: raster/cats.c:396
void Rast__set_null_value(void *, int, int, RASTER_MAP_TYPE)
To set one or more raster values to null.
Definition: null_val.c:80
int Rast_sort_cats(struct Categories *)
Sort categories.
Definition: raster/cats.c:1282
void Rast_get_stats_for_null_value(long *, const struct Cell_stats *)
Get number of null values.
Definition: cell_stats.c:372
void Rast_insert_d_null_values(DCELL *, char *, int)
To insert null values into an floating-point raster map (FCELL)
Definition: null_val.c:322
int Rast__insert_color_into_lookup(CELL, int, int, int, struct _Color_Info_ *)
Definition: color_insrt.c:14
void Rast_unset_window(void)
Unset current window.
void Rast_get_input_window(struct Cell_head *)
Read the current input window.
Definition: raster/window.c:43
void Rast_update_range(CELL, struct Range *)
Update range structure (CELL)
Definition: range.c:517
void Rast_get_output_window(struct Cell_head *)
Read the current output window.
Definition: raster/window.c:56
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.
Definition: quant_rw.c:81
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...
Definition: quant.c:596
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.
Definition: get_row_colr.c:39
CELL * Rast_allocate_c_output_buf(void)
Definition: alloc_cell.c:188
int Rast_cell_stats_histo_eq(struct Cell_stats *, CELL, CELL, CELL, CELL, int, void(*)(CELL, CELL, CELL))
Definition: cellstats_eq.c:4
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.
Definition: sample.c:48
void Rast_init_range(struct Range *)
Initialize range structure.
Definition: range.c:690
void Rast__color_free_lookup(struct _Color_Info_ *)
Free color rules structure.
Definition: color_free.c:61
FCELL * Rast_allocate_f_output_buf(void)
Definition: alloc_cell.c:193
int Rast__read_null_row_ptrs(int, int)
char * Rast_get_c_cat(CELL *, struct Categories *)
Get a raster category label (CELL)
Definition: raster/cats.c:323
void Rast_set_output_window(struct Cell_head *)
Establishes &#39;window&#39; as the current working window for output.
int Rast_read_rstats(const char *, const char *, struct R_stats *)
Read raster stats.
Definition: range.c:275
DCELL * Rast_allocate_d_buf(void)
Allocates memory for a raster map of type DCELL.
Definition: alloc_cell.c:108
void Rast_zero_buf(void *, RASTER_MAP_TYPE)
Zero a raster buffer.
Definition: zero_cell.c:28
int Rast_set_f_cat(const FCELL *, const FCELL *, const char *, struct Categories *)
Set a raster category label (FCELL)
Definition: raster/cats.c:788
Definition: raster.h:84
void Rast_make_random_colors(struct Colors *, CELL, CELL)
make random colors
Definition: color_rand.c:25
void Rast_zero_output_buf(void *, RASTER_MAP_TYPE)
Definition: zero_cell.c:38
int Rast__null_bitstream_size(int)
Determines null bitstream size.
Definition: alloc_cell.c:148
void Rast_make_wave_colors(struct Colors *, CELL, CELL)
Make color wave (integer)
Definition: color_compat.c:29
void Rast_write_vdatum(const char *, const char *)
Write a string into a raster&#39;s vertical datum metadata file.
void Rast_write_fp_range(const char *, const struct FPRange *)
Write raster range file (floating-point)
Definition: range.c:406
char * Rast_get_d_cat(DCELL *, struct Categories *)
Get a raster category label (DCELL)
Definition: raster/cats.c:371
int Rast_find_cell_stat(CELL, long *, const struct Cell_stats *)
Random query of cell stats.
Definition: cell_stats.c:190
void Rast_fpreclass_reset(struct FPReclass *)
Definition: fpreclass.c:271
void Rast_unopen(int)
Unopen a raster map.
Definition: raster/close.c:132
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)
Definition: color_xform.c:109
void Rast__init(void)
Definition: raster/init.c:65
int Rast_open_new(const char *, RASTER_MAP_TYPE)
Opens a new raster map.
Definition: raster/open.c:997
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)
Definition: color_rule.c:154
size_t Rast_cell_size(RASTER_MAP_TYPE)
Returns size of a raster cell in bytes.
Definition: alloc_cell.c:39
void Rast__write_history(struct History *, FILE *)
Definition: history.c:128
void Rast_init_all(void)
Definition: raster/init.c:142
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)
Definition: color_rule.c:184
void Rast_get_null_value_color(int *, int *, int *, const struct Colors *)
Gets color for null value.
Definition: color_get.c:127
int Rast_read_histogram(const char *, const char *, struct Histogram *)
read the histogram information
Definition: histogram.c:44
void Rast_suppress_masking(void)
Suppresses masking.
Definition: auto_mask.c:87
void Rast_insert_null_values(void *, char *, int, RASTER_MAP_TYPE)
To check if a CELL raster value is set to NULL.
Definition: null_val.c:279
int Rast_mark_cats(const void *, int, struct Categories *, RASTER_MAP_TYPE)
Looks up the category label for each raster value (DCELL).
Definition: raster/cats.c:560
void Rast_unsuppress_masking(void)
Unsuppresses masking.
Definition: auto_mask.c:106
void Rast_row_update_range(const CELL *, int, struct Range *)
Update range structure based on raster row (CELL)
Definition: range.c:572
int Rast_maskfd(void)
Test for MASK.
Definition: maskfd.c:26
DCELL Rast_fpreclass_get_cell_value(const struct FPReclass *, DCELL)
Definition: fpreclass.c:557
const char * Rast_history_line(struct History *, int)
Definition: history.c:335
void Rast_make_wave_fp_colors(struct Colors *, DCELL, DCELL)
Make color wave (floating-point)
Definition: color_compat.c:46
FCELL * Rast_allocate_f_input_buf(void)
Definition: alloc_cell.c:167
void Rast_fpreclass_perform_fd(const struct FPReclass *, const FCELL *, DCELL *, int)
Definition: fpreclass.c:657
int Rast_fpreclass_get_pos_infinite_rule(const struct FPReclass *, DCELL *, DCELL *)
Definition: fpreclass.c:447
Raster history info (metadata)
Definition: raster.h:180
int Rast_set_d_cat(const DCELL *, const DCELL *, const char *, struct Categories *)
Set a raster category label (DCELL)
Definition: raster/cats.c:808
int Rast__quant_import(const char *, const char *, struct Quant *)
Reads quantization rules (internal use only)
Definition: quant_io.c:94
void Rast_want_histogram(int)
Save histogram for newly create raster map (cell)
Definition: raster/open.c:438
void Rast_set_f_null_value(FCELL *, int)
To set a number of FCELL raster values to NULL.
Definition: null_val.c:138
char * Rast_mask_info(void)
Definition: mask_info.c:35
int Rast_quant_get_neg_infinite_rule(const struct Quant *, DCELL *, CELL *)
Returns in "dLeft" and "c" the rule values.
Definition: quant.c:394
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.
Definition: raster/init.c:56
void Rast_free_colors(struct Colors *)
Free color structure memory.
Definition: color_free.c:30
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)
Definition: quant_io.c:268
char * Rast_get_ith_d_cat(const struct Categories *, int, DCELL *, DCELL *)
Get category description (DCELL)
Definition: raster/cats.c:1029
int Rast_read_vector_cats(const char *, const char *, struct Categories *)
Read vector category file.
Definition: raster/cats.c:140
void Rast_make_aspect_colors(struct Colors *, CELL, CELL)
Make aspect colors (integer)
Definition: color_compat.c:299
RASTER_MAP_TYPE Rast__check_fp_type(const char *, const char *)
Determines whether the floating points cell file has double or float type.
Definition: raster/open.c:933
int Rast_get_reclass(const char *, const char *, struct Reclass *)
Get reclass.
Definition: reclass.c:140
void Rast__color_reset(struct Colors *)
Reset colors structure.
Definition: color_free.c:98
int Rast_open_old(const char *, const char *)
Open an existing integer raster map (cell)
Definition: raster/open.c:112
void Rast_make_ramp_colors(struct Colors *, CELL, CELL)
Make color ramp (integer)
Definition: color_compat.c:90
void Rast_set_default_color(int, int, int, struct Colors *)
Set default color value.
Definition: color_set.c:100
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.
Definition: color_look.c:79
int Rast_quant_is_round(const struct Quant *)
Returns whether or not quant rules are set to round map.
Definition: quant.c:203
FCELL * Rast_allocate_f_buf(void)
Allocates memory for a raster map of type FCELL.
Definition: alloc_cell.c:95
int Rast_open_fp_new_uncompressed(const char *)
Opens new fcell file in a database (uncompressed)
Definition: raster/open.c:513
int Rast_read_history(const char *, const char *, struct History *)
Read raster history file.
Definition: history.c:106
void Rast_quant_set_pos_infinite_rule(struct Quant *, DCELL, CELL)
Defines a rule for values "dRight" and larger.
Definition: quant.c:416
void Rast_lookup_d_colors(const DCELL *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, struct Colors *)
Lookup an array of colors (DCELL)
Definition: color_look.c:146
void Rast_rewind_cats(struct Categories *)
Rewind raster categories.
Definition: raster/cats.c:588
void Rast_make_byr_colors(struct Colors *, CELL, CELL)
Create BYR color table (integer)
Definition: color_compat.c:215
void Rast_put_cellhd(const char *, struct Cell_head *)
Writes the raster file header.
Definition: put_cellhd.c:28
CELL Rast_get_max_c_cat(const char *, const char *)
Get the max category number.
Definition: raster/cats.c:171
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.
Definition: raster/cats.c:1145
int Rast_set_c_cat(const CELL *, const CELL *, const char *, struct Categories *)
Set a raster category label (CELL)
Definition: raster/cats.c:770
void Rast_fpreclass_set_pos_infinite_rule(struct FPReclass *, DCELL, DCELL)
Definition: fpreclass.c:436
int Rast_close_gdal_write_link(struct GDAL_link *)
Close existing GDAL link and write out data.
Definition: gdal.c:418
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.
Definition: color_look.c:195
void Rast_set_null_value_color(int, int, int, struct Colors *)
Set color for NULL-value.
Definition: color_set.c:79
void Rast__color_free_fp_lookup(struct _Color_Info_ *)
Free color rules structure.
Definition: color_free.c:79
DCELL Rast_interp_bicubic(double, double, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL)
Definition: interp.c:42
int Rast_open_fp_new(const char *)
Opens new fcell file in a database.
Definition: raster/open.c:499
void Rast_write_vector_cats(const char *, struct Categories *)
Write vector category file.
Definition: raster/cats.c:955
int Rast_sort_histogram(struct Histogram *)
Sorts the histogram.
Definition: histogram.c:228
void Rast__create_window_mapping(int)
Create window mapping.
int Rast__check_format(int)
Definition: raster/format.c:63
Definition: raster.h:225
int Rast_update_cell_stats(const CELL *, int, struct Cell_stats *)
Add data to cell stats.
Definition: cell_stats.c:62
float FCELL
Definition: gis.h:615
int Rast_open_c_new(const char *)
Opens a new cell file in a database (compressed)
Definition: raster/open.c:410
void Rast_set_c_color_range(CELL, CELL, struct Colors *)
Set color range (CELL version)
Definition: color_range.c:24
void Rast_fpreclass_perform_fi(const struct FPReclass *, const FCELL *, CELL *, int)
Definition: fpreclass.c:629
Definition: gis.h:676
int Rast__write_row_ptrs(int)
void Rast_short_history(const char *, const char *, struct History *)
Initialize history structure.
Definition: history.c:226
DCELL * Rast_allocate_d_input_buf(void)
Definition: alloc_cell.c:172
int Rast_get_d_color(const DCELL *, int *, int *, int *, struct Colors *)
Gets color from raster map (DCELL)
Definition: color_get.c:110
void Rast_update_fp_range(DCELL, struct FPRange *)
Update range structure (floating-point)
Definition: range.c:545
void Rast_set_c_value(void *, CELL, RASTER_MAP_TYPE)
Places a CELL raster value.
Definition: raster/raster.c:96
void Rast__error_handler(void *)
Definition: raster/init.c:73
void Rast_fpreclass_perform_ii(const struct FPReclass *, const CELL *, CELL *, int)
Definition: fpreclass.c:671
void Rast__init_null_bits(unsigned char *, int)
?
Definition: null_val.c:495
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.
Definition: quant.c:281
int read_rule_fn(void *, DCELL, DCELL, DCELL *, int *, int *, int *, int *, int *, int *)
Definition: defs/raster.h:232
void Rast_row_update_fp_range(const void *, int, struct FPRange *, RASTER_MAP_TYPE)
Update range structure based on raster row (floating-point)
Definition: range.c:630
char * Rast_get_ith_cat(const struct Categories *, int, void *, void *, RASTER_MAP_TYPE)
Get category description.
Definition: raster/cats.c:1112
void Rast_get_window(struct Cell_head *)
Read the current window.
Definition: raster/window.c:26
int Rast_get_f_color(const FCELL *, int *, int *, int *, struct Colors *)
Gets color from raster map (FCELL)
Definition: color_get.c:89
Definition: R.h:47
void Rast_get_cellhd(const char *, const char *, struct Cell_head *)
Read the raster header.
Definition: get_cellhd.c:41
int Rast_read_fp_range(const char *, const char *, struct FPRange *)
Read floating-point range.
Definition: range.c:71
int Rast_command_history(struct History *)
Save command line to raster history structure.
Definition: history.c:272
int Rast_get_c_color(const CELL *, int *, int *, int *, struct Colors *)
Gets color from raster map (CELL)
Definition: color_get.c:68
char * Rast_allocate_null_input_buf(void)
Definition: alloc_cell.c:177
void Rast_fpreclass_perform_df(const struct FPReclass *, const DCELL *, FCELL *, int)
Definition: fpreclass.c:601
int INTERP_TYPE
Definition: raster.h:28
void Rast_log_colors(struct Colors *, struct Colors *, int)
Make logarithmically-scaled version of an existing color table.
Definition: color_xform.c:185
DCELL Rast_interp_cubic(double, DCELL, DCELL, DCELL, DCELL)
Definition: interp.c:35
void Rast_quant_add_rule(struct Quant *, DCELL, DCELL, CELL, CELL)
Adds a new rule to the set of quantization rules.
Definition: quant.c:473
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
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.
Definition: raster/cats.c:104
void Rast_make_histogram_eq_colors(struct Colors *, struct Cell_stats *)
Make histogram-stretched grey colors.
Definition: color_hist.c:32
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.
Definition: cell_stats.c:39
struct Quant_table * Rast__quant_get_rule_for_d_raster_val(const struct Quant *, DCELL)
Returns quant rule which will be applied.
Definition: quant.c:775
void Rast_init_fp_range(struct FPRange *)
Initialize fp range.
Definition: range.c:742
void Rast_fpreclass_reverse_rule_order(struct FPReclass *)
Definition: fpreclass.c:492
void Rast_insert_f_null_values(FCELL *, char *, int)
To insert null values into an floating-point raster map (FCELL)
Definition: null_val.c:307
void Rast_quant_get_ith_rule(const struct Quant *, int, DCELL *, DCELL *, CELL *, CELL *)
Returns the i&#39;th quantization rule.
Definition: quant.c:328
int Rast_window_rows(void)
Number of rows in active window.
Definition: raster/window.c:85
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.
Definition: alloc_cell.c:55
void Rast__organize_colors(struct Colors *)
Definition: color_org.c:12
void Rast__unopen_all(void)
Unopen all raster maps.
Definition: raster/close.c:156
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)
Definition: color_range.c:64
int CELL
Definition: gis.h:613
void Rast_round_fp_map(const char *, const char *)
Writes the quant rules.
Definition: quant_rw.c:51
void Rast_unmark_cats(struct Categories *)
Sets marks for all categories to 0.
Definition: raster/cats.c:471
int Rast__read_row_ptrs(int)
void Rast_fpreclass_clear(struct FPReclass *)
Definition: fpreclass.c:261
void * Rast_allocate_output_buf(RASTER_MAP_TYPE)
Definition: alloc_cell.c:183
void Rast_set_quant_rules(int, struct Quant *)
Sets quant translation rules for raster map opened for reading.
Definition: raster/open.c:1031
void Rast_free_cats(struct Categories *)
Free category structure memory.
Definition: raster/cats.c:1213
void Rast_fpreclass_get_ith_rule(const struct FPReclass *, int, DCELL *, DCELL *, DCELL *, DCELL *)
Definition: fpreclass.c:378
int Rast_set_histogram(CELL, long, struct Histogram *)
sets the histogram value for cat to count
Definition: histogram.c:386
char * Rast_read_units(const char *, const char *)
Get a raster map&#39;s units metadata string.
void Rast_write_cats(const char *, struct Categories *)
Write raster category file.
Definition: raster/cats.c:938
RASTER_MAP_TYPE Rast_get_map_type(int)
Determine raster type from descriptor.
Definition: raster/open.c:918
Structure that stores option information.
Definition: gis.h:542
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)
Definition: color_rule.c:124
void Rast__close_null(int)
Definition: raster/close.c:530
void Rast_set_cats_fmt(const char *, double, double, double, double, struct Categories *)
Set category fmt (?)
Definition: raster/cats.c:1190
int Rast__mask_info(char *, char *)
Definition: mask_info.c:56
void Rast_remove_histogram(const char *)
Removes the histogram.
Definition: histogram.c:344
void Rast_quant_round(struct Quant *)
Sets the quant rules to perform simple rounding on floats.
Definition: quant.c:229
int RASTER_MAP_TYPE
Definition: raster.h:25
char * Rast_get_semantic_label_or_name(const char *, const char *)
Get a raster map semantic label or fall back to its name.
void Rast__convert_01_flags(const char *, unsigned char *, int)
?
Definition: null_val.c:423
char * Rast_allocate_null_buf(void)
Allocates memory for a null buffer.
Definition: alloc_cell.c:121
long Rast_get_histogram_count(int, const struct Histogram *)
Returns count for the nth element in the histogram.
Definition: histogram.c:195
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)
Definition: color_rule.c:35
void Rast_quant_set_neg_infinite_rule(struct Quant *, DCELL, CELL)
Defines a rule for values "dLeft" and smaller.
Definition: quant.c:368
void const char * Rast_get_history(struct History *, int)
Set the string of a specific history field.
Definition: history.c:177
void Rast_make_byr_fp_colors(struct Colors *, DCELL, DCELL)
Create BYR color table (floating-point)
Definition: color_compat.c:229
int Rast_fpreclass_get_limits(const struct FPReclass *, DCELL *, DCELL *, DCELL *, DCELL *)
Definition: fpreclass.c:338
void Rast_quant_perform_d(struct Quant *, const DCELL *, CELL *, int)
Returns in "cell" the quantized CELL values.
Definition: quant.c:716
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
Definition: histogram.c:360
void Rast_fpreclass_perform_id(const struct FPReclass *, const CELL *, DCELL *, int)
Definition: fpreclass.c:699
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)
Definition: color_compat.c:200
void Rast_write_range(const char *, const struct Range *)
Write raster range file.
Definition: range.c:372
DCELL Rast_get_sample_nearest(int, const struct Cell_head *, struct Categories *, double, double, int)
Extract a cell value from raster map (neighbor interpolation)
Definition: sample.c:91
void Rast_insert_c_null_values(CELL *, char *, int)
To insert null values into an integer raster map (CELL)
Definition: null_val.c:295
CELL * Rast_allocate_c_input_buf(void)
Definition: alloc_cell.c:162
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 *)
Definition: interp.c:56
void Rast_make_grey_scale_colors(struct Colors *, CELL, CELL)
Make linear grey scale (integer)
Definition: color_compat.c:185
void Rast_fpreclass_init(struct FPReclass *)
Definition: fpreclass.c:283
void Rast_make_aspect_fp_colors(struct Colors *, DCELL, DCELL)
Make aspect colors (floating-point)
Definition: color_compat.c:313
void Rast_write_units(const char *, const char *)
Write a string to a raster map&#39;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.
Definition: raster/cats.c:1171
int Rast_option_to_interp_type(const struct Option *)
Get interpolation method from the option.
Definition: interp.c:193
char * Rast_read_semantic_label(const char *, const char *)
Get a raster map semantic label metadata string.
int Rast__check_for_auto_masking(void)
Checks for auto masking.
Definition: auto_mask.c:37
void Rast_write_histogram_cs(const char *, struct Cell_stats *)
Writes the histogram based on cell statistics to file.
Definition: histogram.c:116
char * Rast_get_next_marked_f_cat(struct Categories *, FCELL *, FCELL *, long *)
Get next marked raster categories (FCELL)
Definition: raster/cats.c:659
void Rast_lookup_c_colors(const CELL *, unsigned char *, unsigned char *, unsigned char *, unsigned char *, int, struct Colors *)
Lookup an array of colors.
Definition: color_look.c:45
void Rast_raster_cpy(void *, const void *, int, RASTER_MAP_TYPE)
Copies raster values.
Definition: raster/raster.c:79
void Rast_fpreclass_perform_ff(const struct FPReclass *, const FCELL *, FCELL *, int)
Definition: fpreclass.c:643
void Rast_append_history(struct History *, const char *)
Append a string to a History structure.
Definition: history.c:29
char * Rast_get_cats_title(const struct Categories *)
Get title from category structure struct.
Definition: raster/cats.c:299
void Rast_init(void)
Initialize GRASS GIS engine.
Definition: raster/init.c:44
DCELL Rast_interp_linear(double, DCELL, DCELL)
Definition: interp.c:21
void Rast_abs_log_colors(struct Colors *, struct Colors *, int)
Make logarithmically-scaled version of an existing color table, allowing for signed values...
Definition: color_xform.c:253
void Rast_fpreclass_set_range(struct FPReclass *, DCELL, DCELL)
Definition: fpreclass.c:300
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.
Definition: histogram.c:178
DCELL Rast_interp_bilinear(double, double, DCELL, DCELL, DCELL, DCELL)
Definition: interp.c:26
void Rast_init_colors(struct Colors *)
Initialize color structure.
Definition: color_init.c:25
void Rast_set_c_color(CELL, int, int, int, struct Colors *)
Set a category color (CELL)
Definition: color_set.c:41
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)
Definition: raster/cats.c:603
void Rast_align_window(struct Cell_head *, const struct Cell_head *)
Align two regions.
Definition: align_window.c:41
#define Rast_is_c_null_value(cellVal)
Definition: defs/raster.h:410
void Rast__write_null_bits(int, const unsigned char *)
Write null data.
void Rast_fpreclass_set_neg_infinite_rule(struct FPReclass *, DCELL, DCELL)
Definition: fpreclass.c:411
CELL * Rast_allocate_c_buf(void)
Allocate memory for a CELL type raster map.
Definition: alloc_cell.c:82
void Rast_zero_input_buf(void *, RASTER_MAP_TYPE)
Definition: zero_cell.c:33
void Rast_quant_truncate(struct Quant *)
Sets the quant rules to perform simple truncation on floats.
Definition: quant.c:216
void Rast_make_ryg_colors(struct Colors *, CELL, CELL)
Create RYG color table (integer)
Definition: color_compat.c:60
void Rast_set_d_null_value(DCELL *, int)
To set a number of DCELL raster values to NULL.
Definition: null_val.c:155
#define __attribute__(x)
Definition: gis.h:38
DCELL Rast_get_sample_bilinear(int, const struct Cell_head *, struct Categories *, double, double, int)
Extract a cell value from raster map (bilinear interpolation).
Definition: sample.c:148
void Rast_close(int)
Close a raster map.
Definition: raster/close.c:99
int Rast_map_is_fp(const char *, const char *)
Check if raster map is floating-point.
Definition: raster/open.c:847
int Rast_get_histogram_num(const struct Histogram *)
Sorts the histogram in ascending order by counts then category.
Definition: histogram.c:165
char * Rast_get_ith_f_cat(const struct Categories *, int, void *, void *)
Get category description (FCELL)
Definition: raster/cats.c:1057
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.
Definition: quant.c:517
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.
Definition: range.c:714
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)
Definition: color_look.c:113
int Rast_is_null_value(const void *, RASTER_MAP_TYPE)
To check if a raster value is set to NULL.
Definition: null_val.c:179
RASTER_MAP_TYPE Rast_map_type(const char *, const char *)
Determine raster data type.
Definition: raster/open.c:880
void Rast_write_quant(const char *, const char *, const struct Quant *)
Writes the quant rule table for the raster map.
Definition: quant_rw.c:150
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.