gisdefs.h 43 KB

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