~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to include/defs/raster.h

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 */
 
12
size_t Rast_cell_size(RASTER_MAP_TYPE);
 
13
void *Rast_allocate_buf(RASTER_MAP_TYPE);
 
14
CELL *Rast_allocate_c_buf(void);
 
15
FCELL *Rast_allocate_f_buf(void);
 
16
DCELL *Rast_allocate_d_buf(void);
 
17
char *Rast_allocate_null_buf(void);
 
18
unsigned char *Rast__allocate_null_bits(int);
 
19
int Rast__null_bitstream_size(int);
 
20
 
 
21
void *Rast_allocate_input_buf(RASTER_MAP_TYPE);
 
22
CELL *Rast_allocate_c_input_buf(void);
 
23
FCELL *Rast_allocate_f_input_buf(void);
 
24
DCELL *Rast_allocate_d_input_buf(void);
 
25
char *Rast_allocate_null_input_buf(void);
 
26
 
 
27
void *Rast_allocate_output_buf(RASTER_MAP_TYPE);
 
28
CELL *Rast_allocate_c_output_buf(void);
 
29
FCELL *Rast_allocate_f_output_buf(void);
 
30
DCELL *Rast_allocate_d_output_buf(void);
 
31
char *Rast_allocate_null_output_buf(void);
 
32
 
 
33
/* auto_mask.c */
 
34
int Rast__check_for_auto_masking(void);
 
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 *);
 
53
char *Rast_get_next_marked_d_cat(struct Categories *, DCELL *, DCELL *,
 
54
                                 long *);
 
55
char *Rast_get_next_marked_c_cat(struct Categories *, CELL *, CELL *,
 
56
                                 long *);
 
57
char *Rast_get_next_marked_f_cat(struct Categories *, FCELL *, FCELL *,
 
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 *,
 
65
                 RASTER_MAP_TYPE);
 
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 *,
 
73
                       RASTER_MAP_TYPE);
 
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 *);
 
