gis.h 22 KB

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