gisdefs.h 42 KB

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