raster.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. #ifndef GRASS_RAST_H
  2. #define GRASS_RAST_H
  3. #include <grass/gis.h>
  4. /* --- ANSI prototypes for the lib/raster functions --- */
  5. /* alloc_cell.c */
  6. size_t Rast_cell_size(RASTER_MAP_TYPE);
  7. void *Rast_allocate_buf(RASTER_MAP_TYPE);
  8. CELL *Rast_allocate_c_buf(void);
  9. FCELL *Rast_allocate_f_buf(void);
  10. DCELL *Rast_allocate_d_buf(void);
  11. char *Rast_allocate_null_buf(void);
  12. unsigned char *Rast__allocate_null_bits(int);
  13. int Rast__null_bitstream_size(int);
  14. /* auto_mask.c */
  15. int Rast__check_for_auto_masking(void);
  16. void Rast_suppress_masking(void);
  17. void Rast_unsuppress_masking(void);
  18. /* cats.c */
  19. int Rast_read_cats(const char *, const char *, struct Categories *);
  20. int Rast_read_vector_cats(const char *, const char *, struct Categories *);
  21. CELL Rast_get_max_c_cat(const char *, const char *);
  22. char *Rast_get_cats_title(const struct Categories *);
  23. char *Rast_get_c_cat(CELL *, struct Categories *);
  24. char *Rast_get_f_cat(FCELL *, struct Categories *);
  25. char *Rast_get_d_cat(DCELL *, struct Categories *);
  26. char *Rast_get_cat(void *, struct Categories *, RASTER_MAP_TYPE);
  27. void Rast_unmark_cats(struct Categories *);
  28. void Rast_mark_c_cats(const CELL *, int, struct Categories *);
  29. void Rast_mark_f_cats(const FCELL *, int, struct Categories *);
  30. void Rast_mark_d_cats(const DCELL *, int, struct Categories *);
  31. int Rast_mark_cats(const void *, int, struct Categories *, RASTER_MAP_TYPE);
  32. void Rast_rewind_cats(struct Categories *);
  33. char *Rast_get_next_marked_d_cat(struct Categories *, DCELL *, DCELL *,
  34. long *);
  35. char *Rast_get_next_marked_c_cat(struct Categories *, CELL *, CELL *,
  36. long *);
  37. char *Rast_get_next_marked_f_cat(struct Categories *, FCELL *, FCELL *,
  38. long *);
  39. char *Rast_get_next_marked_cat(struct Categories *, void *, void *,
  40. long *, RASTER_MAP_TYPE);
  41. int Rast_set_c_cat(const CELL *, const CELL *, const char *, struct Categories *);
  42. int Rast_set_f_cat(const FCELL *, const FCELL *, const char *, struct Categories *);
  43. int Rast_set_d_cat(const DCELL *, const DCELL *, const char *, struct Categories *);
  44. int Rast_set_cat(const void *, const void *, const char *, struct Categories *,
  45. RASTER_MAP_TYPE);
  46. int Rast_write_cats(const char *, struct Categories *);
  47. int Rast_write_vector_cats(const char *, struct Categories *);
  48. char *Rast_get_ith_d_cat(const struct Categories *, int, DCELL *,
  49. DCELL *);
  50. char *Rast_get_ith_f_cat(const struct Categories *, int, void *, void *);
  51. char *Rast_get_ith_c_cat(const struct Categories *, int, void *, void *);
  52. char *Rast_get_ith_cat(const struct Categories *, int, void *, void *,
  53. RASTER_MAP_TYPE);
  54. void Rast_init_cats(const char *, struct Categories *);
  55. void Rast_set_cats_title(const char *, struct Categories *);
  56. void Rast_set_cats_fmt(const char *, double, double, double, double,
  57. struct Categories *);
  58. void Rast_free_cats(struct Categories *);
  59. void Rast_copy_cats(struct Categories *, const struct Categories *);
  60. int Rast_number_of_cats(struct Categories *);
  61. int Rast_sort_cats(struct Categories *);
  62. /* cell_stats.c */
  63. void Rast_init_cell_stats(struct Cell_stats *);
  64. int Rast_update_cell_stats(const CELL *, int, struct Cell_stats *);
  65. int Rast_find_cell_stat(CELL, long *, const struct Cell_stats *);
  66. int Rast_rewind_cell_stats(struct Cell_stats *);
  67. int Rast_next_cell_stat(CELL *, long *, struct Cell_stats *);
  68. void Rast_get_stats_for_null_value(long *, const struct Cell_stats *);
  69. void Rast_free_cell_stats(struct Cell_stats *);
  70. /* cell_title.c */
  71. char *Rast_get_cell_title(const char *, const char *);
  72. /* cellstats_eq.c */
  73. int Rast_cell_stats_histo_eq(struct Cell_stats *, CELL, CELL, CELL, CELL, int,
  74. void (*)(CELL, CELL, CELL));
  75. /* closecell.c */
  76. int Rast_close(int);
  77. int Rast_unopen(int);
  78. /* color_compat.c */
  79. void Rast_make_ryg_colors(struct Colors *, CELL, CELL);
  80. void Rast_make_ryg_fp_colors(struct Colors *, DCELL, DCELL);
  81. void Rast_make_aspect_colors(struct Colors *, CELL, CELL);
  82. void Rast_make_aspect_fp_colors(struct Colors *, DCELL, DCELL);
  83. void Rast_make_byr_colors(struct Colors *, CELL, CELL);
  84. void Rast_make_byr_fp_colors(struct Colors *, DCELL, DCELL);
  85. void Rast_make_bgyr_colors(struct Colors *, CELL, CELL);
  86. void Rast_make_bgyr_fp_colors(struct Colors *, DCELL, DCELL);
  87. void Rast_make_byg_colors(struct Colors *, CELL, CELL);
  88. void Rast_make_byg_fp_colors(struct Colors *, DCELL, DCELL);
  89. void Rast_make_grey_scale_colors(struct Colors *, CELL, CELL);
  90. void Rast_make_grey_scale_fp_colors(struct Colors *, DCELL, DCELL);
  91. void Rast_make_gyr_colors(struct Colors *, CELL, CELL);
  92. void Rast_make_gyr_fp_colors(struct Colors *, DCELL, DCELL);
  93. void Rast_make_rainbow_colors(struct Colors *, CELL, CELL);
  94. void Rast_make_rainbow_fp_colors(struct Colors *, DCELL, DCELL);
  95. void Rast_make_ramp_colors(struct Colors *, CELL, CELL);
  96. void Rast_make_ramp_fp_colors(struct Colors *, DCELL, DCELL);
  97. void Rast_make_wave_colors(struct Colors *, CELL, CELL);
  98. void Rast_make_wave_fp_colors(struct Colors *, DCELL, DCELL);
  99. /* color_free.c */
  100. void Rast_free_colors(struct Colors *);
  101. void Rast__color_free_rules(struct _Color_Info_ *);
  102. void Rast__color_free_lookup(struct _Color_Info_ *);
  103. void Rast__color_free_fp_lookup(struct _Color_Info_ *);
  104. void Rast__color_reset(struct Colors *);
  105. /* color_get.c */
  106. int Rast_get_color(const void *, int *, int *, int *, struct Colors *,
  107. RASTER_MAP_TYPE);
  108. int Rast_get_c_color(const CELL *, int *, int *, int *, struct Colors *);
  109. int Rast_get_f_color(const FCELL *, int *, int *, int *, struct Colors *);
  110. int Rast_get_d_color(const DCELL *, int *, int *, int *, struct Colors *);
  111. void Rast_get_null_value_color(int *, int *, int *, const struct Colors *);
  112. void Rast_get_default_color(int *, int *, int *, const struct Colors *);
  113. /* color_hist.c */
  114. void Rast_make_histogram_eq_colors(struct Colors *, struct Cell_stats *);
  115. void Rast_make_histogram_log_colors(struct Colors *, struct Cell_stats *, int, int);
  116. /* color_init.c */
  117. void Rast_init_colors(struct Colors *);
  118. /* color_insrt.c */
  119. int Rast__insert_color_into_lookup(CELL, int, int, int, struct _Color_Info_ *);
  120. /* color_invrt.c */
  121. int Rast_invert_colors(struct Colors *);
  122. /* color_look.c */
  123. void Rast_lookup_c_colors(const CELL *, unsigned char *, unsigned char *,
  124. unsigned char *, unsigned char *, int,
  125. struct Colors *);
  126. void Rast_lookup_colors(const void *, unsigned char *, unsigned char *,
  127. unsigned char *, unsigned char *, int,
  128. struct Colors *, RASTER_MAP_TYPE);
  129. void Rast_lookup_f_colors(const FCELL *, unsigned char *, unsigned char *,
  130. unsigned char *, unsigned char *, int,
  131. struct Colors *);
  132. void Rast_lookup_d_colors(const DCELL *, unsigned char *, unsigned char *,
  133. unsigned char *, unsigned char *, int,
  134. struct Colors *);
  135. void Rast__lookup_colors(const void *, unsigned char *, unsigned char *,
  136. unsigned char *, unsigned char *, int, struct Colors *,
  137. int, int, RASTER_MAP_TYPE);
  138. void Rast__interpolate_color_rule(DCELL, unsigned char *, unsigned char *,
  139. unsigned char *, const struct _Color_Rule_ *);
  140. /* color_org.c */
  141. void Rast__organize_colors(struct Colors *);
  142. /* color_rand.c */
  143. void Rast_make_random_colors(struct Colors *, CELL, CELL);
  144. /* color_range.c */
  145. void Rast_set_c_color_range(CELL, CELL, struct Colors *);
  146. void Rast_set_d_color_range(DCELL, DCELL, struct Colors *);
  147. void Rast_get_c_color_range(CELL *, CELL *, const struct Colors *);
  148. void Rast_get_d_color_range(DCELL *, DCELL *, const struct Colors *);
  149. /* color_read.c */
  150. int Rast_read_colors(const char *, const char *, struct Colors *);
  151. void Rast_mark_colors_as_fp(struct Colors *);
  152. /* color_remove.c */
  153. int Rast_remove_colors(const char *, const char *);
  154. /* color_rule.c */
  155. void Rast_add_d_color_rule(const DCELL *, int, int, int,
  156. const DCELL *, int, int, int,
  157. struct Colors *);
  158. void Rast_add_f_color_rule(const FCELL *, int, int, int,
  159. const FCELL *, int, int, int,
  160. struct Colors *);
  161. void Rast_add_c_color_rule(const CELL *, int, int, int,
  162. const CELL *, int, int, int,
  163. struct Colors *);
  164. void Rast_add_color_rule(const void *, int, int, int,
  165. const void *, int, int, int,
  166. struct Colors *, RASTER_MAP_TYPE);
  167. int Rast_add_modular_d_color_rule(const DCELL *, int, int, int,
  168. const DCELL *, int, int, int,
  169. struct Colors *);
  170. int Rast_add_modular_f_color_rule(const FCELL *, int, int, int,
  171. const FCELL *, int, int, int,
  172. struct Colors *);
  173. int Rast_add_modular_c_color_rule(const CELL *, int, int, int,
  174. const CELL *, int, int, int,
  175. struct Colors *);
  176. int Rast_add_modular_color_rule(const void *, int, int, int,
  177. const void *, int, int, int,
  178. struct Colors *, RASTER_MAP_TYPE);
  179. /* color_rule_get.c */
  180. int Rast_colors_count(const struct Colors *);
  181. int Rast_get_fp_color_rule(DCELL *, unsigned char *, unsigned char *,
  182. unsigned char *, DCELL *, unsigned char *,
  183. unsigned char *, unsigned char *,
  184. const struct Colors *, int);
  185. /* color_rules.c */
  186. typedef int read_rule_fn(void *, DCELL, DCELL,
  187. DCELL *, int *, int *, int *, int *, int *, int *);
  188. int Rast_parse_color_rule(DCELL, DCELL, const char *, DCELL *, int *, int *,
  189. int *, int *, int *, int *);
  190. const char *Rast_parse_color_rule_error(int);
  191. int Rast_read_color_rule(void *, DCELL, DCELL, DCELL *, int *, int *, int *,
  192. int *, int *, int *);
  193. int Rast_read_color_rules(struct Colors *, DCELL, DCELL, read_rule_fn *, void *);
  194. int Rast_load_colors(struct Colors *, const char *, CELL, CELL);
  195. int Rast_load_fp_colors(struct Colors *, const char *, DCELL, DCELL);
  196. void Rast_make_colors(struct Colors *, const char *, CELL, CELL);
  197. void Rast_make_fp_colors(struct Colors *, const char *, DCELL, DCELL);
  198. /* color_set.c */
  199. void Rast_set_color(CELL, int, int, int, struct Colors *);
  200. void Rast_set_d_color(DCELL, int, int, int, struct Colors *);
  201. void Rast_set_null_value_color(int, int, int, struct Colors *);
  202. void Rast_set_default_color(int, int, int, struct Colors *);
  203. /* color_shift.c */
  204. void Rast_shift_colors(int, struct Colors *);
  205. void Rast_shift_d_colors(DCELL, struct Colors *);
  206. /* color_write.c */
  207. int Rast_write_colors(const char *, const char *, struct Colors *);
  208. void Rast__write_colors(FILE *, struct Colors *);
  209. /* color_xform.c */
  210. void Rast_histogram_eq_colors(struct Colors *, struct Colors *,
  211. struct Cell_stats *);
  212. void Rast_histogram_eq_colors_fp(struct Colors *,
  213. struct Colors *, struct FP_stats *);
  214. void Rast_log_colors(struct Colors *, struct Colors *, int);
  215. void Rast_abs_log_colors(struct Colors *, struct Colors *, int);
  216. /* format.c */
  217. int Rast__check_format(int);
  218. int Rast__read_row_ptrs(int);
  219. int Rast__write_row_ptrs(int);
  220. /* fpreclass.c */
  221. void Rast_fpreclass_clear(struct FPReclass *);
  222. void Rast_fpreclass_reset(struct FPReclass *);
  223. void Rast_fpreclass_init(struct FPReclass *);
  224. void Rast_fpreclass_set_domain(struct FPReclass *, DCELL, DCELL);
  225. void Rast_fpreclass_set_range(struct FPReclass *, DCELL, DCELL);
  226. int Rast_fpreclass_get_limits(const struct FPReclass *, DCELL *, DCELL *,
  227. DCELL *, DCELL *);
  228. int Rast_fpreclass_nof_rules(const struct FPReclass *);
  229. void Rast_fpreclass_get_ith_rule(const struct FPReclass *, int, DCELL *, DCELL *,
  230. DCELL *, DCELL *);
  231. void Rast_fpreclass_set_neg_infinite_rule(struct FPReclass *, DCELL, DCELL);
  232. int Rast_fpreclass_get_neg_infinite_rule(const struct FPReclass *, DCELL *,
  233. DCELL *);
  234. void Rast_fpreclass_set_pos_infinite_rule(struct FPReclass *, DCELL, DCELL);
  235. int Rast_fpreclass_get_pos_infinite_rule(const struct FPReclass *, DCELL *,
  236. DCELL *);
  237. void Rast_fpreclass_add_rule(struct FPReclass *, DCELL, DCELL, DCELL, DCELL);
  238. void Rast_fpreclass_reverse_rule_order(struct FPReclass *);
  239. DCELL Rast_fpreclass_get_cell_value(const struct FPReclass *, DCELL);
  240. void Rast_fpreclass_perform_di(const struct FPReclass *, const DCELL *, CELL *,
  241. int);
  242. void Rast_fpreclass_perform_df(const struct FPReclass *, const DCELL *, FCELL *,
  243. int);
  244. void Rast_fpreclass_perform_dd(const struct FPReclass *, const DCELL *, DCELL *,
  245. int);
  246. void Rast_fpreclass_perform_fi(const struct FPReclass *, const FCELL *, CELL *,
  247. int);
  248. void Rast_fpreclass_perform_ff(const struct FPReclass *, const FCELL *, FCELL *,
  249. int);
  250. void Rast_fpreclass_perform_fd(const struct FPReclass *, const FCELL *, DCELL *,
  251. int);
  252. void Rast_fpreclass_perform_ii(const struct FPReclass *, const CELL *, CELL *,
  253. int);
  254. void Rast_fpreclass_perform_if(const struct FPReclass *, const CELL *, FCELL *,
  255. int);
  256. void Rast_fpreclass_perform_id(const struct FPReclass *, const CELL *, DCELL *,
  257. int);
  258. /* gdal.c */
  259. void Rast_init_gdal(void);
  260. struct GDAL_link *Rast_get_gdal_link(const char *, const char *);
  261. struct GDAL_link *Rast_create_gdal_link(const char *, RASTER_MAP_TYPE);
  262. void Rast_close_gdal_link(struct GDAL_link *);
  263. int Rast_close_gdal_write_link(struct GDAL_link *);
  264. /* get_cellhd.c */
  265. int Rast_get_cellhd(const char *, const char *, struct Cell_head *);
  266. /* get_row.c */
  267. int Rast_get_map_row_nomask(int, CELL *, int);
  268. int Rast_get_raster_row_nomask(int, void *, int, RASTER_MAP_TYPE);
  269. int Rast_get_c_raster_row_nomask(int, CELL *, int);
  270. int Rast_get_f_raster_row_nomask(int, FCELL *, int);
  271. int Rast_get_d_raster_row_nomask(int, DCELL *, int);
  272. int Rast_get_map_row(int, CELL *, int);
  273. int Rast_get_raster_row(int, void *, int, RASTER_MAP_TYPE);
  274. int Rast_get_c_raster_row(int, CELL *, int);
  275. int Rast_get_f_raster_row(int, FCELL *, int);
  276. int Rast_get_d_raster_row(int, DCELL *, int);
  277. int Rast_get_null_value_row(int, char *, int);
  278. /* get_row_colr.c */
  279. int Rast_get_raster_row_colors(int, int, struct Colors *,
  280. unsigned char *, unsigned char *, unsigned char *,
  281. unsigned char *);
  282. /* histo_eq.c */
  283. void Rast_histogram_eq(const struct Histogram *, unsigned char **,
  284. CELL *, CELL *);
  285. /* histogram.c */
  286. void Rast_init_histogram(struct Histogram *);
  287. int Rast_read_histogram(const char *, const char *, struct Histogram *);
  288. int Rast_write_histogram(const char *, const struct Histogram *);
  289. int Rast_write_histogram_cs(const char *, struct Cell_stats *);
  290. void Rast_make_histogram_cs(struct Cell_stats *, struct Histogram *);
  291. int Rast_get_histogram_num(const struct Histogram *);
  292. CELL Rast_get_histogram_cat(int, const struct Histogram *);
  293. long Rast_get_histogram_count(int, const struct Histogram *);
  294. void Rast_free_histogram(struct Histogram *);
  295. int Rast_sort_histogram(struct Histogram *);
  296. int Rast_sort_histogram_by_count(struct Histogram *);
  297. void Rast_remove_histogram(const char *);
  298. int Rast_add_histogram(CELL, long, struct Histogram *);
  299. int Rast_set_histogram(CELL, long, struct Histogram *);
  300. void Rast_extend_histogram(CELL, long, struct Histogram *);
  301. void Rast_zero_histogram(struct Histogram *);
  302. /* history.c */
  303. int Rast_read_history(const char *, const char *, struct History *);
  304. int Rast_write_history(const char *, struct History *);
  305. void Rast_short_history(const char *, const char *, struct History *);
  306. int Rast_command_history(struct History *);
  307. /* init.c */
  308. void Rast__init(void);
  309. void Rast__check_init(void);
  310. void Rast_init_all(void);
  311. /* interp.c */
  312. DCELL Rast_interp_linear(double, DCELL, DCELL);
  313. DCELL Rast_interp_bilinear(double, double, DCELL, DCELL, DCELL, DCELL);
  314. DCELL Rast_interp_cubic(double, DCELL, DCELL, DCELL, DCELL);
  315. DCELL Rast_interp_bicubic(double, double,
  316. DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
  317. DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
  318. DCELL);
  319. /* mask_info.c */
  320. char *Rast_mask_info(void);
  321. int Rast__mask_info(char *, char *);
  322. /* maskfd.c */
  323. int Rast_maskfd(void);
  324. /* null_val.c */
  325. void Rast__set_null_value(void *, int, int, RASTER_MAP_TYPE);
  326. void Rast_set_null_value(void *, int, RASTER_MAP_TYPE);
  327. void Rast_set_c_null_value(CELL *, int);
  328. void Rast_set_f_null_value(FCELL *, int);
  329. void Rast_set_d_null_value(DCELL *, int);
  330. int Rast_is_null_value(const void *, RASTER_MAP_TYPE);
  331. int Rast_is_c_null_value(const CELL *);
  332. int Rast_is_f_null_value(const FCELL *);
  333. int Rast_is_d_null_value(const DCELL *);
  334. void Rast_insert_null_values(void *, char *, int, RASTER_MAP_TYPE);
  335. void Rast_insert_c_null_values(CELL *, char *, int);
  336. void Rast_insert_f_null_values(FCELL *, char *, int);
  337. void Rast_insert_d_null_values(DCELL *, char *, int);
  338. int Rast__check_null_bit(const unsigned char *, int, int);
  339. void Rast__convert_01_flags(const char *, unsigned char *, int);
  340. void Rast__convert_flags_01(char *, const unsigned char *, int);
  341. void Rast__init_null_bits(unsigned char *, int);
  342. /* opencell.c */
  343. int Rast_open_cell_old(const char *, const char *);
  344. int Rast__open_cell_old(const char *, const char *);
  345. int Rast_open_cell_new(const char *);
  346. int Rast_open_cell_new_uncompressed(const char *);
  347. void Rast_want_histogram(int);
  348. void Rast_set_cell_format(int);
  349. int Rast_cellvalue_format(CELL);
  350. int Rast_open_fp_cell_new(const char *);
  351. int Rast_open_fp_cell_new_uncompressed(const char *);
  352. int Rast_set_fp_type(RASTER_MAP_TYPE);
  353. int Rast_raster_map_is_fp(const char *, const char *);
  354. RASTER_MAP_TYPE Rast_raster_map_type(const char *, const char *);
  355. RASTER_MAP_TYPE Rast__check_fp_type(const char *, const char *);
  356. RASTER_MAP_TYPE Rast_get_raster_map_type(int);
  357. int Rast_open_raster_new(const char *, RASTER_MAP_TYPE);
  358. int Rast_open_raster_new_uncompressed(const char *, RASTER_MAP_TYPE);
  359. int Rast_set_quant_rules(int, struct Quant *);
  360. /* put_cellhd.c */
  361. int Rast_put_cellhd(const char *, struct Cell_head *);
  362. /* put_row.c */
  363. int Rast_put_map_row(int, const CELL *);
  364. int Rast_put_raster_row(int, const void *, RASTER_MAP_TYPE);
  365. int Rast_put_c_raster_row(int, const CELL *);
  366. int Rast_put_f_raster_row(int, const FCELL *);
  367. int Rast_put_d_raster_row(int, const DCELL *);
  368. int Rast__open_null_write(int);
  369. int Rast__write_null_bits(int, const unsigned char *, int, int, int);
  370. /* put_title.c */
  371. int Rast_put_cell_title(const char *, const char *);
  372. /* quant.c */
  373. void Rast_quant_clear(struct Quant *);
  374. void Rast_quant_free(struct Quant *);
  375. int Rast__quant_organize_fp_lookup(struct Quant *);
  376. void Rast_quant_init(struct Quant *);
  377. int Rast_quant_is_truncate(const struct Quant *);
  378. int Rast_quant_is_round(const struct Quant *);
  379. void Rast_quant_truncate(struct Quant *);
  380. void Rast_quant_round(struct Quant *);
  381. int Rast_quant_get_limits(const struct Quant *, DCELL *, DCELL *, CELL *,
  382. CELL *);
  383. int Rast_quant_nof_rules(const struct Quant *);
  384. void Rast_quant_get_ith_rule(const struct Quant *, int, DCELL *, DCELL *, CELL *,
  385. CELL *);
  386. void Rast_quant_set_neg_infinite_rule(struct Quant *, DCELL, CELL);
  387. int Rast_quant_get_neg_infinite_rule(const struct Quant *, DCELL *, CELL *);
  388. void Rast_quant_set_pos_infinite_rule(struct Quant *, DCELL, CELL);
  389. int Rast_quant_get_pos_infinite_rule(const struct Quant *, DCELL *, CELL *);
  390. void Rast_quant_add_rule(struct Quant *, DCELL, DCELL, CELL, CELL);
  391. void Rast_quant_reverse_rule_order(struct Quant *);
  392. CELL Rast_quant_get_cell_value(struct Quant *, DCELL);
  393. void Rast_quant_perform_d(struct Quant *, const DCELL *, CELL *, int);
  394. void Rast_quant_perform_f(struct Quant *, const FCELL *, CELL *, int);
  395. struct Quant_table *Rast__quant_get_rule_for_d_raster_val(const struct Quant *,
  396. DCELL);
  397. /* quant_io.c */
  398. int Rast__quant_import(const char *, const char *, struct Quant *);
  399. int Rast__quant_export(const char *, const char *, const struct Quant *);
  400. /* quant_rw.c */
  401. int Rast_truncate_fp_map(const char *, const char *);
  402. int Rast_round_fp_map(const char *, const char *);
  403. int Rast_quantize_fp_map(const char *, const char *, CELL, CELL);
  404. int Rast_quantize_fp_map_range(const char *, const char *, DCELL, DCELL, CELL,
  405. CELL);
  406. int Rast_write_quant(const char *, const char *, const struct Quant *);
  407. int Rast_read_quant(const char *, const char *, struct Quant *);
  408. /* range.c */
  409. void Rast__remove_fp_range(const char *);
  410. void Rast_construct_default_range(struct Range *);
  411. int Rast_read_fp_range(const char *, const char *, struct FPRange *);
  412. int Rast_read_range(const char *, const char *, struct Range *);
  413. int Rast_write_range(const char *, const struct Range *);
  414. int Rast_write_fp_range(const char *, const struct FPRange *);
  415. void Rast_update_range(CELL, struct Range *);
  416. void Rast_update_fp_range(DCELL, struct FPRange *);
  417. void Rast_row_update_range(const CELL *, int, struct Range *);
  418. void Rast__row_update_range(const CELL *, int, struct Range *, int);
  419. void Rast_row_update_fp_range(const void *, int, struct FPRange *,
  420. RASTER_MAP_TYPE);
  421. void Rast_init_range(struct Range *);
  422. void Rast_get_range_min_max(const struct Range *, CELL *, CELL *);
  423. void Rast_init_fp_range(struct FPRange *);
  424. void Rast_get_fp_range_min_max(const struct FPRange *, DCELL *, DCELL *);
  425. /* raster.c */
  426. int Rast_raster_cmp(const void *, const void *, RASTER_MAP_TYPE);
  427. void Rast_raster_cpy(void *, const void *, int, RASTER_MAP_TYPE);
  428. void Rast_set_raster_value_c(void *, CELL, RASTER_MAP_TYPE);
  429. void Rast_set_raster_value_f(void *, FCELL, RASTER_MAP_TYPE);
  430. void Rast_set_raster_value_d(void *, DCELL, RASTER_MAP_TYPE);
  431. CELL Rast_get_raster_value_c(const void *, RASTER_MAP_TYPE);
  432. FCELL Rast_get_raster_value_f(const void *, RASTER_MAP_TYPE);
  433. DCELL Rast_get_raster_value_d(const void *, RASTER_MAP_TYPE);
  434. /* raster_metadata.c */
  435. int Rast_read_raster_units(const char *, const char *, char *);
  436. int Rast_read_raster_vdatum(const char *, const char *, char *);
  437. int Rast_write_raster_units(const char *, const char *);
  438. int Rast_write_raster_vdatum(const char *, const char *);
  439. int Rast__raster_misc_read_line(const char *, const char *, const char *,
  440. char *);
  441. int Rast__raster_misc_write_line(const char *, const char *, const char *);
  442. /* reclass.c */
  443. int Rast_is_reclass(const char *, const char *, char *, char *);
  444. int Rast_is_reclassed_to(const char *, const char *, int *, char ***);
  445. int Rast_get_reclass(const char *, const char *, struct Reclass *);
  446. void Rast_free_reclass(struct Reclass *);
  447. int Rast_put_reclass(const char *, const struct Reclass *);
  448. /* sample.c */
  449. DCELL Rast_get_raster_sample_nearest(int, const struct Cell_head *, struct Categories *, double, double, int);
  450. DCELL Rast_get_raster_sample_bilinear(int, const struct Cell_head *, struct Categories *, double, double, int);
  451. DCELL Rast_get_raster_sample_cubic(int, const struct Cell_head *, struct Categories *, double, double, int);
  452. DCELL Rast_get_raster_sample(int, const struct Cell_head *, struct Categories *, double, double, int, INTERP_TYPE);
  453. /* set_window.c */
  454. int Rast_set_window(struct Cell_head *);
  455. /* window_map.c */
  456. void Rast__init_window(void);
  457. void Rast__create_window_mapping(int);
  458. int Rast_row_repeat_nomask(int, int);
  459. /* zero_cell.c */
  460. void Rast_zero_cell_buf(CELL *);
  461. void Rast_zero_raster_buf(void *, RASTER_MAP_TYPE);
  462. #endif