gis.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  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. #include <grass/config.h>
  26. #ifdef __GNUC__
  27. # ifdef __MINGW32__
  28. # include <malloc.h>
  29. # else
  30. # include <alloca.h>
  31. # endif
  32. # define G__alloca(n) alloca(n)
  33. # define G__freea(p)
  34. #else
  35. # define G__alloca(n) G_malloc(n)
  36. # define G__freea(p) G_free(p)
  37. #endif
  38. #include <stdarg.h>
  39. #include <stdio.h>
  40. #include <sys/types.h>
  41. /* adj_cellhd.c */
  42. void G_adjust_Cell_head(struct Cell_head *, int, int);
  43. void G_adjust_Cell_head3(struct Cell_head *, int, int, int);
  44. /* alloc.c */
  45. #define G_incr_void_ptr(ptr, size) \
  46. ((void *)((const unsigned char *)(ptr) + (size)))
  47. void *G__malloc(const char *, int, size_t);
  48. void *G__calloc(const char *, int, size_t, size_t);
  49. void *G__realloc(const char *, int, void *, size_t);
  50. void G_free(void *);
  51. #ifndef G_incr_void_ptr
  52. void *G_incr_void_ptr(const void *, size_t);
  53. #endif
  54. #ifndef CTYPESGEN
  55. #define G_malloc(n) G__malloc(__FILE__, __LINE__, (n))
  56. #define G_calloc(m, n) G__calloc(__FILE__, __LINE__, (m), (n))
  57. #define G_realloc(p, n) G__realloc(__FILE__, __LINE__, (p), (n))
  58. #else
  59. #define G_malloc(n) G__malloc("<ctypesgen>", 0, (n))
  60. #define G_calloc(m, n) G__calloc("<ctypesgen>", 0, (m), (n))
  61. #define G_realloc(p, n) G__realloc("<ctypesgen>", 0, (p), (n))
  62. #endif
  63. /* area.c */
  64. int G_begin_cell_area_calculations(void);
  65. double G_area_of_cell_at_row(int);
  66. int G_begin_polygon_area_calculations(void);
  67. double G_area_of_polygon(const double *, const double *, int);
  68. /* area_ellipse.c */
  69. void G_begin_zone_area_on_ellipsoid(double, double, double);
  70. double G_darea0_on_ellipsoid(double);
  71. double G_area_for_zone_on_ellipsoid(double, double);
  72. /* area_poly1.c */
  73. void G_begin_ellipsoid_polygon_area(double, double);
  74. double G_ellipsoid_polygon_area(const double *, const double *, int);
  75. /* area_poly2.c */
  76. double G_planimetric_polygon_area(const double *, const double *, int);
  77. /* area_sphere.c */
  78. void G_begin_zone_area_on_sphere(double, double);
  79. double G_darea0_on_sphere(double);
  80. double G_area_for_zone_on_sphere(double, double);
  81. /* ascii_chk.c */
  82. void G_ascii_check(char *);
  83. /* asprintf.c */
  84. /* Do it better if you know how */
  85. /* asprintf is not found on MINGW but exists */
  86. /*
  87. * Because configure script in GDAL test is G_asprintf exists in gis lib
  88. * the G_asprintf macro is disabled until a stable version of GDAL
  89. * with a different function becomes widely used
  90. */
  91. int G_vasprintf(char **, const char *, va_list);
  92. int G_asprintf(char **, const char *, ...)
  93. __attribute__ ((format(printf, 2, 3)));
  94. /* basename.c */
  95. char *G_basename(char *, const char *);
  96. /* bres_line.c */
  97. void G_bresenham_line(int, int, int, int, int (*)(int, int));
  98. /* clicker.c */
  99. void G_clicker(void);
  100. /* color_rules.c */
  101. char *G_color_rules_options(void);
  102. char *G_color_rules_descriptions(void);
  103. void G_list_color_rules(FILE *);
  104. int G_find_color_rule(const char *);
  105. /* color_str.c */
  106. int G_num_standard_colors(void);
  107. /* commas.c */
  108. int G_insert_commas(char *);
  109. void G_remove_commas(char *);
  110. /* copy_dir.c */
  111. int G_recursive_copy(const char *, const char *);
  112. /* copy_file.c */
  113. int G_copy_file(const char *, const char *);
  114. /* counter.c */
  115. int G_is_initialized(int *);
  116. void G_initialize_done(int *);
  117. void G_init_counter(struct Counter *, int);
  118. int G_counter_next(struct Counter *);
  119. /* date.c */
  120. const char *G_date(void);
  121. /* datum.c */
  122. int G_get_datum_by_name(const char *);
  123. const char *G_datum_name(int);
  124. const char *G_datum_description(int);
  125. const char *G_datum_ellipsoid(int);
  126. int G_get_datumparams_from_projinfo(const struct Key_Value *, char *, char *);
  127. void G_read_datum_table(void);
  128. /* debug.c */
  129. void G_init_debug(void);
  130. int G_debug(int, const char *, ...) __attribute__ ((format(printf, 2, 3)));
  131. /* distance.c */
  132. int G_begin_distance_calculations(void);
  133. double G_distance(double, double, double, double);
  134. double G_distance_between_line_segments(double, double, double, double,
  135. double, double, double, double);
  136. double G_distance_point_to_line_segment(double, double, double, double,
  137. double, double);
  138. /* done_msg.c */
  139. void G_done_msg(const char *, ...) __attribute__ ((format(printf, 1, 2)));
  140. /* endian.c */
  141. int G_is_little_endian(void);
  142. /* env.c */
  143. void G_init_env(void);
  144. const char *G_getenv(const char *);
  145. const char *G_getenv2(const char *, int);
  146. const char *G__getenv(const char *);
  147. const char *G__getenv2(const char *, int);
  148. void G_setenv(const char *, const char *);
  149. void G_setenv2(const char *, const char *, int);
  150. void G__setenv(const char *, const char *);
  151. void G__setenv2(const char *, const char *, int);
  152. void G_unsetenv(const char *);
  153. void G_unsetenv2(const char *, int);
  154. void G__write_env(void);
  155. const char *G__env_name(int);
  156. void G__read_env(void);
  157. void G_set_gisrc_mode(int);
  158. int G_get_gisrc_mode(void);
  159. void G__create_alt_env(void);
  160. void G__switch_env(void);
  161. /* error.c */
  162. int G_info_format(void);
  163. void G_message(const char *, ...) __attribute__ ((format(printf, 1, 2)));
  164. void G_verbose_message(const char *, ...)
  165. __attribute__ ((format(printf, 1, 2)));
  166. void G_important_message(const char *, ...)
  167. __attribute__ ((format(printf, 1, 2)));
  168. void G_fatal_error(const char *, ...) __attribute__ ((format(printf, 1, 2)))
  169. __attribute__ ((noreturn));
  170. void G_warning(const char *, ...) __attribute__ ((format(printf, 1, 2)));
  171. int G_suppress_warnings(int);
  172. int G_sleep_on_error(int);
  173. void G_set_error_routine(int (*)(const char *, int));
  174. void G_unset_error_routine(void);
  175. void G_init_logging(void);
  176. /* file_name.c */
  177. char *G_file_name(char *, const char *, const char *, const char *);
  178. char *G_file_name_misc(char *, const char *, const char *, const char *,
  179. const char *);
  180. /* find_file.c */
  181. const char *G_find_file(const char *, char *, const char *);
  182. const char *G_find_file2(const char *, const char *, const char *);
  183. const char *G_find_file_misc(const char *, const char *, char *, const char *);
  184. const char *G_find_file2_misc(const char *, const char *, const char *,
  185. const char *);
  186. /* find_etc.c */
  187. char *G_find_etc(const char *);
  188. /* find_rast.c */
  189. const char *G_find_raster(char *, const char *);
  190. const char *G_find_raster2(const char *, const char *);
  191. /* find_rast3d.c */
  192. const char *G_find_raster3d(const char *, const char *);
  193. /* find_vect.c */
  194. const char *G_find_vector(char *, const char *);
  195. const char *G_find_vector2(const char *, const char *);
  196. /* flate.c */
  197. int G_zlib_compress(const unsigned char *, int, unsigned char *, int);
  198. int G_zlib_expand(const unsigned char *, int, unsigned char *, int);
  199. int G_zlib_write(int, const unsigned char *, int);
  200. int G_zlib_read(int, int, unsigned char *, int);
  201. int G_zlib_write_noCompress(int, const unsigned char *, int);
  202. /* geodesic.c */
  203. int G_begin_geodesic_equation(double, double, double, double);
  204. double G_geodesic_lat_from_lon(double);
  205. /* geodist.c */
  206. void G_begin_geodesic_distance(double, double);
  207. void G_set_geodesic_distance_lat1(double);
  208. void G_set_geodesic_distance_lat2(double);
  209. double G_geodesic_distance_lon_to_lon(double, double);
  210. double G_geodesic_distance(double, double, double, double);
  211. /* get_ellipse.c */
  212. int G_get_ellipsoid_parameters(double *, double *);
  213. int G_get_spheroid_by_name(const char *, double *, double *, double *);
  214. int G_get_ellipsoid_by_name(const char *, double *, double *);
  215. const char *G_ellipsoid_name(int);
  216. const char *G_ellipsoid_description(int);
  217. int G_read_ellipsoid_table(int);
  218. /* get_projinfo.c */
  219. struct Key_Value *G_get_projunits(void);
  220. struct Key_Value *G_get_projinfo(void);
  221. /* get_window.c */
  222. void G_get_window(struct Cell_head *);
  223. void G_get_default_window(struct Cell_head *);
  224. void G__get_window(struct Cell_head *, const char *, const char *,
  225. const char *);
  226. /* getl.c */
  227. int G_getl(char *, int, FILE *);
  228. int G_getl2(char *, int, FILE *);
  229. /* gisbase.c */
  230. const char *G_gisbase(void);
  231. /* gisdbase.c */
  232. const char *G_gisdbase(void);
  233. /* gisinit.c */
  234. void G__gisinit(const char *, const char *);
  235. void G__no_gisinit(const char *);
  236. void G__check_gisinit(void);
  237. void G_init_all(void);
  238. /* handler.c */
  239. void G_add_error_handler(void (*)(void *), void *);
  240. void G_remove_error_handler(void (*)(void *), void *);
  241. void G__call_error_handlers(void);
  242. /* home.c */
  243. const char *G_home(void);
  244. const char *G__home(void);
  245. /* intersect.c */
  246. int G_intersect_line_segments(double, double, double, double, double, double,
  247. double, double, double *, double *, double *,
  248. double *);
  249. /* is.c */
  250. int G_is_gisbase(const char *);
  251. int G_is_location(const char *);
  252. int G_is_mapset(const char *);
  253. /* key_value1.c */
  254. struct Key_Value *G_create_key_value(void);
  255. void G_set_key_value(const char *, const char *, struct Key_Value *);
  256. const char *G_find_key_value(const char *, const struct Key_Value *);
  257. void G_free_key_value(struct Key_Value *);
  258. /* key_value2.c */
  259. int G_fwrite_key_value(FILE *, const struct Key_Value *);
  260. struct Key_Value *G_fread_key_value(FILE *);
  261. /* key_value3.c */
  262. void G_write_key_value_file(const char *, const struct Key_Value *);
  263. struct Key_Value *G_read_key_value_file(const char *);
  264. /* key_value4.c */
  265. void G_update_key_value_file(const char *, const char *, const char *);
  266. int G_lookup_key_value_from_file(const char *, const char *, char[], int);
  267. /* legal_name.c */
  268. int G_legal_filename(const char *);
  269. int G_check_input_output_name(const char *, const char *, int);
  270. /* line_dist.c */
  271. void G_set_distance_to_line_tolerance(double);
  272. double G_distance2_point_to_line(double, double, double, double, double,
  273. double);
  274. /* list.c */
  275. void G_list_element(const char *, const char *, const char *,
  276. int (*)(const char *, const char *, const char *));
  277. char **G_list(int, const char *, const char *, const char *);
  278. void G_free_list(char **);
  279. /* ll_format.c */
  280. void G_lat_format(double, char *);
  281. const char *G_lat_format_string(void);
  282. void G_lon_format(double, char *);
  283. const char *G_lon_format_string(void);
  284. void G_llres_format(double, char *);
  285. const char *G_llres_format_string(void);
  286. void G_lat_parts(double, int *, int *, double *, char *);
  287. void G_lon_parts(double, int *, int *, double *, char *);
  288. /* ll_scan.c */
  289. int G_lat_scan(const char *, double *);
  290. int G_lon_scan(const char *, double *);
  291. int G_llres_scan(const char *, double *);
  292. /* location.c */
  293. const char *G_location(void);
  294. char *G_location_path(void);
  295. char *G__location_path(void);
  296. /* ls.c */
  297. void G_set_ls_filter(int (*)(const char *, void *), void *);
  298. void G_set_ls_exclude_filter(int (*)(const char *, void *), void *);
  299. char **G__ls(const char *, int *);
  300. void G_ls(const char *, FILE *);
  301. void G_ls_format(char **, int, int, FILE *);
  302. /* ls_filter.c */
  303. #ifdef HAVE_REGEX_H
  304. void *G_ls_regex_filter(const char *, int, int);
  305. void *G_ls_glob_filter(const char *, int);
  306. void G_free_ls_filter(void *);
  307. #endif
  308. /* mach_name.c */
  309. const char *G__machine_name(void);
  310. /* make_loc.c */
  311. int G__make_location(const char *, struct Cell_head *, struct Key_Value *,
  312. struct Key_Value *, FILE *);
  313. int G_make_location(const char *, struct Cell_head *, struct Key_Value *,
  314. struct Key_Value *, FILE *);
  315. int G_compare_projections(const struct Key_Value *, const struct Key_Value *,
  316. const struct Key_Value *, const struct Key_Value *);
  317. /* make_mapset.c */
  318. int G__make_mapset(const char *gisdbase_name, const char *location_name,
  319. const char *mapset_name);
  320. int G_make_mapset(const char *gisdbase_name, const char *location_name,
  321. const char *mapset_name);
  322. /* mapcase.c */
  323. char *G_tolcase(char *);
  324. char *G_toucase(char *);
  325. /* mapset.c */
  326. const char *G_mapset(void);
  327. const char *G__mapset(void);
  328. /* mapset_msc.c */
  329. int G__make_mapset_element(const char *);
  330. int G__make_mapset_element_misc(const char *, const char *);
  331. int G__mapset_permissions(const char *);
  332. int G__mapset_permissions2(const char *, const char *, const char *);
  333. /* mapset_nme.c */
  334. const char *G__mapset_name(int);
  335. void G_get_list_of_mapsets(void);
  336. void G__create_alt_search_path(void);
  337. void G__switch_search_path(void);
  338. void G_reset_mapsets(void);
  339. char **G_available_mapsets(void);
  340. void G_add_mapset_to_search_path(const char *);
  341. int G_is_mapset_in_search_path(const char *);
  342. /* myname.c */
  343. char *G_myname(void);
  344. /* named_colr.c */
  345. int G_color_values(const char *, float *, float *, float *);
  346. const char *G_color_name(int);
  347. /* nl_to_spaces.c */
  348. void G_newlines_to_spaces(char *);
  349. /* nme_in_mps.c */
  350. int G_name_is_fully_qualified(const char *, char *, char *);
  351. char *G_fully_qualified_name(const char *, const char *);
  352. int G_unqualified_name(const char *, const char *, char *, char *);
  353. /* open.c */
  354. int G_open_new(const char *, const char *);
  355. int G_open_old(const char *, const char *, const char *);
  356. int G_open_update(const char *, const char *);
  357. FILE *G_fopen_new(const char *, const char *);
  358. FILE *G_fopen_old(const char *, const char *, const char *);
  359. FILE *G_fopen_append(const char *, const char *);
  360. FILE *G_fopen_modify(const char *, const char *);
  361. /* open_misc.c */
  362. int G_open_new_misc(const char *, const char *, const char *);
  363. int G_open_old_misc(const char *, const char *, const char *, const char *);
  364. int G_open_update_misc(const char *, const char *, const char *);
  365. FILE *G_fopen_new_misc(const char *, const char *, const char *);
  366. FILE *G_fopen_old_misc(const char *, const char *, const char *,
  367. const char *);
  368. FILE *G_fopen_append_misc(const char *, const char *, const char *);
  369. FILE *G_fopen_modify_misc(const char *, const char *, const char *);
  370. /* overwrite.c */
  371. int G_check_overwrite(int argc, char **argv);
  372. /* pager.c */
  373. FILE *G_open_pager(struct Popen *);
  374. void G_close_pager(struct Popen *);
  375. FILE *G_open_mail(struct Popen *);
  376. void G_close_mail(struct Popen *);
  377. /* parser.c */
  378. void G_disable_interactive(void);
  379. struct GModule *G_define_module(void);
  380. struct Flag *G_define_flag(void);
  381. struct Option *G_define_option(void);
  382. struct Option *G_define_standard_option(int);
  383. int G_parser(int, char **);
  384. void G_usage(void);
  385. char *G_recreate_command(void);
  386. void G_add_keyword(const char *);
  387. void G_set_keywords(const char *);
  388. int G_get_overwrite();
  389. /* paths.c */
  390. int G_mkdir(const char *);
  391. int G_is_dirsep(char);
  392. int G_is_absolute_path(const char *);
  393. char *G_convert_dirseps_to_host(char *);
  394. char *G_convert_dirseps_from_host(char *);
  395. int G_lstat(const char *, STRUCT_STAT *);
  396. int G_stat(const char *, STRUCT_STAT *);
  397. /* percent.c */
  398. void G_percent(long, long, int);
  399. void G_percent_reset(void);
  400. void G_progress(long, int);
  401. void G_set_percent_routine(int (*) (int));
  402. void G_unset_percent_routine(void);
  403. /* popen.c */
  404. void G_popen_clear(struct Popen *);
  405. FILE *G_popen_write(struct Popen *, const char *, const char **);
  406. FILE *G_popen_read(struct Popen *, const char *, const char **);
  407. void G_popen_close(struct Popen *);
  408. /* plot.c */
  409. void G_setup_plot(double, double, double, double, int (*)(int, int),
  410. int (*)(int, int));
  411. void G_setup_fill(int);
  412. void G_plot_where_xy(double, double, int *, int *);
  413. void G_plot_where_en(int, int, double *, double *);
  414. void G_plot_point(double, double);
  415. void G_plot_line(double, double, double, double);
  416. void G_plot_line2(double, double, double, double);
  417. int G_plot_polygon(const double *, const double *, int);
  418. int G_plot_area(double *const *, double *const *, int *, int);
  419. void G_plot_fx(double (*)(double), double, double);
  420. /* pole_in_poly.c */
  421. int G_pole_in_polygon(const double *, const double *, int);
  422. /* progrm_nme.c */
  423. const char *G_program_name(void);
  424. void G_set_program_name(const char *);
  425. /* proj1.c */
  426. int G_projection(void);
  427. /* proj2.c */
  428. int G__projection_units(int);
  429. const char *G__projection_name(int);
  430. /* proj3.c */
  431. const char *G_database_unit_name(int);
  432. const char *G_database_projection_name(void);
  433. const char *G_database_datum_name(void);
  434. const char *G_database_ellipse_name(void);
  435. double G_database_units_to_meters_factor(void);
  436. /* put_window.c */
  437. int G_put_window(const struct Cell_head *);
  438. int G__put_window(const struct Cell_head *, const char *, const char *);
  439. /* putenv.c */
  440. void G_putenv(const char *, const char *);
  441. /* radii.c */
  442. double G_meridional_radius_of_curvature(double, double, double);
  443. double G_transverse_radius_of_curvature(double, double, double);
  444. double G_radius_of_conformal_tangent_sphere(double, double, double);
  445. /* rd_cellhd.c */
  446. void G__read_Cell_head(FILE *, struct Cell_head *, int);
  447. void G__read_Cell_head_array(char **, struct Cell_head *, int);
  448. /* remove.c */
  449. int G_remove(const char *, const char *);
  450. int G_remove_misc(const char *, const char *, const char *);
  451. /* rename.c */
  452. int G_rename_file(const char *, const char *);
  453. int G_rename(const char *, const char *, const char *);
  454. /* rhumbline.c */
  455. int G_begin_rhumbline_equation(double, double, double, double);
  456. double G_rhumbline_lat_from_lon(double);
  457. /* rotate.c */
  458. void G_rotate_around_point(double, double, double *, double *, double);
  459. void G_rotate_around_point_int(int, int, int *, int *, double);
  460. /* seek.c */
  461. off_t G_ftell(FILE *);
  462. void G_fseek(FILE *, off_t, int);
  463. /* set_window.c */
  464. void G_get_set_window(struct Cell_head *);
  465. void G_set_window(struct Cell_head *);
  466. void G_unset_window();
  467. /* short_way.c */
  468. void G_shortest_way(double *, double *);
  469. /* sleep.c */
  470. void G_sleep(unsigned int);
  471. /* snprintf.c */
  472. int G_snprintf(char *, size_t, const char *, ...)
  473. __attribute__ ((format(printf, 3, 4)));
  474. /* strings.c */
  475. int G_strcasecmp(const char *, const char *);
  476. int G_strncasecmp(const char *, const char *, int);
  477. char *G_store(const char *);
  478. char *G_strchg(char *, char, char);
  479. char *G_str_replace(const char *, const char *, const char *);
  480. void G_strip(char *);
  481. char *G_chop(char *);
  482. void G_str_to_upper(char *);
  483. void G_str_to_lower(char *);
  484. int G_str_to_sql(char *);
  485. void G_squeeze(char *);
  486. char *G_strcasestr(const char *, const char *);
  487. /* tempfile.c */
  488. void G_init_tempfile(void);
  489. char *G_tempfile(void);
  490. char *G__tempfile(int);
  491. void G__temp_element(char *);
  492. /* timestamp.c */
  493. void G_init_timestamp(struct TimeStamp *);
  494. void G_set_timestamp(struct TimeStamp *, const struct DateTime *);
  495. void G_set_timestamp_range(struct TimeStamp *, const struct DateTime *,
  496. const struct DateTime *);
  497. int G__read_timestamp(FILE *, struct TimeStamp *);
  498. int G__write_timestamp(FILE *, const struct TimeStamp *);
  499. void G_get_timestamps(const struct TimeStamp *, struct DateTime *, struct DateTime *, int *);
  500. int G_read_raster_timestamp(const char *, const char *, struct TimeStamp *);
  501. int G_read_vector_timestamp(const char *, const char *, struct TimeStamp *);
  502. int G_write_raster_timestamp(const char *, const struct TimeStamp *);
  503. int G_write_vector_timestamp(const char *, const struct TimeStamp *);
  504. int G_format_timestamp(const struct TimeStamp *, char *);
  505. int G_scan_timestamp(struct TimeStamp *, const char *);
  506. int G_remove_raster_timestamp(const char *);
  507. int G_remove_vector_timestamp(const char *);
  508. int G_read_grid3_timestamp(const char *, const char *, struct TimeStamp *);
  509. int G_remove_grid3_timestamp(const char *);
  510. int G_write_grid3_timestamp(const char *, const struct TimeStamp *);
  511. /* token.c */
  512. char **G_tokenize(const char *, const char *);
  513. char **G_tokenize2(const char *, const char *, const char *);
  514. int G_number_of_tokens(char **);
  515. void G_free_tokens(char **);
  516. /* trim_dec.c */
  517. void G_trim_decimal(char *);
  518. /* units.c */
  519. double G_units_to_meters_factor(int);
  520. double G_units_to_meters_factor_sq(int);
  521. const char *G_get_units_name(int, int, int);
  522. int G_units(const char *);
  523. /* user_config.c */
  524. #ifndef __MINGW32__
  525. char *G_rc_path(const char *, const char *);
  526. #endif
  527. /* verbose.c */
  528. int G_verbose(void);
  529. int G_verbose_min(void);
  530. int G_verbose_std(void);
  531. int G_verbose_max(void);
  532. int G_set_verbose(int);
  533. /* view.c */
  534. void G_3dview_warning(int);
  535. int G_get_3dview_defaults(struct G_3dview *, struct Cell_head *);
  536. int G_put_3dview(const char *, const char *, const struct G_3dview *,
  537. const struct Cell_head *);
  538. int G_get_3dview(const char *, const char *, struct G_3dview *);
  539. /* whoami.c */
  540. const char *G_whoami(void);
  541. /* wind_2_box.c */
  542. void G_adjust_window_to_box(const struct Cell_head *, struct Cell_head *, int,
  543. int);
  544. /* wind_format.c */
  545. void G_format_northing(double, char *, int);
  546. void G_format_easting(double, char *, int);
  547. void G_format_resolution(double, char *, int);
  548. /* wind_in.c */
  549. int G_point_in_region(double, double);
  550. int G_point_in_window(double, double, const struct Cell_head *);
  551. /* wind_limits.c */
  552. int G_limit_east(double *, int);
  553. int G_limit_west(double *, int);
  554. int G_limit_north(double *, int);
  555. int G_limit_south(double *, int);
  556. /* wind_overlap.c */
  557. int G_window_overlap(const struct Cell_head *, double, double, double,
  558. double);
  559. double G_window_percentage_overlap(const struct Cell_head *, double, double,
  560. double, double);
  561. /* wind_scan.c */
  562. int G_scan_northing(const char *, double *, int);
  563. int G_scan_easting(const char *, double *, int);
  564. int G_scan_resolution(const char *, double *, int);
  565. /* window_map.c */
  566. double G_adjust_east_longitude(double, double);
  567. double G_adjust_easting(double, const struct Cell_head *);
  568. void G__init_window(void);
  569. /* worker.c */
  570. void G_begin_execute(void (*func)(void *), void *, void **, int);
  571. void G_end_execute(void **);
  572. void G_init_workers(void);
  573. void G_finish_workers(void);
  574. /* wr_cellhd.c */
  575. void G__write_Cell_head(FILE *, const struct Cell_head *, int);
  576. void G__write_Cell_head3(FILE *, const struct Cell_head *, int);
  577. /* writ_zeros.c */
  578. void G_write_zeros(int, size_t);
  579. /* zero.c */
  580. void G_zero(void *, int);
  581. /* zone.c */
  582. int G_zone(void);
  583. #endif /* GRASS_GISDEFS_H */