gisdefs.h 21 KB

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