gisdefs.h 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243
  1. /*
  2. *****************************************************************************
  3. *
  4. * MODULE: Grass Include Files
  5. * AUTHOR(S): Original author unknown - probably CERL
  6. * Justin Hickey - Thailand - jhickey@hpcc.nectec.or.th
  7. * PURPOSE: This file contains the prototypes for all the functions in the
  8. * gis library (src/libes/gis).
  9. * COPYRIGHT: (C) 2000 by the GRASS Development Team
  10. *
  11. * This program is free software under the GNU General Public
  12. * License (>=v2). Read the file COPYING that comes with GRASS
  13. * for details.
  14. *
  15. *****************************************************************************/
  16. #ifndef GRASS_GISDEFS_H
  17. #define GRASS_GISDEFS_H
  18. /*============================= Include Files ==============================*/
  19. /* none */
  20. /*=========================== Constants/Defines ============================*/
  21. /* none (look in gis.h) */
  22. /*=========================== Typedefs/Structures ==========================*/
  23. /* none (look in gis.h) */
  24. /*============================== Prototypes ================================*/
  25. /* adj_cellhd.c */
  26. char *G_adjust_Cell_head(struct Cell_head *, int, int);
  27. char *G_adjust_Cell_head3(struct Cell_head *, int, int, int);
  28. /* align_window.c */
  29. char *G_align_window(struct Cell_head *, const struct Cell_head *);
  30. /* alloc.c */
  31. void *G_malloc(size_t);
  32. void *G_calloc(size_t, size_t);
  33. void *G_realloc(void *, size_t);
  34. void G_free(void *);
  35. /* alloc_cell.c */
  36. size_t G_raster_size(RASTER_MAP_TYPE);
  37. CELL *G_allocate_cell_buf(void);
  38. void *G_allocate_raster_buf(RASTER_MAP_TYPE);
  39. CELL *G_allocate_c_raster_buf(void);
  40. FCELL *G_allocate_f_raster_buf(void);
  41. DCELL *G_allocate_d_raster_buf(void);
  42. char *G_allocate_null_buf(void);
  43. unsigned char *G__allocate_null_bits(int);
  44. int G__null_bitstream_size(int);
  45. /* area.c */
  46. int G_begin_cell_area_calculations(void);
  47. double G_area_of_cell_at_row(int);
  48. int G_begin_polygon_area_calculations(void);
  49. double G_area_of_polygon(const double *, const double *, int);
  50. /* area_ellipse.c */
  51. int G_begin_zone_area_on_ellipsoid(double, double, double);
  52. double G_darea0_on_ellipsoid(double);
  53. double G_area_for_zone_on_ellipsoid(double, double);
  54. /* area_poly1.c */
  55. int G_begin_ellipsoid_polygon_area(double, double);
  56. double G_ellipsoid_polygon_area(const double *, const double *, int);
  57. /* area_poly2.c */
  58. double G_planimetric_polygon_area(const double *, const double *, int);
  59. /* area_sphere.c */
  60. int G_begin_zone_area_on_sphere(double, double);
  61. double G_darea0_on_sphere(double);
  62. double G_area_for_zone_on_sphere(double, double);
  63. /* ascii_chk.c */
  64. int G_ascii_check(char *);
  65. /* asprintf.c */
  66. /* Do it better if you know how */
  67. /* asprintf is not found on MINGW but exists */
  68. /*
  69. * Because configure script in GDAL test is G_asprintf exists in gis lib
  70. * the G_asprintf macro is disabled until a stable version of GDAL
  71. * with a different function becomes widely used
  72. */
  73. int G_vasprintf(char **, const char *, va_list);
  74. int G_asprintf(char **, const char *, ...)
  75. __attribute__ ((format(printf, 2, 3)));
  76. /* auto_mask.c */
  77. int G__check_for_auto_masking(void);
  78. int G_suppress_masking(void);
  79. int G_unsuppress_masking(void);
  80. /* basename.c */
  81. char *G_basename(char *, const char *);
  82. /* bres_line.c */
  83. int G_bresenham_line(int, int, int, int, int (*)(int, int));
  84. /* cats.c */
  85. int G_read_cats(const char *, const char *, struct Categories *);
  86. int G_read_raster_cats(const char *, const char *, struct Categories *);
  87. int G_read_vector_cats(const char *, const char *, struct Categories *);
  88. CELL G_number_of_cats(const char *, const char *);
  89. CELL G__read_cats(const char *, const char *, const char *,
  90. struct Categories *, int);
  91. char *G_get_cats_title(const struct Categories *);
  92. char *G_get_raster_cats_title(const struct Categories *);
  93. char *G_get_cat(CELL, struct Categories *);
  94. char *G_get_c_raster_cat(CELL *, struct Categories *);
  95. char *G_get_f_raster_cat(FCELL *, struct Categories *);
  96. char *G_get_d_raster_cat(DCELL *, struct Categories *);
  97. char *G_get_raster_cat(void *, struct Categories *, RASTER_MAP_TYPE);
  98. int G_unmark_raster_cats(struct Categories *);
  99. int G_mark_c_raster_cats(const CELL *, int, struct Categories *);
  100. int G_mark_f_raster_cats(const FCELL *, int, struct Categories *);
  101. int G_mark_d_raster_cats(const DCELL *, int, struct Categories *);
  102. int G_mark_raster_cats(const void *, int, struct Categories *, RASTER_MAP_TYPE);
  103. int G_rewind_raster_cats(struct Categories *);
  104. char *G_get_next_marked_d_raster_cat(struct Categories *, DCELL *, DCELL *,
  105. long *);
  106. char *G_get_next_marked_c_raster_cat(struct Categories *, CELL *, CELL *,
  107. long *);
  108. char *G_get_next_marked_f_raster_cat(struct Categories *, FCELL *, FCELL *,
  109. long *);
  110. char *G_get_next_marked_raster_cat(struct Categories *, void *, void *,
  111. long *, RASTER_MAP_TYPE);
  112. int G_set_cat(CELL, const char *, struct Categories *);
  113. int G_set_c_raster_cat(const CELL *, const CELL *, const char *, struct Categories *);
  114. int G_set_f_raster_cat(const FCELL *, const FCELL *, const char *, struct Categories *);
  115. int G_set_d_raster_cat(const DCELL *, const DCELL *, const char *, struct Categories *);
  116. int G_set_raster_cat(const void *, const void *, const char *, struct Categories *,
  117. RASTER_MAP_TYPE);
  118. int G_write_cats(const char *, struct Categories *);
  119. int G_write_raster_cats(const char *, struct Categories *);
  120. int G_write_vector_cats(const char *, struct Categories *);
  121. int G__write_cats(const char *, const char *, struct Categories *);
  122. char *G_get_ith_d_raster_cat(const struct Categories *, int, DCELL *,
  123. DCELL *);
  124. char *G_get_ith_f_raster_cat(const struct Categories *, int, void *, void *);
  125. char *G_get_ith_c_raster_cat(const struct Categories *, int, void *, void *);
  126. char *G_get_ith_raster_cat(const struct Categories *, int, void *, void *,
  127. RASTER_MAP_TYPE);
  128. int G_init_cats(CELL, const char *, struct Categories *);
  129. int G_init_raster_cats(const char *, struct Categories *);
  130. int G_set_cats_title(const char *, struct Categories *);
  131. int G_set_raster_cats_title(const char *, struct Categories *);
  132. int G_set_cats_fmt(const char *, double, double, double, double,
  133. struct Categories *);
  134. int G_set_raster_cats_fmt(const char *, double, double, double, double,
  135. struct Categories *);
  136. int G_free_cats(struct Categories *);
  137. int G_free_raster_cats(struct Categories *);
  138. int G_copy_raster_cats(struct Categories *, const struct Categories *);
  139. int G_number_of_raster_cats(struct Categories *);
  140. int G_sort_cats(struct Categories *);
  141. /* cell_stats.c */
  142. int G_init_cell_stats(struct Cell_stats *);
  143. int G_update_cell_stats(const CELL *, int, struct Cell_stats *);
  144. int G_find_cell_stat(CELL, long *, const struct Cell_stats *);
  145. int G_rewind_cell_stats(struct Cell_stats *);
  146. int G_next_cell_stat(CELL *, long *, struct Cell_stats *);
  147. int G_get_stats_for_null_value(long *, const struct Cell_stats *);
  148. int G_free_cell_stats(struct Cell_stats *);
  149. /* cell_title.c */
  150. char *G_get_cell_title(const char *, const char *);
  151. /* cellstats_eq.c */
  152. int G_cell_stats_histo_eq(struct Cell_stats *, CELL, CELL, CELL, CELL, int,
  153. void (*)(CELL, CELL, CELL));
  154. /* chop.c */
  155. char *G_chop(char *);
  156. /* clear_scrn.c */
  157. int G_clear_screen(void);
  158. /* clicker.c */
  159. int G_clicker(void);
  160. /* closecell.c */
  161. int G_close_cell(int);
  162. int G_unopen_cell(int);
  163. int G__write_fp_format(int);
  164. /* color_compat.c */
  165. int G_make_ryg_colors(struct Colors *, CELL, CELL);
  166. int G_make_ryg_fp_colors(struct Colors *, DCELL, DCELL);
  167. int G_make_aspect_colors(struct Colors *, CELL, CELL);
  168. int G_make_aspect_fp_colors(struct Colors *, DCELL, DCELL);
  169. int G_make_byr_colors(struct Colors *, CELL, CELL);
  170. int G_make_byr_fp_colors(struct Colors *, DCELL, DCELL);
  171. int G_make_bgyr_colors(struct Colors *, CELL, CELL);
  172. int G_make_bgyr_fp_colors(struct Colors *, DCELL, DCELL);
  173. int G_make_byg_colors(struct Colors *, CELL, CELL);
  174. int G_make_byg_fp_colors(struct Colors *, DCELL, DCELL);
  175. int G_make_grey_scale_colors(struct Colors *, CELL, CELL);
  176. int G_make_grey_scale_fp_colors(struct Colors *, double, double);
  177. int G_make_gyr_colors(struct Colors *, CELL, CELL);
  178. int G_make_gyr_fp_colors(struct Colors *, DCELL, DCELL);
  179. int G_make_rainbow_colors(struct Colors *, CELL, CELL);
  180. int G_make_rainbow_fp_colors(struct Colors *, DCELL, DCELL);
  181. int G_make_ramp_colors(struct Colors *, CELL, CELL);
  182. int G_make_ramp_fp_colors(struct Colors *, DCELL, DCELL);
  183. int G_make_wave_colors(struct Colors *, CELL, CELL);
  184. int G_make_wave_fp_colors(struct Colors *, DCELL, DCELL);
  185. /* color_free.c */
  186. int G_free_colors(struct Colors *);
  187. int G__color_free_rules(struct _Color_Info_ *);
  188. int G__color_free_lookup(struct _Color_Info_ *);
  189. int G__color_free_fp_lookup(struct _Color_Info_ *);
  190. int G__color_reset(struct Colors *);
  191. /* color_get.c */
  192. int G_get_color(CELL, int *, int *, int *, struct Colors *);
  193. int G_get_raster_color(const void *, int *, int *, int *, struct Colors *,
  194. RASTER_MAP_TYPE);
  195. int G_get_c_raster_color(const CELL *, int *, int *, int *, struct Colors *);
  196. int G_get_f_raster_color(const FCELL *, int *, int *, int *, struct Colors *);
  197. int G_get_d_raster_color(const DCELL *, int *, int *, int *, struct Colors *);
  198. int G_get_null_value_color(int *, int *, int *, const struct Colors *);
  199. int G_get_default_color(int *, int *, int *, const struct Colors *);
  200. /* color_hist.c */
  201. int G_make_histogram_eq_colors(struct Colors *, struct Cell_stats *);
  202. int G_make_histogram_log_colors(struct Colors *, struct Cell_stats *, int,
  203. int);
  204. /* color_init.c */
  205. int G_init_colors(struct Colors *);
  206. /* color_insrt.c */
  207. int G__insert_color_into_lookup(CELL, int, int, int, struct _Color_Info_ *);
  208. /* color_invrt.c */
  209. int G_invert_colors(struct Colors *);
  210. /* color_look.c */
  211. int G_lookup_colors(const CELL *, unsigned char *, unsigned char *,
  212. unsigned char *, unsigned char *, int, struct Colors *);
  213. int G_lookup_c_raster_colors(const CELL *, unsigned char *, unsigned char *,
  214. unsigned char *, unsigned char *, int,
  215. struct Colors *);
  216. int G_lookup_raster_colors(const void *, unsigned char *, unsigned char *,
  217. unsigned char *, unsigned char *, int,
  218. struct Colors *, RASTER_MAP_TYPE);
  219. int G_lookup_f_raster_colors(const FCELL *, unsigned char *, unsigned char *,
  220. unsigned char *, unsigned char *, int,
  221. struct Colors *);
  222. int G_lookup_d_raster_colors(const DCELL *, unsigned char *, unsigned char *,
  223. unsigned char *, unsigned char *, int,
  224. struct Colors *);
  225. int G__lookup_colors(const void *, unsigned char *, unsigned char *,
  226. unsigned char *, unsigned char *, int, struct Colors *,
  227. int, int, RASTER_MAP_TYPE);
  228. int G__interpolate_color_rule(DCELL, unsigned char *, unsigned char *,
  229. unsigned char *, const struct _Color_Rule_ *);
  230. /* color_org.c */
  231. int G__organize_colors(struct Colors *);
  232. /* color_rand.c */
  233. int G_make_random_colors(struct Colors *, CELL, CELL);
  234. /* color_range.c */
  235. int G_set_color_range(CELL, CELL, struct Colors *);
  236. int G_set_d_color_range(DCELL, DCELL, struct Colors *);
  237. int G_get_color_range(CELL *, CELL *, const struct Colors *);
  238. int G_get_d_color_range(DCELL *, DCELL *, const struct Colors *);
  239. /* color_read.c */
  240. int G_read_colors(const char *, const char *, struct Colors *);
  241. int G_mark_colors_as_fp(struct Colors *);
  242. /* color_remove.c */
  243. int G_remove_colors(const char *, const char *);
  244. /* color_rule.c */
  245. int G_add_d_raster_color_rule(const DCELL *, int, int, int, const DCELL *,
  246. int, int, int, struct Colors *);
  247. int G_add_f_raster_color_rule(const FCELL *, int, int, int, const FCELL *,
  248. int, int, int, struct Colors *);
  249. int G_add_c_raster_color_rule(const CELL *, int, int, int, const CELL *, int,
  250. int, int, struct Colors *);
  251. int G_add_raster_color_rule(const void *, int, int, int, const void *, int,
  252. int, int, struct Colors *, RASTER_MAP_TYPE);
  253. int G_add_color_rule(const CELL, int, int, int, const CELL, int, int, int,
  254. struct Colors *);
  255. int G_add_modular_d_raster_color_rule(const DCELL *, int, int, int,
  256. const DCELL *, int, int, int,
  257. struct Colors *);
  258. int G_add_modular_f_raster_color_rule(const FCELL *, int, int, int,
  259. const FCELL *, int, int, int,
  260. struct Colors *);
  261. int G_add_modular_c_raster_color_rule(const CELL *, int, int, int,
  262. const CELL *, int, int, int,
  263. struct Colors *);
  264. int G_add_modular_raster_color_rule(const void *, int, int, int, const void *,
  265. int, int, int, struct Colors *,
  266. RASTER_MAP_TYPE);
  267. int G_add_modular_color_rule(CELL, int, int, int, CELL, int, int, int,
  268. struct Colors *);
  269. /* color_rule_get.c */
  270. int G_colors_count(const struct Colors *);
  271. int G_get_f_color_rule(DCELL *, unsigned char *, unsigned char *,
  272. unsigned char *, DCELL *, unsigned char *,
  273. unsigned char *, unsigned char *,
  274. const struct Colors *, int);
  275. /* color_rules.c */
  276. typedef int read_rule_fn(void *, DCELL, DCELL,
  277. DCELL *, int *, int *, int *, int *, int *, int *);
  278. int G_parse_color_rule(DCELL, DCELL, const char *, DCELL *, int *, int *,
  279. int *, int *, int *, int *);
  280. const char *G_parse_color_rule_error(int);
  281. int G_read_color_rule(void *, DCELL, DCELL, DCELL *, int *, int *, int *,
  282. int *, int *, int *);
  283. int G_read_color_rules(struct Colors *, DCELL, DCELL, read_rule_fn *, void *);
  284. int G_load_colors(struct Colors *, const char *, CELL, CELL);
  285. int G_load_fp_colors(struct Colors *, const char *, DCELL, DCELL);
  286. int G_make_colors(struct Colors *, const char *, CELL, CELL);
  287. int G_make_fp_colors(struct Colors *, const char *, DCELL, DCELL);
  288. /* color_set.c */
  289. int G_set_color(CELL, int, int, int, struct Colors *);
  290. int G_set_d_color(DCELL, int, int, int, struct Colors *);
  291. int G_set_null_value_color(int, int, int, struct Colors *);
  292. int G_set_default_color(int, int, int, struct Colors *);
  293. /* color_shift.c */
  294. int G_shift_colors(int, struct Colors *);
  295. int G_shift_d_colors(DCELL, struct Colors *);
  296. /* color_str.c */
  297. int G_str_to_color(const char *, int *, int *, int *);
  298. /* color_write.c */
  299. int G_write_colors(const char *, const char *, struct Colors *);
  300. int G__write_colors(FILE *, struct Colors *);
  301. /* color_xform.c */
  302. int G_histogram_eq_colors(struct Colors *, struct Colors *,
  303. struct Cell_stats *);
  304. int G_log_colors(struct Colors *, struct Colors *, int);
  305. /* commas.c */
  306. int G_insert_commas(char *);
  307. int G_remove_commas(char *);
  308. /* copy.c */
  309. int G_copy(void *, const void *, int);
  310. /* copy_file.c */
  311. int G_copy_file(const char *, const char *);
  312. int G_recursive_copy(const char *, const char *);
  313. /* dalloc.c */
  314. double *G_alloc_vector(size_t);
  315. double **G_alloc_matrix(int, int);
  316. float *G_alloc_fvector(size_t);
  317. float **G_alloc_fmatrix(int, int);
  318. void G_free_vector(double *);
  319. void G_free_matrix(double **);
  320. void G_free_fvector(float *);
  321. void G_free_fmatrix(float **);
  322. /* date.c */
  323. char *G_date(void);
  324. /* datum.c */
  325. int G_get_datum_by_name(const char *);
  326. char *G_datum_name(int);
  327. char *G_datum_description(int);
  328. char *G_datum_ellipsoid(int);
  329. int G_get_datumparams_from_projinfo(const struct Key_Value *projinfo,
  330. char *datumname, char *params);
  331. /* debug.c */
  332. int G_debug(int, const char *, ...) __attribute__ ((format(printf, 2, 3)));
  333. /* distance.c */
  334. int G_begin_distance_calculations(void);
  335. double G_distance(double, double, double, double);
  336. double G_distance_between_line_segments(double, double, double, double,
  337. double, double, double, double);
  338. double G_distance_point_to_line_segment(double, double, double, double,
  339. double, double);
  340. /* done_msg.c */
  341. int G_done_msg(const char *, ...) __attribute__ ((format(printf, 1, 2)));
  342. /* eigen_tools.c */
  343. int G_tqli(double[], double[], int, double **);
  344. void G_tred2(double **, int, double[], double[]);
  345. /* endian.c */
  346. int G_is_little_endian(void);
  347. /* env.c */
  348. char *G_getenv(const char *);
  349. char *G_getenv2(const char *, int);
  350. char *G__getenv(const char *);
  351. char *G__getenv2(const char *, int);
  352. int G_setenv(const char *, const char *);
  353. int G_setenv2(const char *, const char *, int);
  354. int G__setenv(const char *, const char *);
  355. int G__setenv2(const char *, const char *, int);
  356. int G_unsetenv(const char *);
  357. int G_unsetenv2(const char *, int);
  358. int G__write_env(void);
  359. char *G__env_name(int);
  360. int G__read_env(void);
  361. void G_set_gisrc_mode(int);
  362. int G_get_gisrc_mode(void);
  363. int G__set_gisrc_file(const char *);
  364. char *G__get_gisrc_file(void);
  365. int G__create_alt_env(void);
  366. int G__switch_env(void);
  367. /* error.c */
  368. int G_info_format(void);
  369. void G_message(const char *, ...) __attribute__ ((format(printf, 1, 2)));
  370. void G_verbose_message(const char *, ...)
  371. __attribute__ ((format(printf, 1, 2)));
  372. void G_important_message(const char *, ...)
  373. __attribute__ ((format(printf, 1, 2)));
  374. int G_fatal_error(const char *, ...) __attribute__ ((format(printf, 1, 2)))
  375. __attribute__ ((noreturn));
  376. int G_warning(const char *, ...) __attribute__ ((format(printf, 1, 2)));
  377. int G_suppress_warnings(int);
  378. int G_sleep_on_error(int);
  379. int G_set_error_routine(int (*)(const char *, int));
  380. int G_unset_error_routine(void);
  381. /* file_name.c */
  382. char *G__file_name(char *, const char *, const char *, const char *);
  383. char *G__file_name_misc(char *, const char *, const char *, const char *,
  384. const char *);
  385. /* find_cell.c */
  386. char *G_find_cell(char *, const char *);
  387. char *G_find_cell2(const char *, const char *);
  388. /* find_file.c */
  389. char *G_find_file(const char *, char *, const char *);
  390. char *G_find_file2(const char *, const char *, const char *);
  391. char *G_find_file_misc(const char *, const char *, char *, const char *);
  392. char *G_find_file2_misc(const char *, const char *, const char *,
  393. const char *);
  394. /* find_etc.c */
  395. char *G_find_etc(const char *);
  396. /* find_vect.c */
  397. char *G_find_vector(char *, const char *);
  398. char *G_find_vector2(const char *, const char *);
  399. /* flate.c */
  400. int G_zlib_compress(const unsigned char *, int, unsigned char *, int);
  401. int G_zlib_expand(const unsigned char *, int, unsigned char *, int);
  402. int G_zlib_write(int, const unsigned char *, int);
  403. int G_zlib_read(int, int, unsigned char *, int);
  404. int G_zlib_write_noCompress(int, const unsigned char *, int);
  405. /* fork.c */
  406. int G_fork(void);
  407. /* format.c */
  408. int G__check_format(int);
  409. int G__read_row_ptrs(int);
  410. int G__write_row_ptrs(int);
  411. /* fpreclass.c */
  412. void G_fpreclass_clear(struct FPReclass *);
  413. void G_fpreclass_reset(struct FPReclass *);
  414. int G_fpreclass_init(struct FPReclass *);
  415. void G_fpreclass_set_domain(struct FPReclass *, DCELL, DCELL);
  416. void G_fpreclass_set_range(struct FPReclass *, DCELL, DCELL);
  417. int G_fpreclass_get_limits(const struct FPReclass *, DCELL *, DCELL *,
  418. DCELL *, DCELL *);
  419. int G_fpreclass_nof_rules(const struct FPReclass *);
  420. void G_fpreclass_get_ith_rule(const struct FPReclass *, int, DCELL *, DCELL *,
  421. DCELL *, DCELL *);
  422. void G_fpreclass_set_neg_infinite_rule(struct FPReclass *, DCELL, DCELL);
  423. int G_fpreclass_get_neg_infinite_rule(const struct FPReclass *, DCELL *,
  424. DCELL *);
  425. void G_fpreclass_set_pos_infinite_rule(struct FPReclass *, DCELL, DCELL);
  426. int G_fpreclass_get_pos_infinite_rule(const struct FPReclass *, DCELL *,
  427. DCELL *);
  428. void G_fpreclass_add_rule(struct FPReclass *, DCELL, DCELL, DCELL, DCELL);
  429. void G_fpreclass_reverse_rule_order(struct FPReclass *);
  430. DCELL G_fpreclass_get_cell_value(const struct FPReclass *, DCELL);
  431. void G_fpreclass_perform_di(const struct FPReclass *, const DCELL *, CELL *,
  432. int);
  433. void G_fpreclass_perform_df(const struct FPReclass *, const DCELL *, FCELL *,
  434. int);
  435. void G_fpreclass_perform_dd(const struct FPReclass *, const DCELL *, DCELL *,
  436. int);
  437. void G_fpreclass_perform_fi(const struct FPReclass *, const FCELL *, CELL *,
  438. int);
  439. void G_fpreclass_perform_ff(const struct FPReclass *, const FCELL *, FCELL *,
  440. int);
  441. void G_fpreclass_perform_fd(const struct FPReclass *, const FCELL *, DCELL *,
  442. int);
  443. void G_fpreclass_perform_ii(const struct FPReclass *, const CELL *, CELL *,
  444. int);
  445. void G_fpreclass_perform_if(const struct FPReclass *, const CELL *, FCELL *,
  446. int);
  447. void G_fpreclass_perform_id(const struct FPReclass *, const CELL *, DCELL *,
  448. int);
  449. /* geodesic.c */
  450. int G_begin_geodesic_equation(double, double, double, double);
  451. double G_geodesic_lat_from_lon(double);
  452. /* geodist.c */
  453. int G_begin_geodesic_distance(double, double);
  454. int G_set_geodesic_distance_lat1(double);
  455. int G_set_geodesic_distance_lat2(double);
  456. double G_geodesic_distance_lon_to_lon(double, double);
  457. double G_geodesic_distance(double, double, double, double);
  458. /* get_cellhd.c */
  459. int G_get_cellhd(const char *, const char *, struct Cell_head *);
  460. /* get_ellipse.c */
  461. int G_get_ellipsoid_parameters(double *, double *);
  462. int G_get_spheroid_by_name(const char *, double *, double *, double *);
  463. int G_get_ellipsoid_by_name(const char *, double *, double *);
  464. char *G_ellipsoid_name(int);
  465. char *G_ellipsoid_description(int);
  466. /* get_projinfo.c */
  467. struct Key_Value *G_get_projunits(void);
  468. struct Key_Value *G_get_projinfo(void);
  469. /* get_row.c */
  470. int G_get_map_row_nomask(int, CELL *, int);
  471. int G_get_raster_row_nomask(int, void *, int, RASTER_MAP_TYPE);
  472. int G_get_c_raster_row_nomask(int, CELL *, int);
  473. int G_get_f_raster_row_nomask(int, FCELL *, int);
  474. int G_get_d_raster_row_nomask(int, DCELL *, int);
  475. int G_get_map_row(int, CELL *, int);
  476. int G_get_raster_row(int, void *, int, RASTER_MAP_TYPE);
  477. int G_get_c_raster_row(int, CELL *, int);
  478. int G_get_f_raster_row(int, FCELL *, int);
  479. int G_get_d_raster_row(int, DCELL *, int);
  480. int G_get_null_value_row(int, char *, int);
  481. /* get_row_colr.c */
  482. int G_get_raster_row_colors(int, int, struct Colors *,
  483. unsigned char *, unsigned char *, unsigned char *,
  484. unsigned char *);
  485. /* get_window.c */
  486. int G_get_window(struct Cell_head *);
  487. int G_get_default_window(struct Cell_head *);
  488. char *G__get_window(struct Cell_head *, const char *, const char *,
  489. const char *);
  490. /* getl.c */
  491. int G_getl(char *, int, FILE *);
  492. int G_getl2(char *, int, FILE *);
  493. /* gisbase.c */
  494. char *G_gisbase(void);
  495. /* gisdbase.c */
  496. char *G_gisdbase(void);
  497. /* gishelp.c */
  498. int G_gishelp(const char *, const char *);
  499. /* gisinit.c */
  500. int G__gisinit(const char *, const char *);
  501. int G__no_gisinit(const char *);
  502. int G__check_gisinit(void);
  503. /* histo_eq.c */
  504. int G_histogram_eq(const struct Histogram *, unsigned char **, CELL *,
  505. CELL *);
  506. /* histogram.c */
  507. int G_init_histogram(struct Histogram *);
  508. int G_read_histogram(const char *, const char *, struct Histogram *);
  509. int G_write_histogram(const char *, const struct Histogram *);
  510. int G_write_histogram_cs(const char *, struct Cell_stats *);
  511. int G_make_histogram_cs(struct Cell_stats *, struct Histogram *);
  512. int G_get_histogram_num(const struct Histogram *);
  513. CELL G_get_histogram_cat(int, const struct Histogram *);
  514. long G_get_histogram_count(int, const struct Histogram *);
  515. int G_free_histogram(struct Histogram *);
  516. int G_sort_histogram(struct Histogram *);
  517. int G_sort_histogram_by_count(struct Histogram *);
  518. int G_remove_histogram(const char *);
  519. int G_add_histogram(CELL, long, struct Histogram *);
  520. int G_set_histogram(CELL, long, struct Histogram *);
  521. int G_extend_histogram(CELL, long, struct Histogram *);
  522. int G_zero_histogram(struct Histogram *);
  523. /* history.c */
  524. int G_read_history(const char *, const char *, struct History *);
  525. int G_write_history(const char *, struct History *);
  526. int G_short_history(const char *, const char *, struct History *);
  527. int G_command_history(struct History *);
  528. /* home.c */
  529. char *G_home(void);
  530. char *G__home(void);
  531. /* ialloc.c */
  532. int *G_alloc_ivector(size_t);
  533. int **G_alloc_imatrix(int, int);
  534. void G_free_ivector(int *);
  535. void G_free_imatrix(int **);
  536. /* index.c */
  537. char *G_index(const char *, int);
  538. char *G_rindex(const char *, int);
  539. /* init_map.c */
  540. int G__random_d_initialize_0(int, int, int);
  541. int G__random_f_initialize_0(int, int, int);
  542. /* interp.c */
  543. DCELL G_interp_linear(double, DCELL, DCELL);
  544. DCELL G_interp_bilinear(double, double, DCELL, DCELL, DCELL, DCELL);
  545. DCELL G_interp_cubic(double, DCELL, DCELL, DCELL, DCELL);
  546. DCELL G_interp_bicubic(double, double,
  547. DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
  548. DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
  549. DCELL);
  550. /* intersect.c */
  551. int G_intersect_line_segments(double, double, double, double, double, double,
  552. double, double, double *, double *, double *,
  553. double *);
  554. /* intr_char.c */
  555. char G_intr_char(void);
  556. /* is.c */
  557. int G_is_gisbase(const char *);
  558. int G_is_location(const char *);
  559. int G_is_mapset(const char *);
  560. /* key_value1.c */
  561. struct Key_Value *G_create_key_value(void);
  562. int G_set_key_value(const char *, const char *, struct Key_Value *);
  563. char *G_find_key_value(const char *, const struct Key_Value *);
  564. int G_free_key_value(struct Key_Value *);
  565. /* key_value2.c */
  566. int G_fwrite_key_value(FILE *, const struct Key_Value *);
  567. struct Key_Value *G_fread_key_value(FILE *);
  568. /* key_value3.c */
  569. int G_write_key_value_file(const char *, const struct Key_Value *, int *);
  570. struct Key_Value *G_read_key_value_file(const char *, int *);
  571. /* key_value4.c */
  572. int G_update_key_value_file(const char *, const char *, const char *);
  573. int G_lookup_key_value_from_file(const char *, const char *, char[], int);
  574. /* legal_name.c */
  575. int G_legal_filename(const char *);
  576. int G_check_input_output_name(const char *, const char *, int);
  577. /* line_dist.c */
  578. int G_set_distance_to_line_tolerance(double);
  579. double G_distance2_point_to_line(double, double, double, double, double,
  580. double);
  581. /* list.c */
  582. int G_set_list_hit_return(int);
  583. int G_list_element(const char *, const char *, const char *,
  584. int (*)(const char *, const char *, const char *));
  585. char **G_list(int, const char *, const char *, const char *);
  586. void G_free_list(char **);
  587. /* ll_format.c */
  588. int G_lat_format(double, char *);
  589. char *G_lat_format_string(void);
  590. int G_lon_format(double, char *);
  591. char *G_lon_format_string(void);
  592. int G_llres_format(double, char *);
  593. char *G_llres_format_string(void);
  594. int G_lat_parts(double, int *, int *, double *, char *);
  595. int G_lon_parts(double, int *, int *, double *, char *);
  596. /* ll_scan.c */
  597. int G_lat_scan(const char *, double *);
  598. int G_lon_scan(const char *, double *);
  599. int G_llres_scan(const char *, double *);
  600. /* location.c */
  601. char *G_location_path(void);
  602. char *G_location(void);
  603. char *G__location_path(void);
  604. /* ls.c */
  605. char **G__ls(const char *, int *);
  606. void G_ls(const char *, FILE *);
  607. void G_ls_format(char **, int, int, FILE *);
  608. /* lu.c */
  609. int G_ludcmp(double **, int, int *, double *);
  610. void G_lubksb(double **, int, int *, double[]);
  611. /* lzw.c */
  612. unsigned char *lzw_decode(unsigned char *, unsigned int);
  613. int lzw_expand(int (*)(), int (*)());
  614. int G_lzw_nof_read_bytes(void);
  615. int G_lzw_max_used_bits(void);
  616. void G_lzw_set_bits(int);
  617. int G_lzw_compress(unsigned char *, unsigned char *, int);
  618. int G_lzw_expand(unsigned char *, unsigned char *, int);
  619. int G_lzw_compress_count_only_array(unsigned char *, int);
  620. int G_lzw_compress_count_only_file(int);
  621. int G_lzw_write(int, unsigned char *, int);
  622. int G_lzw_write_noCompress(int, unsigned char *, int);
  623. int G_lzw_test_status(int);
  624. int G_lzw_read2(int, unsigned char *, int, int);
  625. int G_lzw_read(int, unsigned char *, int);
  626. int G_lzw_transfer_compress(int, int, int);
  627. int G_lzw_transfer_expand(int, int, int);
  628. /* mach_name.c */
  629. char *G__machine_name(void);
  630. /* make_loc.c */
  631. int G__make_location(const char *, struct Cell_head *, struct Key_Value *,
  632. struct Key_Value *, FILE *);
  633. int G_make_location(const char *, struct Cell_head *, struct Key_Value *,
  634. struct Key_Value *, FILE *);
  635. int G_compare_projections(const struct Key_Value *, const struct Key_Value *,
  636. const struct Key_Value *, const struct Key_Value *);
  637. /* make_mapset.c */
  638. int G__make_mapset(const char *gisdbase_name, const char *location_name,
  639. const char *mapset_name);
  640. int G_make_mapset(const char *gisdbase_name, const char *location_name,
  641. const char *mapset_name);
  642. /* mapcase.c */
  643. char *G_tolcase(char *);
  644. char *G_toucase(char *);
  645. /* mapset.c */
  646. char *G_mapset(void);
  647. char *G__mapset(void);
  648. /* mapset_msc.c */
  649. int G__make_mapset_element(const char *);
  650. int G__make_mapset_element_misc(const char *, const char *);
  651. int G__mapset_permissions(const char *);
  652. int G__mapset_permissions2(const char *, const char *, const char *);
  653. /* mapset_nme.c */
  654. char *G__mapset_name(int);
  655. int G__create_alt_search_path(void);
  656. int G__switch_search_path(void);
  657. int G_reset_mapsets(void);
  658. char **G_available_mapsets(void);
  659. void G_add_mapset_to_search_path(const char *mapset);
  660. /* mask_info.c */
  661. char *G_mask_info(void);
  662. int G__mask_info(char *, char *);
  663. /* maskfd.c */
  664. int G_maskfd(void);
  665. /* myname.c */
  666. char *G_myname(void);
  667. /* named_colr.c */
  668. int G_color_values(const char *, float *, float *, float *);
  669. const char *G_color_name(int);
  670. /* nl_to_spaces.c */
  671. void G_newlines_to_spaces(char *);
  672. /* nme_in_mps.c */
  673. int G__name_in_mapset(const char *, char *, char *);
  674. int G__name_is_fully_qualified(const char *, char *, char *);
  675. char *G_fully_qualified_name(const char *, const char *);
  676. /* null_val.c */
  677. void G__init_null_patterns(void);
  678. void G__set_null_value(void *, int, int, RASTER_MAP_TYPE);
  679. void G_set_null_value(void *, int, RASTER_MAP_TYPE);
  680. void G_set_c_null_value(CELL *, int);
  681. void G_set_f_null_value(FCELL *, int);
  682. void G_set_d_null_value(DCELL *, int);
  683. int G_is_null_value(const void *, RASTER_MAP_TYPE);
  684. int G_is_c_null_value(const CELL *);
  685. int G_is_f_null_value(const FCELL *);
  686. int G_is_d_null_value(const DCELL *);
  687. int G_insert_null_values(void *, char *, int, RASTER_MAP_TYPE);
  688. int G_insert_c_null_values(CELL *, char *, int);
  689. int G_insert_f_null_values(FCELL *, char *, int);
  690. int G_insert_d_null_values(DCELL *, char *, int);
  691. int G__check_null_bit(const unsigned char *, int, int);
  692. int G__set_flags_from_01_random(const char *, unsigned char *, int, int, int);
  693. int G__convert_01_flags(const char *, unsigned char *, int);
  694. int G__convert_flags_01(char *, const unsigned char *, int);
  695. int G__init_null_bits(unsigned char *, int);
  696. /* open.c */
  697. int G_open_new(const char *, const char *);
  698. int G_open_old(const char *, const char *, const char *);
  699. int G_open_update(const char *, const char *);
  700. FILE *G_fopen_new(const char *, const char *);
  701. FILE *G_fopen_old(const char *, const char *, const char *);
  702. FILE *G_fopen_append(const char *, const char *);
  703. FILE *G_fopen_modify(const char *, const char *);
  704. /* open_misc.c */
  705. int G_open_new_misc(const char *, const char *, const char *);
  706. int G_open_old_misc(const char *, const char *, const char *, const char *);
  707. int G_open_update_misc(const char *, const char *, const char *);
  708. FILE *G_fopen_new_misc(const char *, const char *, const char *);
  709. FILE *G_fopen_old_misc(const char *, const char *, const char *,
  710. const char *);
  711. FILE *G_fopen_append_misc(const char *, const char *, const char *);
  712. FILE *G_fopen_modify_misc(const char *, const char *, const char *);
  713. /* opencell.c */
  714. int G_open_cell_old(const char *, const char *);
  715. int G__open_cell_old(const char *, const char *);
  716. int G_open_cell_new(const char *);
  717. int G_open_cell_new_random(const char *);
  718. int G_open_cell_new_uncompressed(const char *);
  719. int G_want_histogram(int);
  720. int G_set_cell_format(int);
  721. int G_cellvalue_format(CELL);
  722. int G_open_fp_cell_new(const char *);
  723. int G_open_fp_cell_new_uncompressed(const char *);
  724. int G__reallocate_work_buf(int);
  725. int G__reallocate_null_buf(void);
  726. int G__reallocate_mask_buf(void);
  727. int G__reallocate_temp_buf(void);
  728. int G_set_fp_type(RASTER_MAP_TYPE);
  729. int G_raster_map_is_fp(const char *, const char *);
  730. RASTER_MAP_TYPE G_raster_map_type(const char *, const char *);
  731. RASTER_MAP_TYPE G_raster_map_type2(const char *, const char *);
  732. RASTER_MAP_TYPE G__check_fp_type(const char *, const char *);
  733. RASTER_MAP_TYPE G_get_raster_map_type(int);
  734. int G_open_raster_new(const char *, RASTER_MAP_TYPE);
  735. int G_open_raster_new_uncompressed(const char *, RASTER_MAP_TYPE);
  736. int G_set_quant_rules(int, struct Quant *);
  737. /* overwrite.c */
  738. int G_check_overwrite(int argc, char **argv);
  739. /* parser.c */
  740. int G_disable_interactive(void);
  741. struct GModule *G_define_module(void);
  742. struct Flag *G_define_flag(void);
  743. struct Option *G_define_option(void);
  744. struct Option *G_define_standard_option(int);
  745. int G_parser(int, char **);
  746. int G_usage(void);
  747. char *G_recreate_command(void);
  748. /* paths.c */
  749. int G_mkdir(const char *);
  750. int G_is_dirsep(char);
  751. int G_is_absolute_path(const char *);
  752. char *G_convert_dirseps_to_host(char *);
  753. char *G_convert_dirseps_from_host(char *);
  754. struct stat;
  755. int G_lstat(const char *, struct stat *);
  756. int G_stat(const char *, struct stat *);
  757. /* percent.c */
  758. int G_percent(long, long, int);
  759. int G_percent2(long, long, int, FILE *);
  760. int G_percent_reset(void);
  761. /* plot.c */
  762. int G_setup_plot(double, double, double, double, int (*)(int, int),
  763. int (*)(int, int));
  764. int G_setup_fill(int);
  765. int G_plot_where_xy(double, double, int *, int *);
  766. int G_plot_where_en(int, int, double *, double *);
  767. int G_plot_point(double, double);
  768. int G_plot_line(double, double, double, double);
  769. int G_plot_line2(double, double, double, double);
  770. int G_plot_polygon(const double *, const double *, int);
  771. int G_plot_area(double *const *, double *const *, int *, int);
  772. int G_plot_fx(double (*)(double), double, double);
  773. int G_plot_icon(double, double, int, double, double);
  774. /* pole_in_poly.c */
  775. int G_pole_in_polygon(const double *, const double *, int);
  776. /* popen.c */
  777. FILE *G_popen(const char *, const char *);
  778. int G_pclose(FILE *);
  779. /* progrm_nme.c */
  780. const char *G_program_name(void);
  781. int G_set_program_name(const char *);
  782. /* proj1.c */
  783. int G_projection(void);
  784. /* proj2.c */
  785. int G__projection_units(int);
  786. char *G__unit_name(int, int);
  787. char *G__projection_name(int);
  788. /* proj3.c */
  789. char *G_database_unit_name(int);
  790. char *G_database_projection_name(void);
  791. double G_database_units_to_meters_factor(void);
  792. char *G_database_datum_name(void);
  793. char *G_database_ellipse_name(void);
  794. /* put_cellhd.c */
  795. int G_put_cellhd(const char *, struct Cell_head *);
  796. /* put_row.c */
  797. int G_zeros_r_nulls(int);
  798. int G_put_map_row(int, const CELL *);
  799. int G_put_map_row_random(int, const CELL *, int, int, int);
  800. int G__put_null_value_row(int, const char *);
  801. int G_put_raster_row(int, const void *, RASTER_MAP_TYPE);
  802. int G_put_c_raster_row(int, const CELL *);
  803. int G_put_f_raster_row(int, const FCELL *);
  804. int G_put_d_raster_row(int, const DCELL *);
  805. int G__write_data(int, int, int);
  806. int G__write_data_compressed(int, int, int);
  807. int G__open_null_write(int);
  808. int G__write_null_bits(int, const unsigned char *, int, int, int);
  809. /* put_title.c */
  810. int G_put_cell_title(const char *, const char *);
  811. /* put_window.c */
  812. int G_put_window(const struct Cell_head *);
  813. int G__put_window(const struct Cell_head *, char *, char *);
  814. /* putenv.c */
  815. void G_putenv(const char *, const char *);
  816. /* quant.c */
  817. void G_quant_clear(struct Quant *);
  818. void G_quant_free(struct Quant *);
  819. int G__quant_organize_fp_lookup(struct Quant *);
  820. int G_quant_init(struct Quant *);
  821. int G_quant_is_truncate(const struct Quant *);
  822. int G_quant_is_round(const struct Quant *);
  823. int G_quant_truncate(struct Quant *);
  824. int G_quant_round(struct Quant *);
  825. int G_quant_get_limits(const struct Quant *, DCELL *, DCELL *, CELL *,
  826. CELL *);
  827. int G_quant_nof_rules(const struct Quant *);
  828. void G_quant_get_ith_rule(const struct Quant *, int, DCELL *, DCELL *, CELL *,
  829. CELL *);
  830. void G_quant_set_neg_infinite_rule(struct Quant *, DCELL, CELL);
  831. int G_quant_get_neg_infinite_rule(const struct Quant *, DCELL *, CELL *);
  832. void G_quant_set_pos_infinite_rule(struct Quant *, DCELL, CELL);
  833. int G_quant_get_pos_infinite_rule(const struct Quant *, DCELL *, CELL *);
  834. void G_quant_add_rule(struct Quant *, DCELL, DCELL, CELL, CELL);
  835. void G_quant_reverse_rule_order(struct Quant *);
  836. CELL G_quant_get_cell_value(struct Quant *, DCELL);
  837. void G_quant_perform_d(struct Quant *, const DCELL *, CELL *, int);
  838. void G_quant_perform_f(struct Quant *, const FCELL *, CELL *, int);
  839. struct Quant_table *G__quant_get_rule_for_d_raster_val(const struct Quant *,
  840. DCELL);
  841. /* quant_io.c */
  842. int G__quant_import(const char *, const char *, struct Quant *);
  843. int G__quant_export(const char *, const char *, const struct Quant *);
  844. /* quant_rw.c */
  845. int G_truncate_fp_map(const char *, const char *);
  846. int G_round_fp_map(const char *, const char *);
  847. int G_quantize_fp_map(const char *, const char *, CELL, CELL);
  848. int G_quantize_fp_map_range(const char *, const char *, DCELL, DCELL, CELL,
  849. CELL);
  850. int G_write_quant(const char *, const char *, const struct Quant *);
  851. int G_read_quant(const char *, const char *, struct Quant *);
  852. /* radii.c */
  853. double G_meridional_radius_of_curvature(double, double, double);
  854. double G_transverse_radius_of_curvature(double, double, double);
  855. double G_radius_of_conformal_tangent_sphere(double, double, double);
  856. /* range.c */
  857. int G__remove_fp_range(const char *);
  858. int G_construct_default_range(struct Range *);
  859. int G_read_fp_range(const char *, const char *, struct FPRange *);
  860. int G_read_range(const char *, const char *, struct Range *);
  861. int G_write_range(const char *, const struct Range *);
  862. int G_write_fp_range(const char *, const struct FPRange *);
  863. int G_update_range(CELL, struct Range *);
  864. int G_update_fp_range(DCELL, struct FPRange *);
  865. int G_row_update_range(const CELL *, int, struct Range *);
  866. int G__row_update_range(const CELL *, int, struct Range *, int);
  867. int G_row_update_fp_range(const void *, int, struct FPRange *,
  868. RASTER_MAP_TYPE);
  869. int G_init_range(struct Range *);
  870. int G_get_range_min_max(const struct Range *, CELL *, CELL *);
  871. int G_init_fp_range(struct FPRange *);
  872. int G_get_fp_range_min_max(const struct FPRange *, DCELL *, DCELL *);
  873. /* raster.c */
  874. void *G_incr_void_ptr(const void *, const size_t);
  875. int G_raster_cmp(const void *, const void *, RASTER_MAP_TYPE);
  876. int G_raster_cpy(void *, const void *, int, RASTER_MAP_TYPE);
  877. int G_set_raster_value_c(void *, CELL, RASTER_MAP_TYPE);
  878. int G_set_raster_value_f(void *, FCELL, RASTER_MAP_TYPE);
  879. int G_set_raster_value_d(void *, DCELL, RASTER_MAP_TYPE);
  880. CELL G_get_raster_value_c(const void *, RASTER_MAP_TYPE);
  881. FCELL G_get_raster_value_f(const void *, RASTER_MAP_TYPE);
  882. DCELL G_get_raster_value_d(const void *, RASTER_MAP_TYPE);
  883. /* raster_metadata.c */
  884. int G_read_raster_units(const char *, const char *, char *);
  885. int G_read_raster_vdatum(const char *, const char *, char *);
  886. int G_write_raster_units(const char *, const char *);
  887. int G_write_raster_vdatum(const char *, const char *);
  888. int G__raster_misc_read_line(const char *, const char *, const char *,
  889. char *);
  890. int G__raster_misc_write_line(const char *, const char *, const char *);
  891. /* rd_cellhd.c */
  892. char *G__read_Cell_head(FILE *, struct Cell_head *, int);
  893. char *G__read_Cell_head_array(char **, struct Cell_head *, int);
  894. /* reclass.c */
  895. int G_is_reclass(const char *, const char *, char *, char *);
  896. int G_is_reclassed_to(const char *, const char *, int *, char ***);
  897. int G_get_reclass(const char *, const char *, struct Reclass *);
  898. int G_free_reclass(struct Reclass *);
  899. int G_put_reclass(const char *, const struct Reclass *);
  900. /* remove.c */
  901. int G_remove(const char *, const char *);
  902. int G_remove_misc(const char *, const char *, const char *);
  903. /* rename.c */
  904. int G_rename_file(const char *, const char *);
  905. int G_rename(const char *, const char *, const char *);
  906. /* rhumbline.c */
  907. int G_begin_rhumbline_equation(double, double, double, double);
  908. double G_rhumbline_lat_from_lon(double);
  909. /* rotate.c */
  910. void G_rotate_around_point(double, double, double *, double *, double);
  911. void G_rotate_around_point_int(int, int, int *, int *, double);
  912. /* sample.c */
  913. double G_get_raster_sample(int, const struct Cell_head *, struct Categories *,
  914. double, double, int, INTERP_TYPE);
  915. /* set_window.c */
  916. int G_get_set_window(struct Cell_head *);
  917. int G_set_window(struct Cell_head *);
  918. /* short_way.c */
  919. int G_shortest_way(double *, double *);
  920. /* sleep.c */
  921. void G_sleep(unsigned int);
  922. /* snprintf.c */
  923. int G_snprintf(char *, size_t, const char *, ...)
  924. __attribute__ ((format(printf, 3, 4)));
  925. /* squeeze.c */
  926. char *G_squeeze(char *);
  927. /* store.c */
  928. char *G_store(const char *);
  929. /* strings.c */
  930. char *G_strcpy(char *, const char *);
  931. char *G_chrcpy(char *, const char *, int);
  932. char *G_strncpy(char *, const char *, int);
  933. char *G_strcat(char *, const char *);
  934. char *G_chrcat(char *, const char *, int);
  935. char *G_strmov(char *, const char *);
  936. char *G_chrmov(char *, const char *, int);
  937. int G_strcasecmp(const char *, const char *);
  938. char *G_strstr(const char *, const char *);
  939. char *G_strdup(const char *);
  940. char *G_strchg(char *, char, char);
  941. char *G_str_replace(char *, const char *, const char *);
  942. void G_str_to_upper(char *);
  943. void G_str_to_lower(char *);
  944. int G_str_to_sql(char *);
  945. int G_strip(char *);
  946. /* svd.c */
  947. int G_svdcmp(double **, int, int, double *, double **);
  948. int G_svbksb(double **, double[], double **, int, int, double[], double[]);
  949. int G_svelim(double *, int);
  950. /* system.c */
  951. int G_system(const char *);
  952. /* tempfile.c */
  953. char *G_tempfile(void);
  954. char *G__tempfile(int);
  955. int G__temp_element(char *);
  956. /* timestamp.c */
  957. void G_init_timestamp(struct TimeStamp *);
  958. void G_set_timestamp(struct TimeStamp *, const DateTime *);
  959. void G_set_timestamp_range(struct TimeStamp *, const DateTime *,
  960. const DateTime *);
  961. int G__read_timestamp(FILE *, struct TimeStamp *);
  962. int G__write_timestamp(FILE *, const struct TimeStamp *);
  963. int G_get_timestamps(const struct TimeStamp *, DateTime *, DateTime *, int *);
  964. int G_read_raster_timestamp(const char *, const char *, struct TimeStamp *);
  965. int G_read_vector_timestamp(const char *, const char *, struct TimeStamp *);
  966. int G_write_raster_timestamp(const char *, const struct TimeStamp *);
  967. int G_write_vector_timestamp(const char *, const struct TimeStamp *);
  968. int G_format_timestamp(const struct TimeStamp *, char *);
  969. int G_scan_timestamp(struct TimeStamp *, const char *);
  970. int G_remove_raster_timestamp(const char *);
  971. int G_remove_vector_timestamp(const char *);
  972. int G_read_grid3_timestamp(const char *, const char *, struct TimeStamp *);
  973. int G_remove_grid3_timestamp(const char *);
  974. int G_write_grid3_timestamp(const char *, const struct TimeStamp *);
  975. /* token.c */
  976. char **G_tokenize(const char *, const char *);
  977. int G_number_of_tokens(char **);
  978. int G_free_tokens(char **);
  979. /* trim_dec.c */
  980. int G_trim_decimal(char *);
  981. /* unctrl.c */
  982. char *G_unctrl(int);
  983. /* unix_socks.c */
  984. char *G_sock_get_fname(const char *);
  985. int G_sock_exists(const char *);
  986. int G_sock_bind(const char *);
  987. int G_sock_listen(int, unsigned int);
  988. int G_sock_accept(int);
  989. int G_sock_connect(const char *);
  990. /* verbose.c */
  991. int G_verbose(void);
  992. int G_verbose_min(void);
  993. int G_verbose_std(void);
  994. int G_verbose_max(void);
  995. int G_set_verbose(int);
  996. /* view.c */
  997. int G_3dview_warning(int);
  998. int G_get_3dview_defaults(struct G_3dview *, struct Cell_head *);
  999. int G_put_3dview(const char *, const char *, const struct G_3dview *,
  1000. const struct Cell_head *);
  1001. int G_get_3dview(const char *, const char *, struct G_3dview *);
  1002. /* whoami.c */
  1003. char *G_whoami(void);
  1004. /* wind_2_box.c */
  1005. int G_adjust_window_to_box(const struct Cell_head *, struct Cell_head *, int,
  1006. int);
  1007. /* wind_format.c */
  1008. int G_format_northing(double, char *, int);
  1009. int G_format_easting(double, char *, int);
  1010. int G_format_resolution(double, char *, int);
  1011. /* wind_in.c */
  1012. int G_point_in_region(double, double);
  1013. int G_point_in_window(double, double, const struct Cell_head *);
  1014. /* wind_limits.c */
  1015. int G_limit_east(double *, int);
  1016. int G_limit_west(double *, int);
  1017. int G_limit_north(double *, int);
  1018. int G_limit_south(double *, int);
  1019. /* wind_overlap.c */
  1020. int G_window_overlap(const struct Cell_head *, double, double, double,
  1021. double);
  1022. double G_window_percentage_overlap(const struct Cell_head *, double, double,
  1023. double, double);
  1024. /* wind_scan.c */
  1025. int G_scan_northing(const char *, double *, int);
  1026. int G_scan_easting(const char *, double *, int);
  1027. int G_scan_resolution(const char *, double *, int);
  1028. /* window_map.c */
  1029. int G__create_window_mapping(int);
  1030. double G_northing_to_row(double, const struct Cell_head *);
  1031. double G_adjust_east_longitude(double, double);
  1032. double G_adjust_easting(double, const struct Cell_head *);
  1033. double G_easting_to_col(double, const struct Cell_head *);
  1034. double G_row_to_northing(double, const struct Cell_head *);
  1035. double G_col_to_easting(double, const struct Cell_head *);
  1036. int G_window_rows(void);
  1037. int G_window_cols(void);
  1038. int G__init_window(void);
  1039. int G_row_repeat_nomask(int, int);
  1040. /* wr_cellhd.c */
  1041. int G__write_Cell_head(FILE *, const struct Cell_head *, int);
  1042. int G__write_Cell_head3(FILE *, const struct Cell_head *, int);
  1043. /* writ_zeros.c */
  1044. int G_write_zeros(int, size_t);
  1045. /* zero.c */
  1046. int G_zero(void *, int);
  1047. /* zero_cell.c */
  1048. int G_zero_cell_buf(CELL *);
  1049. int G_zero_raster_buf(void *, RASTER_MAP_TYPE);
  1050. /* zone.c */
  1051. int G_zone(void);
  1052. #endif /* GRASS_GISDEFS_H */