GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-f9ed0ac2b
defs/gis.h
Go to the documentation of this file.
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 
17 #ifndef GRASS_GISDEFS_H
18 #define GRASS_GISDEFS_H
19 
20 /*============================= Include Files ==============================*/
21 
22 /* none */
23 
24 /*=========================== Constants/Defines ============================*/
25 
26 /* none (look in gis.h) */
27 
28 /*=========================== Typedefs/Structures ==========================*/
29 
30 /* none (look in gis.h) */
31 
32 /*============================== Prototypes ================================*/
33 
34 #include <grass/config.h>
35 
36 #ifdef __GNUC__
37 # ifdef __MINGW32__
38 # include <malloc.h>
39 # else
40 # if (defined(__unix__) || defined(unix)) && !defined(USG)
41 # include <sys/param.h>
42 # endif
43 # if (defined(BSD))
44  /* no malloc.h, no alloca.h ?
45  * TODO: better
46  * check if alloca.h exists,
47  * if not, check if malloc.h exists,
48  * if not use stdlib.h */
49 # include <stdlib.h>
50 # else
51 # include <alloca.h>
52 # endif
53 # endif
54 # define G_alloca(n) alloca(n)
55 # define G_freea(p)
56 #else
57 # define G_alloca(n) G_malloc(n)
58 # define G_freea(p) G_free(p)
59 #endif
60 
61 #include <stdarg.h>
62 #include <stdio.h>
63 
64 #ifndef CTYPESGEN
65 #include <setjmp.h>
66 #endif
67 
68 #include <sys/types.h>
69 #include <sys/stat.h>
70 
71 #ifndef RELDIR
72 #define RELDIR "?"
73 #endif
74 
75 /* GDAL < 2.3 does not define HAVE_LONG_LONG when compiled with
76  * Visual Studio as for OSGeo4W, even though long long is available,
77  * and GIntBig falls back to long which is on Windows always 4 bytes.
78  * This patch ensures that GIntBig is defined as long long (8 bytes)
79  * if GDAL is compiled with Visual Studio and GRASS is compiled with
80  * MinGW. This patch must be applied before other GDAL/OGR headers are
81  * included, as done by gprojects.h and vector.h */
82 #if defined(__MINGW32__) && HAVE_GDAL
83 # include <gdal_version.h>
84 # if GDAL_VERSION_NUM < 2030000
85 # include <cpl_config.h>
86  /* HAVE_LONG_LONG_INT comes from GRASS
87  * HAVE_LONG_LONG comes from GDAL */
88 # if HAVE_LONG_LONG_INT && !defined(HAVE_LONG_LONG)
89 # define HAVE_LONG_LONG 1
90 # endif
91 # endif
92 #endif
93 
94 /* adj_cellhd.c */
95 void G_adjust_Cell_head(struct Cell_head *, int, int);
96 void G_adjust_Cell_head3(struct Cell_head *, int, int, int);
97 int G_adjust_window_ll(struct Cell_head *cellhd);
98 
99 /* alloc.c */
100 #define G_incr_void_ptr(ptr, size) \
101  ((void *)((const unsigned char *)(ptr) + (size)))
102 
103 void *G__malloc(const char *, int, size_t);
104 void *G__calloc(const char *, int, size_t, size_t);
105 void *G__realloc(const char *, int, void *, size_t);
106 void G_free(void *);
107 #ifndef G_incr_void_ptr
108 void *G_incr_void_ptr(const void *, size_t);
109 #endif
110 
111 #ifndef CTYPESGEN
112 #define G_malloc(n) G__malloc(RELDIR "/" __FILE__, __LINE__, (n))
113 #define G_calloc(m, n) G__calloc(RELDIR "/" __FILE__, __LINE__, (m), (n))
114 #define G_realloc(p, n) G__realloc(RELDIR "/" __FILE__, __LINE__, (p), (n))
115 #else
116 #define G_malloc(n) G__malloc("<ctypesgen>", 0, (n))
117 #define G_calloc(m, n) G__calloc("<ctypesgen>", 0, (m), (n))
118 #define G_realloc(p, n) G__realloc("<ctypesgen>", 0, (p), (n))
119 #endif
120 
121 /* area.c */
123 double G_area_of_cell_at_row(int);
125 double G_area_of_polygon(const double *, const double *, int);
126 
127 /* area_ellipse.c */
128 void G_begin_zone_area_on_ellipsoid(double, double, double);
129 double G_darea0_on_ellipsoid(double);
130 double G_area_for_zone_on_ellipsoid(double, double);
131 
132 /* area_poly1.c */
133 void G_begin_ellipsoid_polygon_area(double, double);
134 double G_ellipsoid_polygon_area(const double *, const double *, int);
135 
136 /* area_poly2.c */
137 double G_planimetric_polygon_area(const double *, const double *, int);
138 
139 /* area_sphere.c */
140 void G_begin_zone_area_on_sphere(double, double);
141 double G_darea0_on_sphere(double);
142 double G_area_for_zone_on_sphere(double, double);
143 
144 /* ascii_chk.c */
145 void G_ascii_check(char *);
146 
147 
148 /* asprintf.c */
149 /* Do it better if you know how */
150 /* asprintf is not found on MINGW but exists */
151 
152 /*
153  * Because configure script in GDAL test is G_asprintf exists in gis lib
154  * the G_asprintf macro is disabled until a stable version of GDAL
155  * with a different function becomes widely used
156  */
157 int G_vasprintf(char **, const char *, va_list);
158 int G_asprintf(char **, const char *, ...)
159  __attribute__ ((format(printf, 2, 3)));
160 
161 int G_rasprintf(char **, size_t *,const char *, ...)
162  __attribute__ ((format(printf, 3, 4)));
163 
164 /* aprintf.c */
165 int G_aprintf(const char *, ...);
166 int G_faprintf(FILE *, const char *, ...);
167 int G_saprintf(char *, const char *, ...);
168 int G_snaprintf(char *, size_t, const char *, ...);
169 int G_vaprintf(const char *, va_list);
170 int G_vfaprintf(FILE *, const char *, va_list);
171 int G_vsaprintf(char *, const char *, va_list);
172 int G_vsnaprintf(char *, size_t, const char *, va_list);
173 
174 /* bands.c */
175 int G__read_band_reference(FILE *, struct Key_Value **);
176 int G__write_band_reference(FILE *, const char *, const char *);
177 
178 /* basename.c */
179 char *G_basename(char *, const char *);
180 size_t G_get_num_decimals(const char *);
181 char *G_double_to_basename_format(double, size_t, size_t);
183 char *G_join_basename_strings(const char**, size_t);
184 char *G_generate_basename(const char*, double, size_t, size_t);
185 
186 /* bres_line.c */
187 void G_bresenham_line(int, int, int, int, int (*)(int, int));
188 
189 /* clicker.c */
190 void G_clicker(void);
191 
192 /* color_rules.c */
193 char *G_color_rules_options(void);
194 char *G_color_rules_descriptions(void);
196 void G_list_color_rules(FILE *);
197 void G_list_color_rules_description_type(FILE *, char *);
198 int G_find_color_rule(const char *);
199 
200 /* color_str.c */
201 int G_num_standard_colors(void);
202 
203 /* commas.c */
204 int G_insert_commas(char *);
205 void G_remove_commas(char *);
206 
207 /* compress.c */
208 int G_compressor_number(char *);
209 char *G_compressor_name(int);
210 int G_default_compressor(void);
211 int G_check_compressor(int);
212 int G_write_compressed(int, unsigned char *, int, int);
213 int G_write_unompressed(int, unsigned char *, int);
214 int G_read_compressed(int, int, unsigned char *, int, int);
215 int G_compress_bound(int, int);
216 int G_compress(unsigned char *, int, unsigned char *, int, int);
217 int G_expand(unsigned char *, int, unsigned char *, int, int);
218 
219 /* compress.c : no compression */
220 int
221 G_no_compress(unsigned char *src, int src_sz, unsigned char *dst,
222  int dst_sz);
223 int
224 G_no_expand(unsigned char *src, int src_sz, unsigned char *dst,
225  int dst_sz);
226 
227 /* cmprrle.c : Run Length Encoding (RLE) */
228 int
229 G_rle_compress(unsigned char *src, int src_sz, unsigned char *dst,
230  int dst_sz);
231 int
232 G_rle_expand(unsigned char *src, int src_sz, unsigned char *dst,
233  int dst_sz);
234 
235 /* cmprzlib.c : ZLIB's DEFLATE */
236 int
237 G_zlib_compress(unsigned char *src, int src_sz, unsigned char *dst,
238  int dst_sz);
239 int
240 G_zlib_expand(unsigned char *src, int src_sz, unsigned char *dst,
241  int dst_sz);
242 
243 /* cmprlz4.c : LZ4, extremely fast */
244 int
245 G_lz4_compress(unsigned char *src, int src_sz, unsigned char *dst,
246  int dst_sz);
247 int
248 G_lz4_expand(unsigned char *src, int src_sz, unsigned char *dst,
249  int dst_sz);
250 
251 /* cmprbzip.c : BZIP2, high compression, faster than ZLIB's DEFLATE with level 9 */
252 int
253 G_bz2_compress(unsigned char *src, int src_sz, unsigned char *dst,
254  int dst_sz);
255 int
256 G_bz2_expand(unsigned char *src, int src_sz, unsigned char *dst,
257  int dst_sz);
258 
259 /* cmprzstd.c : ZSTD, compression similar to ZLIB's DEFLATE but faster */
260 int
261 G_zstd_compress(unsigned char *src, int src_sz, unsigned char *dst,
262  int dst_sz);
263 int
264 G_zstd_expand(unsigned char *src, int src_sz, unsigned char *dst,
265  int dst_sz);
266 
267 /* add more compression methods here */
268 
269 /* copy_dir.c */
270 int G_recursive_copy(const char *, const char *);
271 
272 /* copy_file.c */
273 int G_copy_file(const char *, const char *);
274 
275 /* counter.c */
276 int G_is_initialized(int *);
277 void G_initialize_done(int *);
278 void G_init_counter(struct Counter *, int);
279 int G_counter_next(struct Counter *);
280 
281 /* date.c */
282 const char *G_date(void);
283 
284 /* datum.c */
285 int G_get_datum_by_name(const char *);
286 const char *G_datum_name(int);
287 const char *G_datum_description(int);
288 const char *G_datum_ellipsoid(int);
289 int G_get_datumparams_from_projinfo(const struct Key_Value *, char *, char *);
290 void G_read_datum_table(void);
291 
292 
293 /* debug.c */
294 void G_init_debug(void);
295 int G_debug(int, const char *, ...) __attribute__ ((format(printf, 2, 3)));
296 
297 /* distance.c */
299 double G_distance(double, double, double, double);
300 double G_distance_between_line_segments(double, double, double, double,
301  double, double, double, double);
302 double G_distance_point_to_line_segment(double, double, double, double,
303  double, double);
304 
305 /* done_msg.c */
306 void G_done_msg(const char *, ...) __attribute__ ((format(printf, 1, 2)));
307 
308 /* endian.c */
309 int G_is_little_endian(void);
310 
311 /* env.c */
312 void G_init_env(void);
313 const char *G_getenv(const char *);
314 const char *G_getenv2(const char *, int);
315 const char *G_getenv_nofatal(const char *);
316 const char *G_getenv_nofatal2(const char *, int);
317 void G_setenv(const char *, const char *);
318 void G_setenv2(const char *, const char *, int);
319 void G_setenv_nogisrc(const char *, const char *);
320 void G_setenv_nogisrc2(const char *, const char *, int);
321 void G_unsetenv(const char *);
322 void G_unsetenv2(const char *, int);
323 const char *G_get_env_name(int);
324 void G_set_gisrc_mode(int);
325 int G_get_gisrc_mode(void);
326 void G_create_alt_env(void);
327 void G_switch_env(void);
328 void G__read_mapset_env(void);
329 void G__read_gisrc_env(void);
330 
331 /* error.c */
332 #ifndef CTYPESGEN
333 jmp_buf *G_fatal_longjmp(int);
334 #endif
335 
336 int G_info_format(void);
337 void G_message(const char *, ...) __attribute__ ((format(printf, 1, 2)));
338 void G_verbose_message(const char *, ...)
339  __attribute__ ((format(printf, 1, 2)));
340 void G_important_message(const char *, ...)
341  __attribute__ ((format(printf, 1, 2)));
342 void G_fatal_error(const char *, ...) __attribute__ ((format(printf, 1, 2)))
343  __attribute__ ((noreturn));
344 void G_warning(const char *, ...) __attribute__ ((format(printf, 1, 2)));
345 int G_suppress_warnings(int);
346 int G_sleep_on_error(int);
347 void G_set_error_routine(int (*)(const char *, int));
348 void G_unset_error_routine(void);
349 void G_init_logging(void);
350 
351 /* file_name.c */
352 char *G_file_name(char *, const char *, const char *, const char *);
353 char *G_file_name_misc(char *, const char *, const char *, const char *,
354  const char *);
355 char *G_file_name_tmp(char *, const char *, const char *, const char *);
356 
357 /* find_file.c */
358 const char *G_find_file(const char *, char *, const char *);
359 const char *G_find_file2(const char *, const char *, const char *);
360 const char *G_find_file_misc(const char *, const char *, char *, const char *);
361 const char *G_find_file2_misc(const char *, const char *, const char *,
362  const char *);
363 
364 /* find_etc.c */
365 char *G_find_etc(const char *);
366 
367 /* find_rast.c */
368 const char *G_find_raster(char *, const char *);
369 const char *G_find_raster2(const char *, const char *);
370 
371 /* find_rast3d.c */
372 const char *G_find_raster3d(const char *, const char *);
373 
374 /* find_vect.c */
375 const char *G_find_vector(char *, const char *);
376 const char *G_find_vector2(const char *, const char *);
377 
378 /* geodesic.c */
379 int G_begin_geodesic_equation(double, double, double, double);
380 double G_geodesic_lat_from_lon(double);
381 
382 /* geodist.c */
383 void G_begin_geodesic_distance(double, double);
384 void G_set_geodesic_distance_lat1(double);
385 void G_set_geodesic_distance_lat2(double);
386 double G_geodesic_distance_lon_to_lon(double, double);
387 double G_geodesic_distance(double, double, double, double);
388 
389 /* get_ellipse.c */
390 int G_get_ellipsoid_parameters(double *, double *);
391 int G_get_spheroid_by_name(const char *, double *, double *, double *);
392 int G_get_ellipsoid_by_name(const char *, double *, double *);
393 const char *G_ellipsoid_name(int);
394 const char *G_ellipsoid_description(int);
395 int G_read_ellipsoid_table(int);
396 
397 /* get_projinfo.c */
398 struct Key_Value *G_get_projunits(void);
399 struct Key_Value *G_get_projinfo(void);
400 struct Key_Value *G_get_projepsg(void);
401 char *G_get_projwkt(void);
402 char *G_get_projsrid(void);
403 
404 /* get_window.c */
405 void G_get_window(struct Cell_head *);
406 void G_get_default_window(struct Cell_head *);
407 void G_get_element_window(struct Cell_head *, const char *, const char *,
408  const char *);
409 
410 /* getl.c */
411 int G_getl(char *, int, FILE *);
412 int G_getl2(char *, int, FILE *);
413 
414 /* gisbase.c */
415 const char *G_gisbase(void);
416 
417 /* gisdbase.c */
418 const char *G_gisdbase(void);
419 
420 /* gisinit.c */
421 void G__gisinit(const char *, const char *);
422 void G__no_gisinit(const char *);
423 void G_init_all(void);
424 
425 /* handler.c */
426 void G_add_error_handler(void (*)(void *), void *);
427 void G_remove_error_handler(void (*)(void *), void *);
428 
429 /* home.c */
430 const char *G_home(void);
431 const char *G_config_path(void);
432 
433 /* ilist.c */
434 void G_init_ilist(struct ilist *);
435 void G_free_ilist(struct ilist *);
436 struct ilist * G_new_ilist();
437 void G_ilist_add(struct ilist *, int);
438 
439 /* intersect.c */
440 int G_intersect_line_segments(double, double, double, double, double, double,
441  double, double, double *, double *, double *,
442  double *);
443 
444 /* is.c */
445 int G_is_gisbase(const char *);
446 int G_is_location(const char *);
447 int G_is_mapset(const char *);
448 
449 /* key_value1.c */
450 struct Key_Value *G_create_key_value(void);
451 void G_set_key_value(const char *, const char *, struct Key_Value *);
452 const char *G_find_key_value(const char *, const struct Key_Value *);
453 void G_free_key_value(struct Key_Value *);
454 
455 /* key_value2.c */
456 int G_fwrite_key_value(FILE *, const struct Key_Value *);
457 struct Key_Value *G_fread_key_value(FILE *);
458 
459 /* key_value3.c */
460 void G_write_key_value_file(const char *, const struct Key_Value *);
461 struct Key_Value *G_read_key_value_file(const char *);
462 
463 /* key_value4.c */
464 void G_update_key_value_file(const char *, const char *, const char *);
465 int G_lookup_key_value_from_file(const char *, const char *, char[], int);
466 
467 /* legal_name.c */
468 int G_legal_filename(const char *);
469 int G_check_input_output_name(const char *, const char *, int);
470 
471 /* line_dist.c */
473 double G_distance2_point_to_line(double, double, double, double, double,
474  double);
475 
476 /* list.c */
477 void G_list_element(const char *, const char *, const char *,
478  int (*)(const char *, const char *, const char *));
479 char **G_list(int, const char *, const char *, const char *);
480 void G_free_list(char **);
481 
482 /* ll_format.c */
483 void G_lat_format(double, char *);
484 const char *G_lat_format_string(void);
485 void G_lon_format(double, char *);
486 const char *G_lon_format_string(void);
487 void G_llres_format(double, char *);
488 const char *G_llres_format_string(void);
489 void G_lat_parts(double, int *, int *, double *, char *);
490 void G_lon_parts(double, int *, int *, double *, char *);
491 
492 /* ll_scan.c */
493 int G_lat_scan(const char *, double *);
494 int G_lon_scan(const char *, double *);
495 int G_llres_scan(const char *, double *);
496 
497 /* location.c */
498 const char *G_location(void);
499 char *G_location_path(void);
500 
501 /* lrand48.c */
502 void G_srand48(long);
503 long G_srand48_auto(void);
504 long G_lrand48(void);
505 long G_mrand48(void);
506 double G_drand48(void);
507 
508 /* ls.c */
509 void G_set_ls_filter(int (*)(const char *, void *), void *);
510 void G_set_ls_exclude_filter(int (*)(const char *, void *), void *);
511 char **G_ls2(const char *, int *);
512 void G_ls(const char *, FILE *);
513 void G_ls_format(char **, int, int, FILE *);
514 
515 /* ls_filter.c */
516 #ifdef HAVE_REGEX_H
517 void *G_ls_regex_filter(const char *, int, int, int);
518 void *G_ls_glob_filter(const char *, int, int);
519 void G_free_ls_filter(void *);
520 #endif
521 
522 /* make_loc.c */
523 int G_make_location(const char *, struct Cell_head *, const struct Key_Value *,
524  const struct Key_Value *);
525 int G_make_location_epsg(const char *, struct Cell_head *, const struct Key_Value *,
526  const struct Key_Value *, const struct Key_Value *);
527 int G_make_location_crs(const char *, struct Cell_head *,
528  const struct Key_Value *, const struct Key_Value *,
529  const char *, const char *);
530 int G_write_projsrid(const char *, const char *);
531 int G_write_projwkt(const char *, const char *);
532 int G_compare_projections(const struct Key_Value *, const struct Key_Value *,
533  const struct Key_Value *, const struct Key_Value *);
534 
535 /* make_mapset.c */
536 int G_make_mapset(const char *, const char *, const char *);
537 
538 /* mapcase.c */
539 char *G_tolcase(char *);
540 char *G_toucase(char *);
541 
542 /* mapset.c */
543 const char *G_mapset(void);
544 char *G_mapset_path(void);
545 
546 /* mapset_msc.c */
547 int G_make_mapset_element(const char *);
548 int G_make_mapset_element_tmp(const char *);
549 int G__make_mapset_element_misc(const char *, const char *);
550 int G_mapset_permissions(const char *);
551 int G_mapset_permissions2(const char *, const char *, const char *);
552 
553 /* mapset_nme.c */
554 const char *G_get_mapset_name(int);
555 void G_create_alt_search_path(void);
556 void G_switch_search_path(void);
557 void G_reset_mapsets(void);
558 char **G_get_available_mapsets(void);
559 void G_add_mapset_to_search_path(const char *);
560 int G_is_mapset_in_search_path(const char *);
561 
562 /* myname.c */
563 char *G_myname(void);
564 
565 /* named_colr.c */
566 int G_color_values(const char *, float *, float *, float *);
567 const char *G_color_name(int);
568 
569 /* nl_to_spaces.c */
570 void G_newlines_to_spaces(char *);
571 
572 /* nme_in_mps.c */
573 int G_name_is_fully_qualified(const char *, char *, char *);
574 char *G_fully_qualified_name(const char *, const char *);
575 int G_unqualified_name(const char *, const char *, char *, char *);
576 
577 /* open.c */
578 int G_open_new(const char *, const char *);
579 int G_open_old(const char *, const char *, const char *);
580 int G_open_update(const char *, const char *);
581 FILE *G_fopen_new(const char *, const char *);
582 FILE *G_fopen_old(const char *, const char *, const char *);
583 FILE *G_fopen_append(const char *, const char *);
584 FILE *G_fopen_modify(const char *, const char *);
585 
586 /* open_misc.c */
587 int G_open_new_misc(const char *, const char *, const char *);
588 int G_open_old_misc(const char *, const char *, const char *, const char *);
589 int G_open_update_misc(const char *, const char *, const char *);
590 FILE *G_fopen_new_misc(const char *, const char *, const char *);
591 FILE *G_fopen_old_misc(const char *, const char *, const char *,
592  const char *);
593 FILE *G_fopen_append_misc(const char *, const char *, const char *);
594 FILE *G_fopen_modify_misc(const char *, const char *, const char *);
595 
596 /* overwrite.c */
597 int G_check_overwrite(int argc, char **argv);
598 
599 /* pager.c */
600 FILE *G_open_pager(struct Popen *);
601 void G_close_pager(struct Popen *);
602 FILE *G_open_mail(struct Popen *);
603 void G_close_mail(struct Popen *);
604 
605 /* parser.c */
606 void G_disable_interactive(void);
607 struct GModule *G_define_module(void);
608 struct Flag *G_define_flag(void);
609 struct Option *G_define_option(void);
610 struct Option *G_define_standard_option(int);
611 struct Flag *G_define_standard_flag(int);
612 int G_parser(int, char **);
613 void G_usage(void);
614 char *G_recreate_command(void);
615 void G_add_keyword(const char *);
616 void G_set_keywords(const char *);
617 int G_get_overwrite();
618 char *G_option_to_separator(const struct Option *);
619 FILE *G_open_option_file(const struct Option *);
620 void G_close_option_file(FILE *);
621 
622 /* parser_dependencies.c */
623 void G_option_rule(int, int, void **);
624 void G_option_exclusive(void *, ...);
625 void G_option_required(void *, ...);
626 void G_option_requires(void *, ...);
627 void G_option_requires_all(void *, ...);
628 void G_option_excludes(void *, ...);
629 void G_option_collective(void *, ...);
630 
631 /* paths.c */
632 int G_mkdir(const char *);
633 int G_is_dirsep(char);
634 int G_is_absolute_path(const char *);
635 char *G_convert_dirseps_to_host(char *);
636 char *G_convert_dirseps_from_host(char *);
637 int G_lstat(const char *, struct stat *);
638 int G_stat(const char *, struct stat *);
639 int G_owner(const char *);
640 
641 /* percent.c */
642 void G_percent(long, long, int);
643 void G_percent_reset(void);
644 void G_progress(long, int);
645 void G_set_percent_routine(int (*) (int));
646 void G_unset_percent_routine(void);
647 
648 /* popen.c */
649 void G_popen_clear(struct Popen *);
650 FILE *G_popen_write(struct Popen *, const char *, const char **);
651 FILE *G_popen_read(struct Popen *, const char *, const char **);
652 void G_popen_close(struct Popen *);
653 
654 /* plot.c */
655 void G_setup_plot(double, double, double, double, int (*)(int, int),
656  int (*)(int, int));
657 void G_setup_fill(int);
658 void G_plot_where_xy(double, double, int *, int *);
659 void G_plot_where_en(int, int, double *, double *);
660 void G_plot_point(double, double);
661 void G_plot_line(double, double, double, double);
662 void G_plot_line2(double, double, double, double);
663 int G_plot_polygon(const double *, const double *, int);
664 int G_plot_area(double *const *, double *const *, int *, int);
665 void G_plot_fx(double (*)(double), double, double);
666 
667 /* pole_in_poly.c */
668 int G_pole_in_polygon(const double *, const double *, int);
669 
670 /* progrm_nme.c */
671 const char *G_program_name(void);
672 const char *G_original_program_name(void);
673 void G_set_program_name(const char *);
674 
675 /* proj1.c */
676 int G_projection(void);
677 
678 /* proj2.c */
679 int G_projection_units(int);
680 const char *G_projection_name(int);
681 
682 /* proj3.c */
683 const char *G_database_unit_name(int);
684 int G_database_unit();
685 const char *G_database_projection_name(void);
686 const char *G_database_datum_name(void);
687 const char *G_database_ellipse_name(void);
689 const char *G_database_epsg_code(void);
690 
691 /* put_window.c */
692 int G_put_window(const struct Cell_head *);
693 int G_put_element_window(const struct Cell_head *, const char *, const char *);
694 
695 /* putenv.c */
696 void G_putenv(const char *, const char *);
697 
698 /* radii.c */
699 double G_meridional_radius_of_curvature(double, double, double);
700 double G_transverse_radius_of_curvature(double, double, double);
701 double G_radius_of_conformal_tangent_sphere(double, double, double);
702 
703 /* rd_cellhd.c */
704 void G__read_Cell_head(FILE *, struct Cell_head *, int);
705 void G__read_Cell_head_array(char **, struct Cell_head *, int);
706 
707 /* remove.c */
708 int G_remove(const char *, const char *);
709 int G_remove_misc(const char *, const char *, const char *);
710 int G_recursive_remove(const char *);
711 
712 /* rename.c */
713 int G_rename_file(const char *, const char *);
714 int G_rename(const char *, const char *, const char *);
715 
716 /* rhumbline.c */
717 int G_begin_rhumbline_equation(double, double, double, double);
718 double G_rhumbline_lat_from_lon(double);
719 
720 /* rotate.c */
721 void G_rotate_around_point(double, double, double *, double *, double);
722 void G_rotate_around_point_int(int, int, int *, int *, double);
723 
724 /* seek.c */
725 off_t G_ftell(FILE *);
726 void G_fseek(FILE *, off_t, int);
727 
728 /* set_window.c */
729 void G_get_set_window(struct Cell_head *);
730 void G_set_window(struct Cell_head *);
731 void G_unset_window();
732 
733 /* short_way.c */
734 void G_shortest_way(double *, double *);
735 
736 /* sleep.c */
737 void G_sleep(unsigned int);
738 
739 /* snprintf.c */
740 int G_snprintf(char *, size_t, const char *, ...)
741  __attribute__ ((format(printf, 3, 4)));
742 
743 /* strings.c */
744 int G_strcasecmp(const char *, const char *);
745 int G_strncasecmp(const char *, const char *, int);
746 char *G_store(const char *);
747 char *G_store_upper(const char *);
748 char *G_store_lower(const char *);
749 char *G_strchg(char *, char, char);
750 char *G_str_replace(const char *, const char *, const char *);
751 char *G_str_concat(const char **, int, const char *, int);
752 void G_strip(char *);
753 char *G_chop(char *);
754 void G_str_to_upper(char *);
755 void G_str_to_lower(char *);
756 int G_str_to_sql(char *);
757 void G_squeeze(char *);
758 char *G_strcasestr(const char *, const char *);
759 
760 /* tempfile.c */
761 void G_init_tempfile(void);
762 char *G_tempfile(void);
763 char *G_tempfile_pid(int);
764 void G_temp_element(char *);
765 void G__temp_element(char *, int);
766 
767 /* mkstemp.c */
768 char *G_mktemp(char *);
769 int G_mkstemp(char *, int, int);
770 FILE *G_mkstemp_fp(char *, int, int);
771 
772 /* timestamp.c */
773 void G_init_timestamp(struct TimeStamp *);
774 void G_set_timestamp(struct TimeStamp *, const struct DateTime *);
775 void G_set_timestamp_range(struct TimeStamp *, const struct DateTime *,
776  const struct DateTime *);
777 int G_write_timestamp(FILE *, const struct TimeStamp *);
778 void G_get_timestamps(const struct TimeStamp *, struct DateTime *, struct DateTime *, int *);
779 int G_format_timestamp(const struct TimeStamp *, char *);
780 int G_scan_timestamp(struct TimeStamp *, const char *);
781 int G_has_raster_timestamp(const char *, const char *);
782 int G_read_raster_timestamp(const char *, const char *, struct TimeStamp *);
783 int G_write_raster_timestamp(const char *, const struct TimeStamp *);
784 int G_remove_raster_timestamp(const char *);
785 int G_has_vector_timestamp(const char *, const char *, const char *);
786 int G_read_vector_timestamp(const char *, const char *, const char *, struct TimeStamp *);
787 int G_write_vector_timestamp(const char *, const char *, const struct TimeStamp *);
788 int G_remove_vector_timestamp(const char *, const char *);
789 int G_has_raster3d_timestamp(const char *, const char *);
790 int G_read_raster3d_timestamp(const char *, const char *, struct TimeStamp *);
791 int G_remove_raster3d_timestamp(const char *);
792 int G_write_raster3d_timestamp(const char *, const struct TimeStamp *);
793 
794 /* token.c */
795 char **G_tokenize(const char *, const char *);
796 char **G_tokenize2(const char *, const char *, const char *);
797 int G_number_of_tokens(char **);
798 void G_free_tokens(char **);
799 
800 /* trim_dec.c */
801 void G_trim_decimal(char *);
802 
803 /* units.c */
804 double G_meters_to_units_factor(int);
805 double G_meters_to_units_factor_sq(int);
806 const char *G_get_units_name(int, int, int);
807 int G_units(const char *);
808 int G_is_units_type_spatial(int);
809 int G_is_units_type_temporal(int);
810 
811 /* user_config.c */
812 #ifndef __MINGW32__
813 char *G_rc_path(const char *, const char *);
814 #endif
815 
816 /* verbose.c */
817 int G_verbose(void);
818 int G_verbose_min(void);
819 int G_verbose_std(void);
820 int G_verbose_max(void);
821 int G_set_verbose(int);
822 
823 /* view.c */
824 void G_3dview_warning(int);
825 int G_get_3dview_defaults(struct G_3dview *, struct Cell_head *);
826 int G_put_3dview(const char *, const char *, const struct G_3dview *,
827  const struct Cell_head *);
828 int G_get_3dview(const char *, const char *, struct G_3dview *);
829 
830 /* whoami.c */
831 const char *G_whoami(void);
832 
833 /* wind_2_box.c */
834 void G_adjust_window_to_box(const struct Cell_head *, struct Cell_head *, int,
835  int);
836 
837 /* wind_format.c */
838 void G_format_northing(double, char *, int);
839 void G_format_easting(double, char *, int);
840 void G_format_resolution(double, char *, int);
841 
842 /* wind_in.c */
843 int G_point_in_region(double, double);
844 int G_point_in_window(double, double, const struct Cell_head *);
845 
846 /* wind_limits.c */
847 int G_limit_east(double *, int);
848 int G_limit_west(double *, int);
849 int G_limit_north(double *, int);
850 int G_limit_south(double *, int);
851 
852 /* wind_overlap.c */
853 int G_window_overlap(const struct Cell_head *, double, double, double,
854  double);
855 double G_window_percentage_overlap(const struct Cell_head *, double, double,
856  double, double);
857 
858 /* wind_scan.c */
859 int G_scan_northing(const char *, double *, int);
860 int G_scan_easting(const char *, double *, int);
861 int G_scan_resolution(const char *, double *, int);
862 
863 /* window_map.c */
864 double G_adjust_east_longitude(double, double);
865 double G_adjust_easting(double, const struct Cell_head *);
866 void G__init_window(void);
867 
868 /* worker.c */
869 void G_begin_execute(void (*func)(void *), void *, void **, int);
870 void G_end_execute(void **);
871 void G_init_workers(void);
872 void G_finish_workers(void);
873 
874 /* wr_cellhd.c */
875 void G__write_Cell_head(FILE *, const struct Cell_head *, int);
876 void G__write_Cell_head3(FILE *, const struct Cell_head *, int);
877 
878 /* writ_zeros.c */
879 void G_write_zeros(int, size_t);
880 
881 /* xdr.c */
882 void G_xdr_get_int(int *, const void *);
883 void G_xdr_put_int(void *, const int *);
884 void G_xdr_get_float(float *, const void *);
885 void G_xdr_put_float(void *, const float *);
886 void G_xdr_get_double(double *, const void *);
887 void G_xdr_put_double(void *, const double *);
888 
889 /* zero.c */
890 void G_zero(void *, int);
891 
892 /* zone.c */
893 int G_zone(void);
894 
895 #endif /* GRASS_GISDEFS_H */
void G_init_debug(void)
Initiate debugging.
Definition: debug.c:27
int G_getl2(char *, int, FILE *)
Gets a line of text from a file of any pedigree.
Definition: getl.c:64
int G_strncasecmp(const char *, const char *, int)
String compare ignoring case (upper or lower) - limited number of characters.
Definition: strings.c:69
void G_unset_error_routine(void)
After this call subsequent error messages will be handled in the default method.
Definition: gis/error.c:274
int G_is_location(const char *)
Test if specified directory is location.
Definition: is.c:67
int G_make_mapset(const char *, const char *, const char *)
Create a new mapset.
Definition: make_mapset.c:43
void G_rotate_around_point(double, double, double *, double *, double)
Rotate point (double version)
Definition: rotate.c:35
char * G_file_name_misc(char *, const char *, const char *, const char *, const char *)
Builds full path names to GIS misc data files.
Definition: file_name.c:55
int G_getl(char *, int, FILE *)
Gets a line of text from a file.
Definition: getl.c:31
void G_remove_commas(char *)
Removes commas from number string.
Definition: commas.c:88
const char * G_find_file2(const char *, const char *, const char *)
Searches for a file from the mapset search list or in a specified mapset. (look but don&#39;t touch) ...
Definition: find_file.c:247
char * G_file_name(char *, const char *, const char *, const char *)
Builds full path names to GIS data files.
Definition: file_name.c:38
const char * G_program_name(void)
Return module name.
Definition: progrm_nme.c:28
FILE * G_fopen_append_misc(const char *, const char *, const char *)
Definition: open_misc.c:222
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
void G_free_list(char **)
Free list.
Definition: gis/list.c:251
char * G_str_concat(const char **, int, const char *, int)
String concatenation.
Definition: strings.c:268
int G_owner(const char *)
Get owner id of path.
Definition: paths.c:164
int G_remove(const char *, const char *)
Remove a database file.
Definition: remove.c:44
int G_num_standard_colors(void)
Get number of named colors (RGB triplets)
Definition: color_str.c:65
void void void G_important_message(const char *,...) __attribute__((format(printf
char * G_color_rules_description_type(void)
Get color rules description for Option->descriptions.
void G_get_timestamps(const struct TimeStamp *, struct DateTime *, struct DateTime *, int *)
Copy TimeStamp into [two] Datetimes structs.
Definition: timestamp.c:258
int G_zone(void)
Query cartographic zone.
Definition: zone.c:25
int G_mapset_permissions2(const char *, const char *, const char *)
Check for user mapset permission.
Definition: mapset_msc.c:174
int G_verbose(void)
Get current verbosity level.
Definition: verbose.c:55
int G__read_band_reference(FILE *, struct Key_Value **)
Read band reference identifier from file (internal use only).
FILE * G_popen_write(struct Popen *, const char *, const char **)
Definition: popen.c:65
const char * G_whoami(void)
Gets user&#39;s name.
Definition: gis/whoami.c:35
double G_radius_of_conformal_tangent_sphere(double, double, double)
Radius of conformal tangent sphere.
Definition: radii.c:133
int G_vsaprintf(char *, const char *, va_list)
vsprintf() version of G_aprintf(). See G_aprintf() for more details.
Definition: aprintf.c:398
void G_percent_reset(void)
Reset G_percent() to 0%; do not add newline.
Definition: percent.c:119
void G_end_execute(void **)
Definition: worker.c:172
const char * G_get_env_name(int)
Get variable name for index n.
Definition: env.c:523
int G_is_mapset_in_search_path(const char *)
Check if given mapset is in search path.
Definition: mapset_nme.c:214
struct Key_Value * G_read_key_value_file(const char *)
Read key/values pairs from file.
Definition: key_value3.c:53
int G_write_compressed(int, unsigned char *, int, int)
Definition: compress.c:326
int G_scan_timestamp(struct TimeStamp *, const char *)
Fill a TimeStamp structure from a datetime string.
Definition: timestamp.c:215
void G_setenv_nogisrc(const char *, const char *)
Set environment name to value (doesn&#39;t update .gisrc)
Definition: env.c:450
void G_putenv(const char *, const char *)
Sets the UNIX environment variable name to value.
Definition: putenv.c:31
double G_area_for_zone_on_sphere(double, double)
Calculates area between latitudes.
Definition: area_sphere.c:70
int G_check_compressor(int)
Definition: compress.c:140
void G_set_ls_filter(int(*)(const char *, void *), void *)
void G_setenv_nogisrc2(const char *, const char *, int)
Set environment name to value from specific place (doesn&#39;t update .gisrc)
Definition: env.c:463
struct Key_Value * G_get_projinfo(void)
Gets projection information for location.
Definition: get_projinfo.c:61
void G_done_msg(const char *,...) __attribute__((format(printf
double G_geodesic_distance_lon_to_lon(double, double)
Calculates geodesic distance.
Definition: geodist.c:121
const char * G_lon_format_string(void)
Definition: ll_format.c:66
int G_verbose_min(void)
Get min verbosity level.
Definition: verbose.c:96
void G_init_env(void)
Initialize variables.
Definition: env.c:83
int G_llres_scan(const char *, double *)
Definition: ll_scan.c:56
void G_begin_geodesic_distance(double, double)
Begin geodesic distance.
Definition: geodist.c:50
int G_vaprintf(const char *, va_list)
vprintf() version of G_aprintf(). See G_aprintf() for more details.
Definition: aprintf.c:366
void G__read_gisrc_env(void)
Force to read the GISRC environment file.
Definition: env.c:112
void G_unsetenv(const char *)
Remove name from environment.
Definition: env.c:476
const char * G_find_vector2(const char *, const char *)
Find a vector map (look but don&#39;t touch)
Definition: find_vect.c:62
int G_pole_in_polygon(const double *, const double *, int)
Check if pole is in polygon.
Definition: pole_in_poly.c:35
void G_unset_percent_routine(void)
After this call subsequent percentage progress messages will be handled in the default method...
Definition: percent.c:205
void G_option_required(void *,...)
Sets the options to be required.
const char * G_getenv_nofatal2(const char *, int)
Get environment variable from specific place.
Definition: env.c:402
int G_get_3dview(const char *, const char *, struct G_3dview *)
Gets a 3D View.
Definition: view.c:251
FILE * G_mkstemp_fp(char *, int, int)
Returns a file descriptor.
Definition: mkstemp.c:162
void G_set_geodesic_distance_lat1(double)
Sets geodesic distance lat1.
Definition: geodist.c:69
char * G_generate_basename(const char *, double, size_t, size_t)
Generate the format string.
Definition: basename.c:168
int G_read_ellipsoid_table(int)
Read ellipsoid table.
Definition: get_ellipse.c:247
void G_init_logging(void)
Definition: gis/error.c:351
2D/3D raster map header (used also for region)
Definition: gis.h:409
int G__write_band_reference(FILE *, const char *, const char *)
Write band reference identifier to file (internal use only).
void G_option_requires_all(void *,...)
Define additionally required options for an option.
const char * G_gisdbase(void)
Get name of top level database directory.
Definition: gisdbase.c:26
int G_get_gisrc_mode(void)
Get info where variables are stored.
Definition: env.c:73
int G_no_expand(unsigned char *src, int src_sz, unsigned char *dst, int dst_sz)
Definition: compress.c:178
int G_rename_file(const char *, const char *)
Rename a file or a directory in the filesystem.
Definition: rename.c:32
void G_set_distance_to_line_tolerance(double)
Definition: gis/line_dist.c:8
void G_ls(const char *, FILE *)
Prints a directory listing to a stream, in prettified column format.
Definition: ls.c:137
int G_compress_bound(int, int)
Definition: compress.c:205
int G_open_new_misc(const char *, const char *, const char *)
open a new database file
Definition: open_misc.c:113
char * G_basename(char *, const char *)
Truncates filename to the base part (before the last &#39;.&#39;) if it matches the extension, otherwise leaves it unchanged.
Definition: basename.c:38
double G_distance_between_line_segments(double, double, double, double, double, double, double, double)
Returns distance between two line segments in meters.
Definition: gis/distance.c:91
int G_projection(void)
Query cartographic projection.
Definition: proj1.c:32
int G_get_datumparams_from_projinfo(const struct Key_Value *, char *, char *)
Definition: gis/datum.c:109
struct Key_Value * G_fread_key_value(FILE *)
Read key/values pairs from file.
Definition: key_value2.c:49
int G_is_units_type_temporal(int)
Check if the unit is of temporal type.
Definition: units.c:165
void G_list_color_rules(FILE *)
Print color rules.
void G_unset_window()
Unset current region.
Definition: get_window.c:132
void G_ascii_check(char *)
Removes non-ascii characters from buffer.
Definition: ascii_chk.c:34
void G__no_gisinit(const char *)
Initialize GIS Library.
Definition: gisinit.c:82
int G_unqualified_name(const char *, const char *, char *, char *)
Returns unqualified map name (without @ mapset)
Definition: nme_in_mps.c:134
void G_setenv2(const char *, const char *, int)
Set environment variable from specific place (updates .gisrc)
Definition: env.c:437
void G_xdr_get_int(int *, const void *)
Definition: gis/xdr.c:63
void G_rotate_around_point_int(int, int, int *, int *, double)
Rotate point (int version)
Definition: rotate.c:62
int G_put_3dview(const char *, const char *, const struct G_3dview *, const struct Cell_head *)
Saves info to a 3d.view file.
Definition: view.c:170
int G_zstd_expand(unsigned char *src, int src_sz, unsigned char *dst, int dst_sz)
Definition: cmprzstd.c:163
int G_mapset_permissions(const char *)
Check for user mapset permission.
Definition: mapset_msc.c:145
const char * G_ellipsoid_name(int)
Get ellipsoid name.
Definition: get_ellipse.c:133
Definition: gis.h:590
int G_default_compressor(void)
Definition: compress.c:126
FILE * G_fopen_modify(const char *, const char *)
Open a database file for update (r+ mode)
Definition: gis/open.c:308
void G__gisinit(const char *, const char *)
Initialize GIS Library and ensures a valid mapset is available.
Definition: gisinit.c:43
void G_add_mapset_to_search_path(const char *)
Add mapset to the list of mapsets in search path.
Definition: mapset_nme.c:200
void G_free(void *)
Free allocated memory.
Definition: gis/alloc.c:149
int G_lz4_expand(unsigned char *src, int src_sz, unsigned char *dst, int dst_sz)
Definition: cmprlz4.c:148
int G_is_mapset(const char *)
Test if specified directory is mapset.
Definition: is.c:81
void G_set_error_routine(int(*)(const char *, int))
Establishes error_routine as the routine that will handle the printing of subsequent error messages...
Definition: gis/error.c:261
const char * G_ellipsoid_description(int)
Get description for nth ellipsoid.
Definition: get_ellipse.c:184
char * G_location_path(void)
Get current location UNIX-like path.
Definition: location.c:54
int G_no_compress(unsigned char *src, int src_sz, unsigned char *dst, int dst_sz)
Definition: compress.c:156
char * dst
Definition: lz4.h:599
void G_sleep(unsigned int)
Definition: sleep.c:11
int G_format_timestamp(const struct TimeStamp *, char *)
Create text string from TimeStamp structure.
Definition: timestamp.c:181
struct Flag * G_define_standard_flag(int)
Create standardised Flag structure.
void G_set_ls_exclude_filter(int(*)(const char *, void *), void *)
int G__make_mapset_element_misc(const char *, const char *)
Create misc element in the current mapset.
Definition: mapset_msc.c:112
double G_transverse_radius_of_curvature(double, double, double)
Transverse radius of curvature.
Definition: radii.c:106
void G_setup_fill(int)
Set row_fill routine to row_solid_fill or row_dotted_fill.
Definition: plot.c:130
void G_progress(long, int)
Print progress info messages.
Definition: percent.c:160
void G_add_keyword(const char *)
Add keyword to the list.
Definition: parser.c:850
int G_vfaprintf(FILE *, const char *, va_list)
vfprintf() version of G_aprintf(). See G_aprintf() for more details.
Definition: aprintf.c:379
int G_write_timestamp(FILE *, const struct TimeStamp *)
Output TimeStamp structure to a file as a formatted string.
Definition: timestamp.c:158
int G_adjust_window_ll(struct Cell_head *cellhd)
Adjust window for lat/lon.
Definition: adj_cellhd.c:553
#define G_incr_void_ptr(ptr, size)
Definition: defs/gis.h:100
int G_sleep_on_error(int)
Turn on/off no_sleep flag.
Definition: gis/error.c:243
double G_drand48(void)
Generate a floating-point value in the range [0,1)
Definition: lrand48.c:158
int G_open_new(const char *, const char *)
Open a new database file.
Definition: gis/open.c:148
void G_xdr_put_int(void *, const int *)
Definition: gis/xdr.c:68
double G_ellipsoid_polygon_area(const double *, const double *, int)
Area of lat-long polygon.
Definition: area_poly1.c:129
void G_strip(char *)
Removes all leading and trailing white space from string.
Definition: strings.c:300
char ** G_ls2(const char *, int *)
Stores a sorted directory listing in an array.
Definition: ls.c:95
FILE * G_open_pager(struct Popen *)
Definition: pager.c:13
Structure that stores module info.
Definition: gis.h:574
const char * G_find_raster3d(const char *, const char *)
Search for a 3D raster map in current search path or in a specified mapset.
Definition: find_rast3d.c:28
int G_make_location_crs(const char *, struct Cell_head *, const struct Key_Value *, const struct Key_Value *, const char *, const char *)
Create a new location.
Definition: make_loc.c:186
char ** G_tokenize(const char *, const char *)
Tokenize string.
Definition: gis/token.c:48
const char * G_original_program_name(void)
Return original path of the executed program.
Definition: progrm_nme.c:46
double G_distance2_point_to_line(double, double, double, double, double, double)
Definition: gis/line_dist.c:15
int G_counter_next(struct Counter *)
Definition: counter.c:46
int G_lookup_key_value_from_file(const char *, const char *, char[], int)
Look up for key in file.
Definition: key_value4.c:48
void G_finish_workers(void)
Definition: worker.c:180
int G_plot_area(double *const *, double *const *, int *, int)
Plot multiple polygons.
Definition: plot.c:502
int G_saprintf(char *, const char *,...)
sprintf() version of G_aprintf(). See G_aprintf() for more details.
Definition: aprintf.c:492
char * G_toucase(char *)
convert string to upper case
Definition: mapcase.c:49
char * G_join_basename_strings(const char **, size_t)
join an array of strings using the basename separator
Definition: basename.c:130
void G_temp_element(char *)
Populates element with a path string.
Definition: tempfile.c:102
int G_make_mapset_element_tmp(const char *)
Create element in the temporary directory.
Definition: mapset_msc.c:56
void G__write_Cell_head3(FILE *, const struct Cell_head *, int)
Write 3D cell header or window.
Definition: wr_cellhd.c:78
const char * G_database_epsg_code(void)
Get EPGS code for the current location.
Definition: proj3.c:234
int G_remove_misc(const char *, const char *, const char *)
Remove a database misc file.
Definition: remove.c:65
int G_vasprintf(char **, const char *, va_list)
Safe replacement for asprintf().
Definition: asprintf.c:42
int G_read_raster_timestamp(const char *, const char *, struct TimeStamp *)
Read timestamp from raster map.
Definition: timestamp.c:372
const char * G_find_vector(char *, const char *)
Finds a vector map.
Definition: find_vect.c:41
void G_initialize_done(int *)
Definition: counter.c:76
int G_check_overwrite(int argc, char **argv)
Check for overwrite mode.
Definition: overwrite.c:34
void G_format_northing(double, char *, int)
Northing to ASCII.
Definition: wind_format.c:29
int G_remove_vector_timestamp(const char *, const char *)
Remove timestamp from vector map.
Definition: timestamp.c:550
void G_close_mail(struct Popen *)
Definition: pager.c:65
double G_rhumbline_lat_from_lon(double)
Calculates rhumbline latitude.
Definition: rhumbline.c:100
int G_zstd_compress(unsigned char *src, int src_sz, unsigned char *dst, int dst_sz)
Definition: cmprzstd.c:88
void G_format_resolution(double, char *, int)
Resolution to ASCII.
Definition: wind_format.c:69
size_t G_get_num_decimals(const char *)
Get number of decimals from a string.
Definition: basename.c:58
int G_remove_raster_timestamp(const char *)
Remove timestamp from raster map.
Definition: timestamp.c:405
int G_lz4_compress(unsigned char *src, int src_sz, unsigned char *dst, int dst_sz)
Definition: cmprlz4.c:80
void G_format_easting(double, char *, int)
Easting to ASCII.
Definition: wind_format.c:49
int G_begin_polygon_area_calculations(void)
Begin polygon area calculations.
Definition: gis/area.c:120
void G_clicker(void)
Definition: clicker.c:18
char * G_compressor_name(int)
Definition: compress.c:118
void G_str_to_upper(char *)
Convert string to upper case.
Definition: strings.c:360
int G_faprintf(FILE *, const char *,...)
fprintf() version of G_aprintf(). See G_aprintf() for more details.
Definition: aprintf.c:472
void * G_ls_regex_filter(const char *, int, int, int)
Definition: ls_filter.c:152
void G_begin_zone_area_on_sphere(double, double)
Initialize calculations for sphere.
Definition: area_sphere.c:36
int G_write_projwkt(const char *, const char *)
Write WKT definition to file.
Definition: make_loc.c:514
void G_adjust_window_to_box(const struct Cell_head *, struct Cell_head *, int, int)
Adjusts window to a rectangular box.
Definition: wind_2_box.c:33
struct Key_Value * G_get_projunits(void)
Gets units information for location.
Definition: get_projinfo.c:32
int G_copy_file(const char *, const char *)
Copies one file to another.
Definition: copy_file.c:34
void G_set_gisrc_mode(int)
Set where to find/store variables.
Definition: env.c:63
long G_srand48_auto(void)
Seed the pseudo-random number generator from the time and PID.
Definition: lrand48.c:71
double G_meters_to_units_factor_sq(int)
Units conversion from square meters to square units.
Definition: units.c:87
void G_llres_format(double, char *)
Definition: ll_format.c:71
int G_compare_projections(const struct Key_Value *, const struct Key_Value *, const struct Key_Value *, const struct Key_Value *)
Compare projections including units.
Definition: make_loc.c:235
int G_vsnaprintf(char *, size_t, const char *, va_list)
vsnprintf() version of G_aprintf(). See G_aprintf() for more details.
Definition: aprintf.c:419
int G_get_datum_by_name(const char *)
Definition: gis/datum.c:45
void G_read_datum_table(void)
Definition: gis/datum.c:146
int G_write_unompressed(int, unsigned char *, int)
void G_reset_mapsets(void)
Reset number of mapsets.
Definition: mapset_nme.c:132
void G_message(const char *,...) __attribute__((format(printf
int G_open_old_misc(const char *, const char *, const char *, const char *)
open a database file for reading
Definition: open_misc.c:134
void G_set_window(struct Cell_head *)
Establishes window as the current working window (region).
int G_open_old(const char *, const char *, const char *)
Open a database file for reading.
Definition: gis/open.c:170
int G_get_overwrite()
Get overwrite value.
Definition: parser.c:934
int G_database_unit()
Get units id for the current location.
Definition: proj3.c:65
char * G_double_to_basename_format(double, size_t, size_t)
Convert a double to a string substituting the dot with underscore 12.3456 => &#39;12_3456&#39;.
Definition: basename.c:79
const char * G_home(void)
Get user&#39;s home directory.
Definition: home.c:32
const char * G_database_ellipse_name(void)
Get ellipsoid name for the current location.
Definition: proj3.c:210
void G_popen_close(struct Popen *)
Definition: popen.c:75
void G_init_workers(void)
Definition: worker.c:176
struct Option * G_define_standard_option(int)
Create standardised Option structure.
const char * G_get_units_name(int, int, int)
Get localized units name.
Definition: units.c:203
void G_ilist_add(struct ilist *, int)
Add item to ilist.
Definition: ilist.c:77
char * G_get_basename_separator()
Return the environmental basename variable or the default value.
Definition: basename.c:112
const char * G_lat_format_string(void)
Definition: ll_format.c:51
char * G_recreate_command(void)
Creates command to run non-interactive.
Definition: parser.c:822
int G_write_raster_timestamp(const char *, const struct TimeStamp *)
Write timestamp of raster map.
Definition: timestamp.c:389
void G__temp_element(char *, int)
Populates element with a path string (internal use only!)
Definition: tempfile.c:113
int G_open_update(const char *, const char *)
Open a database file for update.
Definition: gis/open.c:191
void G_option_collective(void *,...)
Sets the options to be collective.
void G__write_Cell_head(FILE *, const struct Cell_head *, int)
Write cell header or window.
Definition: wr_cellhd.c:30
int G_has_vector_timestamp(const char *, const char *, const char *)
Check if timestamp for vector map exists.
Definition: timestamp.c:420
int G_has_raster_timestamp(const char *, const char *)
Check if timestamp for raster map exists.
Definition: timestamp.c:354
void G_plot_where_en(int, int, double *, double *)
Converts x,y to east,north.
Definition: plot.c:176
const char * G_location(void)
Get current location name.
Definition: location.c:32
void G_init_all(void)
Initialize environment.
Definition: gisinit.c:142
double G_geodesic_lat_from_lon(double)
Definition: geodesic.c:75
int int G_strcasecmp(const char *, const char *)
String compare ignoring case (upper or lower)
Definition: strings.c:47
FILE * G_fopen_new(const char *, const char *)
Open a new database file.
Definition: gis/open.c:220
double G_planimetric_polygon_area(const double *, const double *, int)
Calculates planimetric polygon area.
Definition: area_poly2.c:25
int G_make_location_epsg(const char *, struct Cell_head *, const struct Key_Value *, const struct Key_Value *, const struct Key_Value *)
Create a new location.
Definition: make_loc.c:127
char * G_fully_qualified_name(const char *, const char *)
Get fully qualified element name.
Definition: nme_in_mps.c:101
Definition: gis.h:594
char * G_str_replace(const char *, const char *, const char *)
Replace all occurrences of old_str in buffer with new_str.
Definition: strings.c:189
void * G__malloc(const char *, int, size_t)
Memory allocation.
Definition: gis/alloc.c:32
void G_list_color_rules_description_type(FILE *, char *)
Print color rules with description and type.
int G_scan_easting(const char *, double *, int)
ASCII easting to double.
Definition: wind_scan.c:69
void G_option_requires(void *,...)
Define a list of options from which at least one option is required if first option is present...
void G_create_alt_env(void)
Set up alternative environment variables.
Definition: env.c:546
int G_get_ellipsoid_by_name(const char *, double *, double *)
Get ellipsoid parameters by name.
Definition: get_ellipse.c:105
int G_recursive_copy(const char *, const char *)
Copy recursively source directory to destination directory.
Definition: copy_dir.c:70
int G_scan_resolution(const char *, double *, int)
ASCII resolution to double.
Definition: wind_scan.c:100
const char * G_projection_name(int)
Get projection name.
Definition: proj2.c:55
const char * G_datum_ellipsoid(int)
Definition: gis/datum.c:78
void G_plot_point(double, double)
Plot point.
Definition: plot.c:188
const char * G_color_name(int)
Definition: named_colr.c:44
char * G_option_to_separator(const struct Option *)
Get separator string from the option.
Definition: parser.c:1738
struct GModule * G_define_module(void)
Initializes a new module.
Definition: parser.c:255
char * G_tempfile(void)
Returns a temporary file name.
Definition: tempfile.c:62
double G_darea0_on_sphere(double)
Calculates integral for area between two latitudes.
Definition: area_sphere.c:48
double G_geodesic_distance(double, double, double, double)
Calculates geodesic distance.
Definition: geodist.c:196
int G_begin_rhumbline_equation(double, double, double, double)
Start rhumbline calculations.
Definition: rhumbline.c:60
int G_parser(int, char **)
Parse command line.
Definition: parser.c:320
FILE * G_fopen_old_misc(const char *, const char *, const char *, const char *)
open a database file for reading
Definition: open_misc.c:210
void G_lat_parts(double, int *, int *, double *, char *)
Definition: ll_format.c:117
int G_check_input_output_name(const char *, const char *, int)
Check input and output file names.
Definition: legal_name.c:68
char ** G_get_available_mapsets(void)
Get list of available mapsets for current location.
Definition: mapset_nme.c:144
FILE * G_open_option_file(const struct Option *)
Get an input/output file pointer from the option. If the file name is omitted or &#39;-&#39;, it returns either stdin or stdout based on the gisprompt.
Definition: parser.c:1800
struct Option * G_define_option(void)
Initializes an Option struct.
Definition: parser.c:210
int G_bz2_expand(unsigned char *src, int src_sz, unsigned char *dst, int dst_sz)
Definition: cmprbzip.c:169
int G_compress(unsigned char *, int, unsigned char *, int, int)
Definition: compress.c:221
int G_write_raster3d_timestamp(const char *, const struct TimeStamp *)
Write timestamp of 3D raster map.
Definition: timestamp.c:608
int G_remove_raster3d_timestamp(const char *)
Remove timestamp from 3D raster map.
Definition: timestamp.c:624
void * G__calloc(const char *, int, size_t, size_t)
Memory allocation.
Definition: gis/alloc.c:72
void G_begin_ellipsoid_polygon_area(double, double)
Begin area calculations.
Definition: area_poly1.c:61
void G_shortest_way(double *, double *)
Shortest way between two eastings.
Definition: short_way.c:28
void G_srand48(long)
Seed the pseudo-random number generator.
Definition: lrand48.c:53
char * G_mapset_path(void)
Get current mapset UNIX-like path.
Definition: gis/mapset.c:73
char * G_get_projwkt(void)
Get WKT information for the current location.
Definition: get_projinfo.c:127
int G_number_of_tokens(char **)
Return number of tokens.
Definition: gis/token.c:185
void G_setup_plot(double, double, double, double, int(*)(int, int), int(*)(int, int))
Initialize plotting routines.
Definition: plot.c:94
void int G_suppress_warnings(int)
Suppress printing a warning message to stderr.
Definition: gis/error.c:223
void G_write_zeros(int, size_t)
Writes n bytes of 9 to file descriptor fd
Definition: writ_zeros.c:29
void * G_ls_glob_filter(const char *, int, int)
Definition: ls_filter.c:172
void G__read_Cell_head_array(char **, struct Cell_head *, int)
Read window from NULL terminated array of strings (for internal use only)
Definition: rd_cellhd.c:97
char * G_strcasestr(const char *, const char *)
Finds the first occurrence of the sub-string in the null-terminated string ignoring case (upper or lo...
Definition: strings.c:472
void G_xdr_put_double(void *, const double *)
Definition: gis/xdr.c:88
void G_xdr_put_float(void *, const float *)
Definition: gis/xdr.c:78
Structure that stores flag info.
Definition: gis.h:557
void G_switch_search_path(void)
Switch mapset search path.
Definition: mapset_nme.c:114
void void void void __attribute__((noreturn))
int G_is_dirsep(char)
Checks if a specified character is a valid directory separator character on the host system...
Definition: paths.c:45
int G_limit_west(double *, int)
Function not yet implemented...
Definition: wind_limits.c:56
void G_bresenham_line(int, int, int, int, int(*)(int, int))
Bresenham line algorithm.
Definition: bres_line.c:30
void G_option_rule(int, int, void **)
Set generic option rule.
int G_legal_filename(const char *)
Check for legal database file name.
Definition: legal_name.c:34
void G_fseek(FILE *, off_t, int)
Change the file position of the stream.
Definition: gis/seek.c:50
char * G_store_lower(const char *)
Copy string to allocated memory and convert copied string to lower case.
Definition: strings.c:141
void G_init_counter(struct Counter *, int)
Definition: counter.c:38
void G_set_key_value(const char *, const char *, struct Key_Value *)
Set value for given key.
Definition: key_value1.c:38
void G_close_pager(struct Popen *)
Definition: pager.c:35
int int int G_aprintf(const char *,...)
Adjust the width of string specifiers to the display space instead of the number of bytes for wide ch...
Definition: aprintf.c:452
void G_xdr_get_float(float *, const void *)
Definition: gis/xdr.c:73
double G_window_percentage_overlap(const struct Cell_head *, double, double, double, double)
Determines percentage of box is contained in the window.
Definition: wind_overlap.c:83
FILE * G_fopen_old(const char *, const char *, const char *)
Open a database file for reading.
Definition: gis/open.c:253
void G_get_set_window(struct Cell_head *)
Get the current working window (region)
int G_get_3dview_defaults(struct G_3dview *, struct Cell_head *)
Sets default for v based on w.
Definition: view.c:62
double G_distance_point_to_line_segment(double, double, double, double, double, double)
Returns distance between a point and line segment in meters.
Definition: gis/distance.c:120
FILE * G_fopen_modify_misc(const char *, const char *, const char *)
Definition: open_misc.c:235
char ** G_tokenize2(const char *, const char *, const char *)
Tokenize string.
Definition: gis/token.c:84
int int G_rasprintf(char **, size_t *, const char *,...) __attribute__((format(printf
void G_adjust_Cell_head(struct Cell_head *, int, int)
Adjust cell header.
Definition: adj_cellhd.c:51
int G_put_element_window(const struct Cell_head *, const char *, const char *)
Write the region.
Definition: put_window.c:74
void G_str_to_lower(char *)
Convert string to lower case.
Definition: strings.c:378
void G_write_key_value_file(const char *, const struct Key_Value *)
Write key/value pairs to file.
Definition: key_value3.c:28
void G_plot_line2(double, double, double, double)
Plot line between latlon coordinates (slowline)
Definition: plot.c:222
void G_option_exclusive(void *,...)
Sets the options to be mutually exclusive.
int G_rename(const char *, const char *, const char *)
Rename a database file.
Definition: rename.c:70
void G_set_program_name(const char *)
Set program name.
Definition: progrm_nme.c:61
int G_zlib_compress(unsigned char *src, int src_sz, unsigned char *dst, int dst_sz)
Definition: cmprzlib.c:91
char * G_get_projsrid(void)
Get srid (spatial reference id) for the current location.
Definition: get_projinfo.c:233
void G_plot_line(double, double, double, double)
Plot line between latlon coordinates (fastline)
Definition: plot.c:207
int G_rle_compress(unsigned char *src, int src_sz, unsigned char *dst, int dst_sz)
Definition: cmprrle.c:74
void G_unsetenv2(const char *, int)
Remove name from environment from specific place.
Definition: env.c:491
void G_remove_error_handler(void(*)(void *), void *)
Remove existing error handler.
Definition: gis/handler.c:84
int G_begin_cell_area_calculations(void)
Begin cell area calculations.
Definition: gis/area.c:46
int G_read_raster3d_timestamp(const char *, const char *, struct TimeStamp *)
Read timestamp from 3D raster map.
Definition: timestamp.c:591
const char * G_getenv2(const char *, int)
Get variable from specific place.
Definition: env.c:364
Definition: gis.h:498
int G_write_projsrid(const char *, const char *)
Write srid (spatial reference id) to file.
Definition: make_loc.c:564
char * G_color_rules_descriptions(void)
Get color rules description for Option->descriptions.
int G_point_in_window(double, double, const struct Cell_head *)
Returns TRUE if coordinate is within the given map region.
Definition: wind_in.c:51
int G_rle_expand(unsigned char *src, int src_sz, unsigned char *dst, int dst_sz)
Definition: cmprrle.c:141
int G_compressor_number(char *)
Definition: compress.c:100
const char * G_database_projection_name(void)
Query cartographic projection for the current location.
Definition: proj3.c:110
jmp_buf * G_fatal_longjmp(int)
Definition: gis/error.c:67
void G_percent(long, long, int)
Print percent complete messages.
Definition: percent.c:62
const char * G_llres_format_string(void)
Definition: ll_format.c:82
int G_stat(const char *, struct stat *)
Get file status.
Definition: paths.c:128
void G_list_element(const char *, const char *, const char *, int(*)(const char *, const char *, const char *))
General purpose list function.
Definition: gis/list.c:50
void G_plot_where_xy(double, double, int *, int *)
Converts east,north to x,y.
Definition: plot.c:158
double G_adjust_easting(double, const struct Cell_head *)
Returns east not smaller than west.
const char * G_find_file_misc(const char *, const char *, char *, const char *)
Searches for a file from the mapset search list or in a specified mapset.
Definition: find_file.c:222
const char * G_find_raster(char *, const char *)
Find a raster map.
Definition: find_rast.c:55
void * G__realloc(const char *, int, void *, size_t)
Memory reallocation.
Definition: gis/alloc.c:118
int G_lat_scan(const char *, double *)
Definition: ll_scan.c:46
Definition: gis.h:471
off_t G_ftell(FILE *)
Get the current file position of the stream.
Definition: gis/seek.c:29
char * G_color_rules_options(void)
Get list of color rules for Option->options.
int G_fwrite_key_value(FILE *, const struct Key_Value *)
Write key/value pairs to file.
Definition: key_value2.c:25
char * G_chop(char *)
Chop leading and trailing white spaces.
Definition: strings.c:328
char * G_file_name_tmp(char *, const char *, const char *, const char *)
Builds full path names to GIS data files in temporary directory (for internal use only) ...
Definition: file_name.c:80
void G_disable_interactive(void)
Disables the ability of the parser to operate interactively.
Definition: parser.c:139
int int G_begin_distance_calculations(void)
Begin distance calculations.
Definition: gis/distance.c:42
int G_find_color_rule(const char *)
Check if color rule is defined.
void G_update_key_value_file(const char *, const char *, const char *)
Update file, set up value for given key.
Definition: key_value4.c:26
int G_get_ellipsoid_parameters(double *, double *)
get ellipsoid parameters
Definition: get_ellipse.c:67
int G_is_initialized(int *)
Definition: counter.c:59
const char * G_find_file2_misc(const char *, const char *, const char *, const char *)
Searches for a file from the mapset search list or in a specified mapset. (look but don&#39;t touch) ...
Definition: find_file.c:267
int G_intersect_line_segments(double, double, double, double, double, double, double, double, double *, double *, double *, double *)
Definition: gis/intersect.c:80
void G__init_window(void)
Initialize window (region).
FILE * G_fopen_new_misc(const char *, const char *, const char *)
open a new database file
Definition: open_misc.c:182
void G_set_percent_routine(int(*)(int))
Establishes percent_routine as the routine that will handle the printing of percentage progress messa...
Definition: percent.c:194
int G_is_units_type_spatial(int)
Check if the unit is of spatial type.
Definition: units.c:133
int G_begin_geodesic_equation(double, double, double, double)
Definition: geodesic.c:40
int G_projection_units(int)
Get projection units code (for internal use only)
Definition: proj2.c:32
const char * G_find_file(const char *, char *, const char *)
Searches for a file from the mapset search list or in a specified mapset.
Definition: find_file.c:203
const char * G_mapset(void)
Get current mapset name.
Definition: gis/mapset.c:33
void G_set_keywords(const char *)
Set keywords from the string.
Definition: parser.c:866
double G_meters_to_units_factor(int)
Units conversion from meters to units.
Definition: units.c:37
void G_set_geodesic_distance_lat2(double)
Sets geodesic distance lat2.
Definition: geodist.c:83
int G_set_verbose(int)
Set verbosity level.
Definition: verbose.c:116
int G_limit_south(double *, int)
Limit south (y) coordinate.
Definition: wind_limits.c:105
double G_adjust_east_longitude(double, double)
Adjust east longitude.
void G_zero(void *, int)
Zero out a buffer, buf, of length i.
Definition: gis/zero.c:23
int G_str_to_sql(char *)
Make string SQL compliant.
Definition: strings.c:398
char ** G_list(int, const char *, const char *, const char *)
List specified type of elements. Application must release the allocated memory.
Definition: gis/list.c:176
void G_init_timestamp(struct TimeStamp *)
Initialize timestamp structure.
Definition: timestamp.c:93
int G_make_location(const char *, struct Cell_head *, const struct Key_Value *, const struct Key_Value *)
Create a new location.
Definition: make_loc.c:53
int G_snprintf(char *, size_t, const char *,...) __attribute__((format(printf
int G_is_gisbase(const char *)
Test if specified directory is GISBASE.
Definition: is.c:53
int G_open_update_misc(const char *, const char *, const char *)
open a database file for update
Definition: open_misc.c:155
void G_create_alt_search_path(void)
Define alternative mapset search path.
Definition: mapset_nme.c:103
void G_setenv(const char *, const char *)
Set environment variable (updates .gisrc)
Definition: env.c:420
const char * G_gisbase(void)
Get full path name of the top level module directory.
Definition: gisbase.c:41
const char * G_config_path(void)
Get user&#39;s config path directory.
Definition: home.c:98
void G_free_tokens(char **)
Free memory allocated to tokens.
Definition: gis/token.c:204
void G_warning(const char *,...) __attribute__((format(printf
void G_begin_zone_area_on_ellipsoid(double, double, double)
Begin area calculations for ellipsoid.
Definition: area_ellipse.c:47
double G_database_units_to_meters_factor(void)
Conversion to meters.
Definition: proj3.c:138
void G_lat_format(double, char *)
Definition: ll_format.c:41
const char * G_datum_description(int)
Definition: gis/datum.c:68
struct Flag * G_define_flag(void)
Initializes a Flag struct.
Definition: parser.c:156
int G_plot_polygon(const double *, const double *, int)
Plot filled polygon with n vertices.
Definition: plot.c:373
void G_plot_fx(double(*)(double), double, double)
Plot f(east1) to f(east2)
Definition: plot.c:779
int G_mkdir(const char *)
Creates a new directory.
Definition: paths.c:27
char * G_tolcase(char *)
convert string to lower case
Definition: mapcase.c:19
long G_mrand48(void)
Generate an integer in the range [-2^31, 2^31)
Definition: lrand48.c:144
int G_window_overlap(const struct Cell_head *, double, double, double, double)
Determines if a box overlays a map window.
Definition: wind_overlap.c:37
Structure that stores option information.
Definition: gis.h:528
void G_set_timestamp(struct TimeStamp *, const struct DateTime *)
int G_insert_commas(char *)
Inserts commas into a number string.
Definition: commas.c:38
void G__read_Cell_head(FILE *, struct Cell_head *, int)
Read cell header (for internal use only)
Definition: rd_cellhd.c:57
double G_distance(double, double, double, double)
Returns distance in meters.
Definition: gis/distance.c:75
List of integers.
Definition: gis.h:686
char * G_convert_dirseps_from_host(char *)
Converts directory separator characters in a string from the native host character to the GRASS separ...
Definition: paths.c:105
int G_info_format(void)
Get current message format.
Definition: gis/error.c:532
int G_make_mapset_element(const char *)
Create element in the current mapset.
Definition: mapset_msc.c:38
char * G_store_upper(const char *)
Copy string to allocated memory and convert copied string to upper case.
Definition: strings.c:117
char * G_myname(void)
Returns location title.
Definition: myname.c:31
int G_mkstemp(char *, int, int)
Returns a file descriptor.
Definition: mkstemp.c:127
void G_close_option_file(FILE *)
Close an input/output file returned by G_open_option_file(). If the file pointer is stdin...
Definition: parser.c:1837
void int G_is_little_endian(void)
Tests for little ENDIAN.
Definition: endian.c:24
const char * G_getenv_nofatal(const char *)
Get environment variable.
Definition: env.c:383
int G_verbose_std(void)
Get standard verbosity level.
Definition: verbose.c:86
int G_write_vector_timestamp(const char *, const char *, const struct TimeStamp *)
Write timestamp of vector map.
Definition: timestamp.c:505
void G_get_default_window(struct Cell_head *)
Get the default region.
Definition: get_window.c:93
void G_adjust_Cell_head3(struct Cell_head *, int, int, int)
Adjust cell header for 3D values.
Definition: adj_cellhd.c:165
const char * G_find_raster2(const char *, const char *)
Find a raster map (look but don&#39;t touch)
Definition: find_rast.c:76
char * G_store(const char *)
Copy string to allocated memory.
Definition: strings.c:87
const char * G_database_datum_name(void)
Get datum name for the current location.
Definition: proj3.c:184
void G_switch_env(void)
Switch environments.
Definition: env.c:567
Definition: gis.h:584
char * G_rc_path(const char *, const char *)
Returns path to element and item.
Definition: user_config.c:292
void G_free_ls_filter(void *)
Definition: ls_filter.c:191
int G_limit_east(double *, int)
Function not yet implemented...
Definition: wind_limits.c:35
int G_verbose_max(void)
Get max verbosity level.
Definition: verbose.c:76
int G_limit_north(double *, int)
Limit north (y) coordinate.
Definition: wind_limits.c:75
void G_3dview_warning(int)
Turns 3D View warnings on and off.
Definition: view.c:48
int G_point_in_region(double, double)
Returns TRUE if coordinate is within the current region settings.
Definition: wind_in.c:26
struct Key_Value * G_create_key_value(void)
Allocate and initialize Key_Value structure.
Definition: key_value1.c:23
int G_units(const char *)
Get units code by name.
Definition: units.c:319
char * G_mktemp(char *)
Opens a temporary file.
Definition: mkstemp.c:104
void G_lon_parts(double, int *, int *, double *, char *)
Definition: ll_format.c:133
int G_color_values(const char *, float *, float *, float *)
Definition: named_colr.c:29
char * G_strchg(char *, char, char)
Replace all occurrences of character in string bug with new.
Definition: strings.c:160
int G_asprintf(char **, const char *,...) __attribute__((format(printf
int G_get_spheroid_by_name(const char *, double *, double *, double *)
Get spheroid parameters by name.
Definition: get_ellipse.c:154
double G_meridional_radius_of_curvature(double, double, double)
Meridional radius of curvature.
Definition: radii.c:80
void G_init_tempfile(void)
Initialize environment for creating tempfiles.
Definition: tempfile.c:29
void G_begin_execute(void(*func)(void *), void *, void **, int)
Definition: worker.c:167
int G_bz2_compress(unsigned char *src, int src_sz, unsigned char *dst, int dst_sz)
Definition: cmprbzip.c:88
char * G_convert_dirseps_to_host(char *)
Converts directory separator characters in a string to the native host separator character (/ on Unix...
Definition: paths.c:83
int G_has_raster3d_timestamp(const char *, const char *)
Check if timestamp for 3D raster map exists.
Definition: timestamp.c:573
void G_usage(void)
Command line help/usage message.
Definition: parser_help.c:48
int G_read_vector_timestamp(const char *, const char *, const char *, struct TimeStamp *)
Read timestamp from vector map.
Definition: timestamp.c:455
double G_area_of_cell_at_row(int)
Cell area in specified row.
Definition: gis/area.c:87
char * G_tempfile_pid(int)
Create tempfile from process id.
Definition: tempfile.c:75
struct ilist * G_new_ilist()
Return a new integer list.
Definition: ilist.c:43
long G_lrand48(void)
Generate an integer in the range [0, 2^31)
Definition: lrand48.c:130
void G_lon_format(double, char *)
Definition: ll_format.c:56
int G_name_is_fully_qualified(const char *, char *, char *)
Check if map name is fully qualified (map @ mapset)
Definition: nme_in_mps.c:36
double G_darea0_on_ellipsoid(double)
Calculate integral for area between two latitudes.
Definition: area_ellipse.c:63
void void G_verbose_message(const char *,...) __attribute__((format(printf
const char * G_database_unit_name(int)
Get units (localized) name for the current location.
Definition: proj3.c:53
int G_put_window(const struct Cell_head *)
Writes the region (window)
Definition: put_window.c:46
int G_zlib_expand(unsigned char *src, int src_sz, unsigned char *dst, int dst_sz)
Definition: cmprzlib.c:170
FILE * G_open_mail(struct Popen *)
Definition: pager.c:45
char * G_find_etc(const char *)
searches for a file from the etc search list in GRASS_ADDON_ETC returns the full path to where the fi...
Definition: find_etc.c:63
void G_get_window(struct Cell_head *)
Get the current region.
Definition: get_window.c:47
int G_snaprintf(char *, size_t, const char *,...)
snprintf() version of G_aprintf(). See G_aprintf() for more details.
Definition: aprintf.c:514
void G_option_excludes(void *,...)
Exclude selected options.
int G_recursive_remove(const char *)
Recursively remove all files in given directory.
Definition: remove.c:113
int G_read_compressed(int, int, unsigned char *, int, int)
Definition: compress.c:247
int G_debug(int, const char *,...) __attribute__((format(printf
void G_squeeze(char *)
Remove superfluous white space.
Definition: strings.c:441
int G_is_absolute_path(const char *)
Checks if a specified path looks like an absolute path on the host system.
Definition: paths.c:62
double G_area_for_zone_on_ellipsoid(double, double)
Calculates area between latitudes.
Definition: area_ellipse.c:89
void G__read_mapset_env(void)
Force to read the mapset environment file VAR.
Definition: env.c:98
void G_init_ilist(struct ilist *)
Init an integer list and free allocated memory.
Definition: ilist.c:57
FILE * G_popen_read(struct Popen *, const char *, const char **)
Definition: popen.c:70
double G_area_of_polygon(const double *, const double *, int)
Area in square meters of polygon.
Definition: gis/area.c:159
void G_ls_format(char **, int, int, FILE *)
Prints a listing of items to a stream, in prettified column format.
Definition: ls.c:165
void G_free_ilist(struct ilist *)
Free allocated memory of an integer list.
Definition: ilist.c:27
const char * G_date(void)
Current date and time.
Definition: date.c:26
void G_free_key_value(struct Key_Value *)
Free allocated Key_Value structure.
Definition: key_value1.c:103
void G_popen_clear(struct Popen *)
Definition: popen.c:59
const char * G_datum_name(int)
Definition: gis/datum.c:58
void G_add_error_handler(void(*)(void *), void *)
Add new error handler.
Definition: gis/handler.c:70
struct Key_Value * G_get_projepsg(void)
Gets EPSG information for the current location.
Definition: get_projinfo.c:102
const char * G_get_mapset_name(int)
Get name of the n&#39;th mapset from the current mapset search path.
Definition: mapset_nme.c:44
void G_get_element_window(struct Cell_head *, const char *, const char *, const char *)
Get region for selected element (raster, vector, window, etc.)
Definition: get_window.c:108
int G_expand(unsigned char *, int, unsigned char *, int, int)
Definition: compress.c:236
void G_set_timestamp_range(struct TimeStamp *, const struct DateTime *, const struct DateTime *)
const char * G_find_key_value(const char *, const struct Key_Value *)
Find given key (case sensitive)
Definition: key_value1.c:84
void G_xdr_get_double(double *, const void *)
Definition: gis/xdr.c:83
int G_scan_northing(const char *, double *, int)
ASCII northing to double.
Definition: wind_scan.c:38
int G_lon_scan(const char *, double *)
Definition: ll_scan.c:51
int G_lstat(const char *, struct stat *)
Get file status.
Definition: paths.c:145
FILE * G_fopen_append(const char *, const char *)
Open a database file for update (append mode)
Definition: gis/open.c:280
const char * G_getenv(const char *)
Get environment variable.
Definition: env.c:338
void G_trim_decimal(char *)
Removes trailing zeros from decimal number.
Definition: trim_dec.c:24
void G_newlines_to_spaces(char *)
Definition: nl_to_spaces.c:3