87
int Rast_rewind_cell_stats(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 */
 
96
int Rast_cell_stats_histo_eq(struct Cell_stats *, CELL, CELL, CELL, CELL, int,
 
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
 
 
104
/* color_compat.c */
 
105
void Rast_make_ryg_colors(struct Colors *, CELL, CELL);
 
106
void Rast_make_ryg_fp_colors(struct Colors *, DCELL, DCELL);
 
107
void Rast_make_aspect_colors(struct Colors *, CELL, CELL);
 
108
void Rast_make_aspect_fp_colors(struct Colors *, DCELL, DCELL);
 
109
void Rast_make_byr_colors(struct Colors *, CELL, CELL);
 
110
void Rast_make_byr_fp_colors(struct Colors *, DCELL, DCELL);
 
111
void Rast_make_bgyr_colors(struct Colors *, CELL, CELL);
 
112
void Rast_make_bgyr_fp_colors(struct Colors *, DCELL, DCELL);
 
113
void Rast_make_byg_colors(struct Colors *, CELL, CELL);
 
114
void Rast_make_byg_fp_colors(struct Colors *, DCELL, DCELL);
 
115
void Rast_make_grey_scale_colors(struct Colors *, CELL, CELL);
 
116
void Rast_make_grey_scale_fp_colors(struct Colors *, DCELL, DCELL);
 
117
void Rast_make_gyr_colors(struct Colors *, CELL, CELL);
 
118
void Rast_make_gyr_fp_colors(struct Colors *, DCELL, DCELL);
 
119
void Rast_make_rainbow_colors(struct Colors *, CELL, CELL);
 
120
void Rast_make_rainbow_fp_colors(struct Colors *, DCELL, DCELL);
 
121
void Rast_make_ramp_colors(struct Colors *, CELL, CELL);
 
122
void Rast_make_ramp_fp_colors(struct Colors *, DCELL, DCELL);
 
123
void Rast_make_wave_colors(struct Colors *, CELL, CELL);
 
124
void Rast_make_wave_fp_colors(struct Colors *, DCELL, DCELL);
 
125
 
 
126
/* color_free.c */
 
127
void Rast_free_colors(struct Colors *);
 
128
void Rast__color_free_rules(struct _Color_Info_ *);
 
129
void Rast__color_free_lookup(struct _Color_Info_ *);
 
130
void Rast__color_free_fp_lookup(struct _Color_Info_ *);
 
131
void Rast__color_reset(struct Colors *);
 
132
 
 
133
/* color_get.c */
 
134
int Rast_get_color(const void *, int *, int *, int *, struct Colors *,
 
135
                   RASTER_MAP_TYPE);
 
136
int Rast_get_c_color(const CELL *, int *, int *, int *, struct Colors *);
 
137
int Rast_get_f_color(const FCELL *, int *, int *, int *, struct Colors *);
 
138
int Rast_get_d_color(const DCELL *, int *, int *, int *, struct Colors *);
 
139
void Rast_get_null_value_color(int *, int *, int *, const struct Colors *);
 
140
void Rast_get_default_color(int *, int *, int *, const struct Colors *);
 
141
 
 
142
/* color_hist.c */
 
143
void Rast_make_histogram_eq_colors(struct Colors *, struct Cell_stats *);
 
144
void Rast_make_histogram_log_colors(struct Colors *, struct Cell_stats *, int, int);
 
145
 
 
146
/* color_init.c */
 
147
void Rast_init_colors(struct Colors *);
 
148
 
 
149
/* color_insrt.c */
 
150
int Rast__insert_color_into_lookup(CELL, int, int, int, struct _Color_Info_ *);
 
151
 
 
152
/* color_invrt.c */
 
153
void Rast_invert_colors(struct Colors *);
 
154
 
 
155
/* color_look.c */
 
156
void Rast_lookup_c_colors(const CELL *, unsigned char *, unsigned char *,
 
157
                          unsigned char *, unsigned char *, int,
 
158
                          struct Colors *);
 
159
void Rast_lookup_colors(const void *, unsigned char *, unsigned char *,
 
160
                        unsigned char *, unsigned char *, int,
 
161
                        struct Colors *, RASTER_MAP_TYPE);
 
162
void Rast_lookup_f_colors(const FCELL *, unsigned char *, unsigned char *,
 
163
                          unsigned char *, unsigned char *, int,
 
164
                          struct Colors *);
 
165
void Rast_lookup_d_colors(const DCELL *, unsigned char *, unsigned char *,
 
166
                          unsigned char *, unsigned char *, int,
 
167
                          struct Colors *);
 
168
void Rast__lookup_colors(const void *, unsigned char *, unsigned char *,
 
169
                         unsigned char *, unsigned char *, int, struct Colors *,
 
170
                         int, int, RASTER_MAP_TYPE);
 
171
void Rast__interpolate_color_rule(DCELL, unsigned char *, unsigned char *,
 
172
                                  unsigned char *, const struct _Color_Rule_ *);
 
173
 
 
174
/* color_org.c */
 
175
void Rast__organize_colors(struct Colors *);
 
176
 
 
177
/* color_out.c */
 
178
void Rast_print_colors(struct Colors *, DCELL, DCELL, FILE *, int);
 
179
 
 
180
/* color_rand.c */
 
181
void Rast_make_random_colors(struct Colors *, CELL, CELL);
 
182
 
 
183
/* color_range.c */
 
184
void Rast_set_c_color_range(CELL, CELL, struct Colors *);
 
185
void Rast_set_d_color_range(DCELL, DCELL, struct Colors *);
 
186
void Rast_get_c_color_range(CELL *, CELL *, const struct Colors *);
 
187
void Rast_get_d_color_range(DCELL *, DCELL *, const struct Colors *);
 
188
 
 
189
/* color_read.c */
 
190
int Rast_read_colors(const char *, const char *, struct Colors *);
 
191
int Rast__read_colors(const char *, const char *, const char *, struct Colors *);
 
192
void Rast_mark_colors_as_fp(struct Colors *);
 
193
 
 
194
/* color_remove.c */
 
195
int Rast_remove_colors(const char *, const char *);
 
196
 
 
197
/* color_rule.c */
 
198
void Rast_add_d_color_rule(const DCELL *, int, int, int,
 
199
                           const DCELL *, int, int, int,
 
200
                           struct Colors *);
 
201
void Rast_add_f_color_rule(const FCELL *, int, int, int,
 
202
                           const FCELL *, int, int, int,
 
203
                           struct Colors *);
 
204
void Rast_add_c_color_rule(const CELL *, int, int, int,
 
205
                           const CELL *, int, int, int,
 
206
                           struct Colors *);
 
207
void Rast_add_color_rule(const void *, int, int, int,
 
208
                         const void *, int, int, int,
 
209
                         struct Colors *, RASTER_MAP_TYPE);
 
210
int Rast_add_modular_d_color_rule(const DCELL *, int, int, int,
 
211
                                  const DCELL *, int, int, int,
 
212
                                  struct Colors *);
 
213
int Rast_add_modular_f_color_rule(const FCELL *, int, int, int,
 
214
                                  const FCELL *, int, int, int,
 
215
                                  struct Colors *);
 
216
int Rast_add_modular_c_color_rule(const CELL *, int, int, int,
 
217
                                  const CELL *, int, int, int,
 
218
                                  struct Colors *);
 
219
int Rast_add_modular_color_rule(const void *, int, int, int,
 
220
                                const void *, int, int, int,
 
221
                                struct Colors *, RASTER_MAP_TYPE);
 
222
 
 
223
/* color_rule_get.c */
 
224
int Rast_colors_count(const struct Colors *);
 
225
int Rast_get_fp_color_rule(DCELL *, unsigned char *, unsigned char *,
 
226
                       unsigned char *, DCELL *, unsigned char *,
 
227
                       unsigned char *, unsigned char *,
 
228
                       const struct Colors *, int);
 
229
 
 
230
/* color_rules.c */
 
231
typedef int read_rule_fn(void *, DCELL, DCELL,
 
232
                         DCELL *, int *, int *, int *, int *, int *, int *);
 
233
int Rast_parse_color_rule(DCELL, DCELL, const char *, DCELL *, int *, int *,
 
234
                       int *, int *, int *, int *);
 
235
const char *Rast_parse_color_rule_error(int);
 
236
int Rast_read_color_rule(void *, DCELL, DCELL, DCELL *, int *, int *, int *,
 
237
                      int *, int *, int *);
 
238
int Rast_read_color_rules(struct Colors *, DCELL, DCELL, read_rule_fn *, void *);
 
239
int Rast_load_colors(struct Colors *, const char *, CELL, CELL);
 
240
int Rast_load_fp_colors(struct Colors *, const char *, DCELL, DCELL);
 
241
void Rast_make_colors(struct Colors *, const char *, CELL, CELL);
 
242
void Rast_make_fp_colors(struct Colors *, const char *, DCELL, DCELL);
 
243
 
 
244
/* color_set.c */
 
245
void Rast_set_c_color(CELL, int, int, int, struct Colors *);
 
246
void Rast_set_d_color(DCELL, int, int, int, struct Colors *);
 
247
void Rast_set_null_value_color(int, int, int, struct Colors *);
 
248
void Rast_set_default_color(int, int, int, struct Colors *);
 
249
 
 
250
/* color_shift.c */
 
251
void Rast_shift_c_colors(CELL, struct Colors *);
 
252
void Rast_shift_d_colors(DCELL, struct Colors *);
 
253
 
 
254
/* color_write.c */
 
255
void Rast_write_colors(const char *, const char *, struct Colors *);
 
256
void Rast__write_colors(FILE *, struct Colors *);
 
257
 
 
258
/* color_xform.c */
 
259
void Rast_histogram_eq_colors(struct Colors *, struct Colors *,
 
260
                           struct Cell_stats *);
 
261
void Rast_histogram_eq_fp_colors(struct Colors *,
 
262
                              struct Colors *, struct FP_stats *);
 
263
void Rast_log_colors(struct Colors *, struct Colors *, int);
 
264
void Rast_abs_log_colors(struct Colors *, struct Colors *, int);
 
265
 
 
266
/* format.c */
 
267
int Rast__check_format(int);
 
268
int Rast__read_row_ptrs(int);
 
269
int Rast__write_row_ptrs(int);
 
270
 
 
271
/* fpreclass.c */
 
272
void Rast_fpreclass_clear(struct FPReclass *);
 
273
void Rast_fpreclass_reset(struct FPReclass *);
 
274
void Rast_fpreclass_init(struct FPReclass *);
 
275
void Rast_fpreclass_set_domain(struct FPReclass *, DCELL, DCELL);
 
276
void Rast_fpreclass_set_range(struct FPReclass *, DCELL, DCELL);
 
277
int Rast_fpreclass_get_limits(const struct FPReclass *, DCELL *, DCELL *,
 
278
                           DCELL *, DCELL *);
 
279
int Rast_fpreclass_nof_rules(const struct FPReclass *);
 
280
void Rast_fpreclass_get_ith_rule(const struct FPReclass *, int, DCELL *, DCELL *,
 
281
                              DCELL *, DCELL *);
 
282
void Rast_fpreclass_set_neg_infinite_rule(struct FPReclass *, DCELL, DCELL);
 
283
int Rast_fpreclass_get_neg_infinite_rule(const struct FPReclass *, DCELL *,
 
284
                                      DCELL *);
 
285
void Rast_fpreclass_set_pos_infinite_rule(struct FPReclass *, DCELL, DCELL);
 
286
int Rast_fpreclass_get_pos_infinite_rule(const struct FPReclass *, DCELL *,
 
287
                                      DCELL *);
 
288
void Rast_fpreclass_add_rule(struct FPReclass *, DCELL, DCELL, DCELL, DCELL);
 
289
void Rast_fpreclass_reverse_rule_order(struct FPReclass *);
 
290
DCELL Rast_fpreclass_get_cell_value(const struct FPReclass *, DCELL);
 
291
void Rast_fpreclass_perform_di(const struct FPReclass *, const DCELL *, CELL *,
 
292
                            int);
 
293
void Rast_fpreclass_perform_df(const struct FPReclass *, const DCELL *, FCELL *,
 
294
                            int);
 
295
void Rast_fpreclass_perform_dd(const struct FPReclass *, const DCELL *, DCELL *,
 
296
                            int);
 
297
void Rast_fpreclass_perform_fi(const struct FPReclass *, const FCELL *, CELL *,
 
298
                            int);
 
299
void Rast_fpreclass_perform_ff(const struct FPReclass *, const FCELL *, FCELL *,
 
300
                            int);
 
301
void Rast_fpreclass_perform_fd(const struct FPReclass *, const FCELL *, DCELL *,
 
302
                            int);
 
303
void Rast_fpreclass_perform_ii(const struct FPReclass *, const CELL *, CELL *,
 
304
                            int);
 
305
void Rast_fpreclass_perform_if(const struct FPReclass *, const CELL *, FCELL *,
 
306
                            int);
 
307
void Rast_fpreclass_perform_id(const struct FPReclass *, const CELL *, DCELL *,
 
308
                            int);
 
309
/* gdal.c */
 
310
void Rast_init_gdal(void);
 
311
struct GDAL_link *Rast_get_gdal_link(const char *, const char *);
 
312
struct GDAL_link *Rast_create_gdal_link(const char *, RASTER_MAP_TYPE);
 
313
void Rast_close_gdal_link(struct GDAL_link *);
 
314
int Rast_close_gdal_write_link(struct GDAL_link *);
 
315
 
 
316
/* get_cellhd.c */
 
317
void Rast_get_cellhd(const char *, const char *, struct Cell_head *);
 
318
 
 
319
/* get_row.c */
 
320
void Rast_get_row_nomask(int, void *, int, RASTER_MAP_TYPE);
 
321
void Rast_get_c_row_nomask(int, CELL *, int);
 
322
void Rast_get_f_row_nomask(int, FCELL *, int);
 
323
void Rast_get_d_row_nomask(int, DCELL *, int);
 
324
void Rast_get_row(int, void *, int, RASTER_MAP_TYPE);
 
325
void Rast_get_c_row(int, CELL *, int);
 
326
void Rast_get_f_row(int, FCELL *, int);
 
327
void Rast_get_d_row(int, DCELL *, int);
 
328
void Rast_get_null_value_row(int, char *, int);
 
329
 
 
330
/* get_row_colr.c */
 
331
void Rast_get_row_colors(int, int, struct Colors *,
 
332
                         unsigned char *, unsigned char *, unsigned char *,
 
333
                         unsigned char *);
 
334
/* histo_eq.c */
 
335
void Rast_histogram_eq(const struct Histogram *, unsigned char **,
 
336
                       CELL *, CELL *);
 
337
 
 
338
/* histogram.c */
 
339
void Rast_init_histogram(struct Histogram *);
 
340
int Rast_read_histogram(const char *, const char *, struct Histogram *);
 
341
void Rast_write_histogram(const char *, const struct Histogram *);
 
342
void Rast_write_histogram_cs(const char *, struct Cell_stats *);
 
343
void Rast_make_histogram_cs(struct Cell_stats *, struct Histogram *);
 
344
int Rast_get_histogram_num(const struct Histogram *);
 
345
CELL Rast_get_histogram_cat(int, const struct Histogram *);
 
346
long Rast_get_histogram_count(int, const struct Histogram *);
 
347
void Rast_free_histogram(struct Histogram *);
 
348
int Rast_sort_histogram(struct Histogram *);
 
349
int Rast_sort_histogram_by_count(struct Histogram *);
 
350
void Rast_remove_histogram(const char *);
 
351
int Rast_add_histogram(CELL, long, struct Histogram *);
 
352
int Rast_set_histogram(CELL, long, struct Histogram *);
 
353
void Rast_extend_histogram(CELL, long, struct Histogram *);
 
354
void Rast_zero_histogram(struct Histogram *);
 
355
 
 
356
/* history.c */
 
357
int Rast__read_history(struct History *, FILE *);
 
358
int Rast_read_history(const char *, const char *, struct History *);
 
359
void Rast__write_history(struct History *, FILE *);
 
360
void Rast_write_history(const char *, struct History *);
 
361
void Rast_short_history(const char *, const char *, struct History *);
 
362
int Rast_command_history(struct History *);
 
363
void Rast_append_history(struct History *, const char *);
 
364
void Rast_append_format_history(struct History *, const char *, ...)
 
365
    __attribute__ ((format(printf, 2, 3)));
 
366
const char *Rast_get_history(struct History *, int);
 
367
void Rast_set_history(struct History *, int, const char *);
 
368
void Rast_format_history(struct History *, int, const char *, ...)
 
369
    __attribute__ ((format(printf, 3, 4)));
 
370
void Rast_clear_history(struct History *);
 
371
void Rast_free_history(struct History *);
 
372
int Rast_history_length(struct History *);
 
373
const char *Rast_history_line(struct History *, int);
 
374
 
 
375
/* init.c */
 
376
void Rast_init(void);
 
377
void Rast__check_init(void);
 
378
void Rast_init_all(void);
 
379
void Rast__init(void);
 
380
void Rast__error_handler(void *);
 
381
 
 
382
/* interp.c */
 
383
DCELL Rast_interp_linear(double, DCELL, DCELL);
 
384
DCELL Rast_interp_bilinear(double, double, DCELL, DCELL, DCELL, DCELL);
 
385
DCELL Rast_interp_cubic(double, DCELL, DCELL, DCELL, DCELL);
 
386
DCELL Rast_interp_bicubic(double, double,
 
387
                       DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
 
388
                       DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
 
389
                       DCELL);
 
390
DCELL Rast_interp_lanczos(double, double, DCELL *);
 
391
DCELL Rast_interp_cubic_bspline(double, DCELL, DCELL, DCELL, DCELL);
 
392
DCELL Rast_interp_bicubic_bspline(double, double,
 
393
                       DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
 
394
                       DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
 
395
                       DCELL);
 
396
int Rast_option_to_interp_type(const struct Option *);
 
397
 
 
398
/* mask_info.c */
 
399
char *Rast_mask_info(void);
 
400
int Rast__mask_info(char *, char *);
 
401
 
 
402
/* maskfd.c */
 
403
int Rast_maskfd(void);
 
404
 
 
405
/* null_val.c */
 
406
#define Rast_is_c_null_value(cellVal)   \
 
407
    (*(const CELL *)(cellVal) == (CELL) 0x80000000)
 
408
#define Rast_is_f_null_value(fcellVal)  \
 
409
    (*(const FCELL *)(fcellVal) != *(const FCELL *)(fcellVal))
 
410
#define Rast_is_d_null_value(dcellVal)  \
 
411
    (*(const DCELL *)(dcellVal) != *(const DCELL *)(dcellVal))
 
412
 
 
413
void Rast__set_null_value(void *, int, int, RASTER_MAP_TYPE);
 
414
void Rast_set_null_value(void *, int, RASTER_MAP_TYPE);
 
415
void Rast_set_c_null_value(CELL *, int);
 
416
void Rast_set_f_null_value(FCELL *, int);
 
417
void Rast_set_d_null_value(DCELL *, int);
 
418
int Rast_is_null_value(const void *, RASTER_MAP_TYPE);
 
419
#ifndef Rast_is_c_null_value
 
420
int Rast_is_c_null_value(const CELL *);
 
421
#endif
 
422
#ifndef Rast_is_f_null_value
 
423
int Rast_is_f_null_value(const FCELL *);
 
424
#endif
 
425
#ifndef Rast_is_d_null_value
 
426
int Rast_is_d_null_value(const DCELL *);
 
427
#endif
 
428
void Rast_insert_null_values(void *, char *, int, RASTER_MAP_TYPE);
 
429
void Rast_insert_c_null_values(CELL *, char *, int);
 
430
void Rast_insert_f_null_values(FCELL *, char *, int);
 
431
void Rast_insert_d_null_values(DCELL *, char *, int);
 
432
int Rast__check_null_bit(const unsigned char *, int, int);
 
433
void Rast__convert_01_flags(const char *, unsigned char *, int);
 
434
void Rast__convert_flags_01(char *, const unsigned char *, int);
 
435
void Rast__init_null_bits(unsigned char *, int);
 
436
 
 
437
/* open.c */
 
438
int Rast_open_old(const char *, const char *);
 
439
int Rast__open_old(const char *, const char *);
 
440
int Rast_open_c_new(const char *);
 
441
int Rast_open_c_new_uncompressed(const char *);
 
442
void Rast_want_histogram(int);
 
443
void Rast_set_cell_format(int);
 
444
int Rast_get_cell_format(CELL);
 
445
int Rast_open_fp_new(const char *);
 
446
int Rast_open_fp_new_uncompressed(const char *);
 
447
void Rast_set_fp_type(RASTER_MAP_TYPE);
 
448
int Rast_map_is_fp(const char *, const char *);
 
449
RASTER_MAP_TYPE Rast_map_type(const char *, const char *);
 
450
RASTER_MAP_TYPE Rast__check_fp_type(const char *, const char *);
 
451
RASTER_MAP_TYPE Rast_get_map_type(int);
 
452
int Rast_open_new(const char *, RASTER_MAP_TYPE);
 
453
int Rast_open_new_uncompressed(const char *, RASTER_MAP_TYPE);
 
454
void Rast_set_quant_rules(int, struct Quant *);
 
455
 
 
456
/* put_cellhd.c */
 
457
void Rast_put_cellhd(const char *, struct Cell_head *);
 
458
 
 
459
/* put_row.c */
 
460
void Rast_put_row(int, const void *, RASTER_MAP_TYPE);
 
461
void Rast_put_c_row(int, const CELL *);
 
462
void Rast_put_f_row(int, const FCELL *);
 
463
void Rast_put_d_row(int, const DCELL *);
 
464
int Rast__open_null_write(int);
 
465
void Rast__write_null_bits(int, const unsigned char *, int, int, int);
 
466
 
 
467
/* put_title.c */
 
468
int Rast_put_cell_title(const char *, const char *);
 
469
 
 
470
/* quant.c */
 
471
void Rast_quant_clear(struct Quant *);
 
472
void Rast_quant_free(struct Quant *);
 
473
int Rast__quant_organize_fp_lookup(struct Quant *);
 
474
void Rast_quant_init(struct Quant *);
 
475
int Rast_quant_is_truncate(const struct Quant *);
 
476
int Rast_quant_is_round(const struct Quant *);
 
477
void Rast_quant_truncate(struct Quant *);
 
478
void Rast_quant_round(struct Quant *);
 
479
int Rast_quant_get_limits(const struct Quant *, DCELL *, DCELL *, CELL *,
 
480
                       CELL *);
 
481
int Rast_quant_nof_rules(const struct Quant *);
 
482
void Rast_quant_get_ith_rule(const struct Quant *, int, DCELL *, DCELL *, CELL *,
 
483
                          CELL *);
 
484
void Rast_quant_set_neg_infinite_rule(struct Quant *, DCELL, CELL);
 
485
int Rast_quant_get_neg_infinite_rule(const struct Quant *, DCELL *, CELL *);
 
486
void Rast_quant_set_pos_infinite_rule(struct Quant *, DCELL, CELL);
 
487
int Rast_quant_get_pos_infinite_rule(const struct Quant *, DCELL *, CELL *);
 
488
void Rast_quant_add_rule(struct Quant *, DCELL, DCELL, CELL, CELL);
 
489
void Rast_quant_reverse_rule_order(struct Quant *);
 
490
CELL Rast_quant_get_cell_value(struct Quant *, DCELL);
 
491
void Rast_quant_perform_d(struct Quant *, const DCELL *, CELL *, int);
 
492
void Rast_quant_perform_f(struct Quant *, const FCELL *, CELL *, int);
 
493
struct Quant_table *Rast__quant_get_rule_for_d_raster_val(const struct Quant *,
 
494
                                                       DCELL);
 
495
 
 
496
/* quant_io.c */
 
497
int Rast__quant_import(const char *, const char *, struct Quant *);
 
498
int Rast__quant_export(const char *, const char *, const struct Quant *);
 
499
 
 
500
/* quant_rw.c */
 
501
void Rast_truncate_fp_map(const char *, const char *);
 
502
void Rast_round_fp_map(const char *, const char *);
 
503
void Rast_quantize_fp_map(const char *, const char *, CELL, CELL);
 
504
void Rast_quantize_fp_map_range(const char *, const char *, DCELL, DCELL, CELL,
 
505
                                CELL);
 
506
void Rast_write_quant(const char *, const char *, const struct Quant *);
 
507
int Rast_read_quant(const char *, const char *, struct Quant *);
 
508
 
 
509
/* range.c */
 
510
void Rast__remove_fp_range(const char *);
 
511
void Rast_construct_default_range(struct Range *);
 
512
int Rast_read_fp_range(const char *, const char *, struct FPRange *);
 
513
int Rast_read_range(const char *, const char *, struct Range *);
 
514
void Rast_write_range(const char *, const struct Range *);
 
515
void Rast_write_fp_range(const char *, const struct FPRange *);
 
516
void Rast_update_range(CELL, struct Range *);
 
517
void Rast_update_fp_range(DCELL, struct FPRange *);
 
518
void Rast_row_update_range(const CELL *, int, struct Range *);
 
519
void Rast__row_update_range(const CELL *, int, struct Range *, int);
 
520
void Rast_row_update_fp_range(const void *, int, struct FPRange *,
 
521
                          RASTER_MAP_TYPE);
 
522
void Rast_init_range(struct Range *);
 
523
void Rast_get_range_min_max(const struct Range *, CELL *, CELL *);
 
524
void Rast_init_fp_range(struct FPRange *);
 
525
void Rast_get_fp_range_min_max(const struct FPRange *, DCELL *, DCELL *);
 
526
 
 
527
/* raster.c */
 
528
int Rast_raster_cmp(const void *, const void *, RASTER_MAP_TYPE);
 
529
void Rast_raster_cpy(void *, const void *, int, RASTER_MAP_TYPE);
 
530
void Rast_set_c_value(void *, CELL, RASTER_MAP_TYPE);
 
531
void Rast_set_f_value(void *, FCELL, RASTER_MAP_TYPE);
 
532
void Rast_set_d_value(void *, DCELL, RASTER_MAP_TYPE);
 
533
CELL Rast_get_c_value(const void *, RASTER_MAP_TYPE);
 
534
FCELL Rast_get_f_value(const void *, RASTER_MAP_TYPE);
 
535
DCELL Rast_get_d_value(const void *, RASTER_MAP_TYPE);
 
536
 
 
537
/* raster_metadata.c */
 
538
char *Rast_read_units(const char *, const char *);
 
539
char *Rast_read_vdatum(const char *, const char *);
 
540
void Rast_write_units(const char *, const char *);
 
541
void Rast_write_vdatum(const char *, const char *);
 
542
 
 
543
/* reclass.c */
 
544
int Rast_is_reclass(const char *, const char *, char *, char *);
 
545
int Rast_is_reclassed_to(const char *, const char *, int *, char ***);
 
546
int Rast_get_reclass(const char *, const char *, struct Reclass *);
 
547
void Rast_free_reclass(struct Reclass *);
 
548
int Rast_put_reclass(const char *, const struct Reclass *);
 
549
 
 
550
/* sample.c */
 
551
DCELL Rast_get_sample_nearest(int, const struct Cell_head *, struct Categories *, double, double, int);
 
552
DCELL Rast_get_sample_bilinear(int, const struct Cell_head *, struct Categories *, double, double, int);
 
553
DCELL Rast_get_sample_cubic(int, const struct Cell_head *, struct Categories *, double, double, int);
 
554
DCELL Rast_get_sample(int, const struct Cell_head *, struct Categories *, double, double, int, INTERP_TYPE);
 
555
 
 
556
/* set_window.c */
 
557
void Rast__init_window(void);
 
558
void Rast_set_window(struct Cell_head *);
 
559
void Rast_unset_window(void);
 
560
void Rast_set_output_window(struct Cell_head *);
 
561
void Rast_set_input_window(struct Cell_head *);
 
562
 
 
563
/* window.c */
 
564
void Rast_get_window(struct Cell_head *);
 
565
void Rast_get_input_window(struct Cell_head *);
 
566
void Rast_get_output_window(struct Cell_head *);
 
567
int Rast_window_rows(void);
 
568
int Rast_window_cols(void);
 
569
int Rast_input_window_rows(void);
 
570
int Rast_input_window_cols(void);
 
571
int Rast_output_window_rows(void);
 
572
int Rast_output_window_cols(void);
 
573
double Rast_northing_to_row(double, const struct Cell_head *);
 
574
double Rast_easting_to_col(double, const struct Cell_head *);
 
575
double Rast_row_to_northing(double, const struct Cell_head *);
 
576
double Rast_col_to_easting(double, const struct Cell_head *);
 
577
 
 
578
/* window_map.c */
 
579
void Rast__create_window_mapping(int);
 
580
int Rast_row_repeat_nomask(int, int);
 
581
 
 
582
/* zero_cell.c */
 
583
void Rast_zero_buf(void *, RASTER_MAP_TYPE);
 
584
void Rast_zero_input_buf(void *, RASTER_MAP_TYPE);
 
585
void Rast_zero_output_buf(void *, RASTER_MAP_TYPE);
 
586
 
 
587
#endif /* GRASS_RASTERDEFS_H */