gisdefs.h 45 KB

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