grass  7.8.6
About: GRASS (Geographic Resources Analysis Support System) is a raster- and vector-based GIS, image processing system, graphics production system and spatial modeling system.
  Fossies Dox: grass-7.8.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

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 definitions of variables and data types
8 * for use with most, if not all, Grass programs. This file is
9 * usually included in every Grass program.
10 * COPYRIGHT: (C) 2000-2011 by the GRASS Development Team
11 *
12 * This program is free software under the GNU General Public
13 * License (>=v2). Read the file COPYING that comes with GRASS
14 * for details.
15 *
16 *****************************************************************************/
17
18#ifndef GRASS_GIS_H
19#define GRASS_GIS_H
20
21/*============================= Include Files ==============================*/
22
23/* System include files */
24#include <stdio.h>
25#include <stdarg.h>
26#include <stdbool.h>
27
28
29/* Grass and local include files */
30#include <grass/config.h>
31#include <grass/datetime.h>
32#include <grass/version.h>
33
34/*=========================== Constants/Defines ============================*/
35
36#if !defined __GNUC__ || __GNUC__ < 2
37#undef __attribute__
38#define __attribute__(x)
39#endif
40
41static const char *GRASS_copyright __attribute__ ((unused))
42 = "GRASS GNU GPL licensed Software";
43
44/* GRASS version, GRASS date, git short hash of last change in GRASS headers
45 * (and anything else in include)
46 */
47#define GIS_H_VERSION GRASS_HEADERS_VERSION
48/* git date of last change in GRASS headers
49 * (and anything else in include)
50 */
51#define GIS_H_DATE GRASS_HEADERS_DATE
52
53#define G_gisinit(pgm) G__gisinit(GIS_H_VERSION, (pgm))
54#define G_no_gisinit() G__no_gisinit(GIS_H_VERSION)
55
56/* For boolean values and comparisons use the C99 type 'bool' with values 'true' */
57/* and 'false' For historical reasons 'TRUE' and 'FALSE' are still valid. */
58#ifndef TRUE
59#define TRUE true
60#endif
61
62#ifndef FALSE
63#define FALSE false
64#endif
65
66#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
67#define PRI_OFF_T "lld"
68#else
69#define PRI_OFF_T "ld"
70#endif
71
72/*! \brief Cross-platform Newline Character */
73#define NEWLINE '\n'
74#ifdef __MINGW32__
75# define HOST_NEWLINE "\r\n"
76#else
77# define HOST_NEWLINE "\n"
78#endif
79
80/*! \brief Generate warning if function return value is unused */
81#if __GNUC__ && (__GNUC__ >= 3 && __GNUC_MINOR__ >= 4)
82# define WARN_UNUSED_RESULT __attribute__ ((warn_unused_result))
83#else
84# define WARN_UNUSED_RESULT
85#endif
86
87/*!
88 \brief List of units
89*/
90#define U_UNDEFINED -1
91#define U_UNKNOWN 0
92#define U_ACRES 1
93#define U_HECTARES 2
94#define U_KILOMETERS 3
95#define U_METERS 4
96#define U_MILES 5
97#define U_FEET 6
98#define U_RADIANS 7
99#define U_DEGREES 8
100#define U_USFEET 9
101/* Temporal units from the datetime library */
102#define U_YEARS DATETIME_YEAR
103#define U_MONTHS DATETIME_MONTH
104#define U_DAYS DATETIME_DAY
105#define U_HOURS DATETIME_HOUR
106#define U_MINUTES DATETIME_MINUTE
107#define U_SECONDS DATETIME_SECOND
108
109/*! \brief Projection code - XY coordinate system (unreferenced data) */
110#define PROJECTION_XY 0
111/*! \brief Projection code - UTM */
112#define PROJECTION_UTM 1
113/*! \brief Projection code - State Plane */
114#define PROJECTION_SP 2
115/*! \brief Projection code - Latitude-Longitude */
116#define PROJECTION_LL 3
117/*! \brief Projection code - other projection (other then noted above) */
118#define PROJECTION_OTHER 99
119
120#define PROJECTION_FILE "PROJ_INFO"
121#define UNIT_FILE "PROJ_UNITS"
122#define EPSG_FILE "PROJ_EPSG"
123#define WKT_FILE "PROJ_WKT"
124#define SRID_FILE "PROJ_SRID"
125
126#ifdef __MINGW32__
127#define CONFIG_DIR "GRASS7"
128#else
129#define CONFIG_DIR ".grass7"
130#endif
131
132/* define PI and friends */
133#undef M_PI
134#define M_PI 3.14159265358979323846 /* pi */
135
136#undef M_PI_2
137#define M_PI_2 1.57079632679489661923 /* pi/2 */
138
139#undef M_PI_4
140#define M_PI_4 0.78539816339744830962 /* pi/4 */
141
142#undef M_R2D
143#define M_R2D 57.295779513082320877 /* 180/pi */
144
145#undef M_D2R
146#define M_D2R 0.017453292519943295769 /* pi/180 */
147
148/* epsilon (IEEE: 2.220446e-16) */
149#define GRASS_EPSILON 1.0e-15
150
151/* Location of envariment variables */
152#define G_VAR_GISRC 0
153#define G_VAR_MAPSET 1
154
155/* Where to find/store variables */
156#define G_GISRC_MODE_FILE 0 /* files */
157#define G_GISRC_MODE_MEMORY 1 /* memory only */
158
159/* for G_parser() */
160#define TYPE_INTEGER 1
161#define TYPE_DOUBLE 2
162#define TYPE_STRING 3
163#define YES 1
164#define NO 0
165
166/* File/directory name lengths */
167#define GNAME_MAX 256
168#define GMAPSET_MAX 256
169
170#define GPATH_MAX 4096
171
172/* Basename default separator */
173#define GBASENAME_SEP "_"
174
175/* Macros for type size independent integers */
176/* Use these for portability to ensure integers are truly 32bit */
177/* and are handled in a uniform manner */
178
179/* Convert integer to 4 bytes - little endian */
180#define serialize_int32_le(buf, x) do { \
181 (buf)[0] = ((x) >> 0) & 0xFF; \
182 (buf)[1] = ((x) >> 8) & 0xFF; \
183 (buf)[2] = ((x) >> 16) & 0xFF; \
184 (buf)[3] = ((x) >> 24) & 0xFF; \
185} while(0)
186
187/* Convert 4 bytes to an integer - little endian */
188#define deserialize_int32_le(buf) (((buf)[0] << 0) | \
189 ((buf)[1] << 8) | \
190 ((buf)[2] << 16) | \
191 ((buf)[3] << 24))
192
193/* Convert integer to 4 bytes - big endian */
194#define serialize_int32_be(buf, x) do { \
195 (buf)[0] = ((x) >> 24) & 0xFF; \
196 (buf)[1] = ((x) >> 16) & 0xFF; \
197 (buf)[2] = ((x) >> 8) & 0xFF; \
198 (buf)[3] = ((x) >> 0) & 0xFF; \
199} while(0)
200
201/* Convert 4 bytes to an integer - big endian */
202#define deserialize_int32_be(buf) (((buf)[0] << 24) | \
203 ((buf)[1] << 16) | \
204 ((buf)[2] << 8) | \
205 ((buf)[3] << 0))
206
207/* Cross-platform Directory Separator Character and null device stuff */
208#define GRASS_DIRSEP '/'
209#ifdef __MINGW32__
210# define HOST_DIRSEP '\\'
211# define G_DEV_NULL "NUL:"
212#else
213# define HOST_DIRSEP '/'
214# define G_DEV_NULL "/dev/null"
215#endif
216
217/*!
218 \typedef STD_OPT
219 \brief Standard option identifiers (enum)
220
221 Identifies of all recognized standard options.
222
223 The term <em>old</em> in the descriptions means existing map which
224 is supposed to exist before the module is called.
225 On the other hand, the term <em>new</em> in the descriptions means
226 that the map is not supposed to exist and that module will create one.
227
228 Used by the G_parser() system.
229
230 IMPORTANT NOTE: when adding new item to STD_OPT you should also
231 update STD_OPT_STRINGS array in general/g.parser/standard_option.c.
232
233*/
234typedef enum
235{
237 G_OPT_DB_SQL, /*!< SQL statements */
238 G_OPT_DB_WHERE, /*!< SQL where conditions */
239 G_OPT_DB_TABLE, /*!< table name */
240 G_OPT_DB_DRIVER, /*!< driver name */
241 G_OPT_DB_DATABASE, /*!< database name */
242 G_OPT_DB_SCHEMA, /*!< database schema */
243 G_OPT_DB_COLUMN, /*!< one attr column */
244 G_OPT_DB_COLUMNS, /*!< one or more attr columns */
245 G_OPT_DB_KEYCOLUMN, /*!< key column */
246
247 G_OPT_I_GROUP, /*!< old input imagery group */
248 G_OPT_I_SUBGROUP, /*!< old input imagery subgroup */
249
250 G_OPT_MEMORYMB, /*!< Maximum memory to be used (in MB): cache size for raster rows */
251 G_OPT_R_INPUT, /*!< old input raster map */
252 G_OPT_R_INPUTS, /*!< old input raster maps */
253 G_OPT_R_OUTPUT, /*!< new output raster map */
254 G_OPT_R_OUTPUTS, /*!< new output raster maps */
255 G_OPT_R_MAP, /*!< old input raster map */
256 G_OPT_R_MAPS, /*!< old input rasters map */
257 G_OPT_R_BASE, /*!< old input base raster map */
258 G_OPT_R_COVER, /*!< old input cover raster map */
259 G_OPT_R_ELEV, /*!< old input elevation raster map */
260 G_OPT_R_ELEVS, /*!< old input elevation raster maps */
261 G_OPT_R_TYPE, /*!< raster map type */
262 G_OPT_R_INTERP_TYPE, /*!< interpolation type */
263 G_OPT_R_BASENAME_INPUT, /*!< old input basename raster maps */
264 G_OPT_R_BASENAME_OUTPUT, /*!< new output basename raster maps */
265
266 G_OPT_R3_INPUT, /*!< old input raster3d map */
267 G_OPT_R3_INPUTS, /*!< old input raster3d maps */
268 G_OPT_R3_OUTPUT, /*!< new output raster3d map */
269 G_OPT_R3_MAP, /*!< old input raster3d map */
270 G_OPT_R3_MAPS, /*!< old input raster3d maps */
271 G_OPT_R3_TYPE, /*!< Type (FCELL or DCELL) of a new created raster3d map */
272 G_OPT_R3_PRECISION, /*!< The precision of the new generated raster3d map */
273 G_OPT_R3_TILE_DIMENSION, /*!< The tile dimension of a new generated raster3d map */
274 G_OPT_R3_COMPRESSION, /*!< The kind of compression of a new created raster3d map */
275
276 G_OPT_V_INPUT, /*!< old input vector map */
277 G_OPT_V_INPUTS, /*!< old input vector maps */
278 G_OPT_V_OUTPUT, /*!< new output vector map */
279 G_OPT_V_MAP, /*!< old input vector map */
280 G_OPT_V_MAPS, /*!< old input vector maps */
281 G_OPT_V_TYPE, /*!< primitive type */
282 G_OPT_V3_TYPE, /*!< primitive type, 2D and 3D */
283 G_OPT_V_FIELD, /*!< layer number (layers used to be called fields) */
284 G_OPT_V_FIELD_ALL, /*!< layer number (layers used to be called fields) */
285 G_OPT_V_CAT, /*!< one category */
286 G_OPT_V_CATS, /*!< more categories */
287 G_OPT_V_ID, /*!< one feature id */
288 G_OPT_V_IDS, /*!< more feature ids */
289
290 G_OPT_F_INPUT, /*!< old input file */
291 G_OPT_F_BIN_INPUT, /*!< old binary input file */
292 G_OPT_F_OUTPUT, /*!< new output file */
293 G_OPT_F_SEP, /*!< data field separator */
294
295 G_OPT_C, /*!< color */
296 G_OPT_CN, /*!< color or none */
297
298 G_OPT_M_UNITS, /*!< units */
299 G_OPT_M_DATATYPE, /*!< datatype */
300 G_OPT_M_MAPSET, /*!< mapset */
301 G_OPT_M_LOCATION, /*!< location */
302 G_OPT_M_DBASE, /*!< dbase */
303 G_OPT_M_COORDS, /*!< coordinates */
304 G_OPT_M_COLR, /*!< color rules */
305 G_OPT_M_DIR, /*!< directory input */
306 G_OPT_M_REGION, /*!< saved region */
307 G_OPT_M_NULL_VALUE, /*!< null value string */
308 G_OPT_M_NPROCS, /*!< number of threads for parallel computing */
309
310 G_OPT_STDS_INPUT, /*!< old input space time dataset of type strds, str3ds or stvds */
311 G_OPT_STDS_INPUTS, /*!< old input space time datasets */
312 G_OPT_STDS_OUTPUT, /*!< new output space time dataset */
313 G_OPT_STRDS_INPUT, /*!< old input space time raster dataset */
314 G_OPT_STRDS_INPUTS, /*!< old input space time raster datasets */
315 G_OPT_STRDS_OUTPUT, /*!< new output space time raster dataset */
316 G_OPT_STRDS_OUTPUTS, /*!< new output space time raster datasets */
317 G_OPT_STR3DS_INPUT, /*!< old input space time raster3d dataset */
318 G_OPT_STR3DS_INPUTS, /*!< old input space time raster3d datasets */
319 G_OPT_STR3DS_OUTPUT, /*!< new output space time raster3d dataset */
320 G_OPT_STVDS_INPUT, /*!< old input space time vector dataset */
321 G_OPT_STVDS_INPUTS, /*!< old input space time vector datasets */
322 G_OPT_STVDS_OUTPUT, /*!< new output space time vector dataset */
323 G_OPT_MAP_INPUT, /*!< old input map of type raster, vector or raster3d */
324 G_OPT_MAP_INPUTS, /*!< old input maps of type raster, vector or raster3d */
325 G_OPT_STDS_TYPE, /*!< the type of a space time dataset: strds, str3ds, stvds */
326 G_OPT_MAP_TYPE, /*!< The type of an input map: raster, vect, rast3d */
327 G_OPT_T_TYPE, /*!< The temporal type of a space time dataset */
328 G_OPT_T_WHERE, /*!< A temporal GIS framework SQL WHERE statement */
329 G_OPT_T_SAMPLE /*!< Temporal sample methods */
330
332
333/*!
334 \typedef STD_FLG
335 \brief Standard flag identifiers (enum)
336
337 Identifies of all recognized standard flags.
338
339 Used by the G_parser() system.
340*/
341
342/**/ typedef enum
343{
345 G_FLG_V_TABLE, /*!< do not create attribute table */
346 G_FLG_V_TOPO /*!< do not build topology */
348
349/* Parser rules for G__option_rule() */
358
359/* Message format */
360#define G_INFO_FORMAT_STANDARD 0 /* GRASS_MESSAGE_FORMAT=standard or not defined */
361#define G_INFO_FORMAT_GUI 1 /* GRASS_MESSAGE_FORMAT=gui */
362#define G_INFO_FORMAT_SILENT 2 /* GRASS_MESSAGE_FORMAT=silent */
363#define G_INFO_FORMAT_PLAIN 3 /* GRASS_MESSAGE_FORMAT=plain */
364
365/* Icon types */
366#define G_ICON_CROSS 0
367#define G_ICON_BOX 1
368#define G_ICON_ARROW 2
369
370/* default colors */
371#define DEFAULT_FG_COLOR "black"
372#define DEFAULT_BG_COLOR "white"
373#define DEFAULT_COLOR_TABLE "viridis"
374
375/* error codes */
376#define G_FATAL_EXIT 0
377#define G_FATAL_PRINT 1
378#define G_FATAL_RETURN 2
379
380/*! \brief Endian check */
381#define ENDIAN_LITTLE 0
382#define ENDIAN_BIG 1
383#define ENDIAN_OTHER 2
384
385/* for vector maps */
386/*!
387 \brief Name of default key column
388*/
389#define GV_KEY_COLUMN "cat"
390
391/*!
392 \brief Element types identifiers (enum)
393
394 Identifies various element types. Element can be raster map,
395 vector map, etc.
396*/
397enum
398{ /* Dir */
399 G_ELEMENT_RASTER = 1, /*!< raster */
400 G_ELEMENT_RASTER3D = 2, /*!< 3d raster */
401 G_ELEMENT_VECTOR = 3, /*!< vector */
402 G_ELEMENT_ASCIIVECTOR = 4, /*!< ASCII vector */
403 G_ELEMENT_LABEL = 5, /*!< labels */
404 G_ELEMENT_REGION = 6, /*!< region */
405 G_ELEMENT_GROUP = 7 /*!< group */
407
408/*=========================== Typedefs/Structures ==========================*/
409
410/*!
411 \brief 2D/3D raster map header (used also for region)
412*/
414{
415 /*! \brief Max number of bytes per raster data value minus 1 (raster header only)
416
417 Note: -1 for FP raster maps
418 */
420 /*! \brief Compression mode (raster header only)
421
422 - 0: uncompressed
423 - 1: compressed
424 - -1: pre GRASS 3.0
425 */
427 /*! \brief Number of rows for 2D data */
428 int rows;
429 /*! \brief Number of rows for 3D data */
430 int rows3;
431 /*! \brief Number of columns for 2D data */
432 int cols;
433 /*! \brief Number of columns for 3D data */
434 int cols3;
435 /*! \brief number of depths for 3D data */
437 /*! \brief Projection code
438
439 - PROJECTION_XY
440 - PROJECTION_UTM
441 - PROJECTION_SP
442 - PROJECTION_LL
443 - PROJECTION_OTHER
444 */
445 int proj;
446 /*! \brief Projection zone (UTM) */
447 int zone;
448 /*! \brief Resolution - east to west cell size for 2D data */
449 double ew_res;
450 /*! \brief Resolution - east to west cell size for 3D data */
451 double ew_res3;
452 /*! \brief Resolution - north to south cell size for 2D data */
453 double ns_res;
454 /*! \brief Resolution - north to south cell size for 3D data */
455 double ns_res3;
456 /*! \brief Resolution - top to bottom cell size for 3D data */
457 double tb_res;
458 /*! \brief Extent coordinates (north) */
459 double north;
460 /*! \brief Extent coordinates (south) */
461 double south;
462 /*! \brief Extent coordinates (east) */
463 double east;
464 /*! \brief Extent coordinates (west) */
465 double west;
466 /*! \brief Extent coordinates (top) - 3D data*/
467 double top;
468 /*! \brief Extent coordinates (bottom) - 3D data */
469 double bottom;
470};
471
472/*
473 ** Structure for I/O of 3dview files (view.c)
474 */
476{
477 char pgm_id[40]; /* user-provided identifier */
478 float from_to[2][3]; /* eye position & lookat position */
479 float fov; /* field of view */
480 float twist; /* right_hand rotation about from_to */
481 float exag; /* terrain elevation exageration */
482 int mesh_freq; /* cells per grid line */
483 int poly_freq; /* cells per polygon */
484 int display_type; /* 1 for mesh, 2 for poly, 3 for both */
485 int lightson; /* boolean */
486 int dozero; /* boolean */
487 int colorgrid; /* boolean */
488 int shading; /* boolean */
489 int fringe; /* boolean */
490 int surfonly; /* boolean */
491 int doavg; /* boolean */
492 char grid_col[40]; /* colors */
493 char bg_col[40]; /* colors */
494 char other_col[40]; /* colors */
495 float lightpos[4]; /* east, north, height, 1.0 for local 0.0 infin */
496 float lightcol[3]; /* values between 0.0 to 1.0 for red, grn, blu */
497 float ambient;
498 float shine;
500};
501
503{
506 char **key;
507 char **value;
508};
509
510/*!
511 \brief Structure that stores option information
512
513 The descriptions member contains pairs of option and option
514 descriptions separated by semicolon ';'.
515 For example, when options member is set using:
516 \code
517 opt->options = "break,rmdupl"
518 \endcode
519 the descriptions member should be set to:
520 \verbatim
521 "break;break lines on intersections;"
522 "rmdupl;remove duplicates"
523 \endverbatim
524
525 Parsed descriptions are stored in the same order as options.
526
527 GUI dependency is a list of options (separated by commas) to be updated
528 if the value is changed.
529
530 Used by the G_parser() system.
531*/
532struct Option
533{
534 const char *key; /*!< Key word used on command line */
535 int type; /*!< Option type */
536 int required; /*!< REQUIRED or OPTIONAL */
537 int multiple; /*!< Multiple entries OK */
538 const char *options; /*!< Approved values or range or NULL */
539 const char **opts; /*!< NULL or NULL terminated array of parsed options */
540 const char *key_desc; /*!< one word describing the key */
541 const char *label; /*!< Optional short label, used in GUI as item label */
542 const char *description; /*!< String describing option */
543 const char *descriptions; /*!< ';' separated pairs of option and option descriptions */
544 const char **descs; /*!< parsed descriptions, array of either NULL or string */
545 char *answer; /*!< Option answer */
546 const char *def; /*!< Where original answer gets saved */
547 char **answers; /*!< Option answers (for multiple=YES) */
548 struct Option *next_opt; /*!< Pointer to next option struct */
549 const char *gisprompt; /*!< Interactive prompt guidance */
550 const char *guisection; /*!< GUI Layout guidance: ';' delimited hierarchical tree position */
551 const char *guidependency; /*!< GUI dependency */
552 int (*checker)(const char *);/*!< Routine to check answer or NULL */
553 int count;
554};
555
556/*!
557 \brief Structure that stores flag info
558
559 Used by the G_parser() system.
560*/
561struct Flag
562{
563 char key; /*!< Key char used on command line */
564 char answer; /*!< Stores flag state: 0/1 */
565 char suppress_required; /*!< Suppresses checking of required options */
566 char suppress_overwrite; /*!< Suppresses checking of existing output */
567 const char *label; /*!< Optional short label, used in GUI as item label */
568 const char *description; /*!< String describing flag meaning */
569 const char *guisection; /*!< GUI Layout guidance: ';' delimited hierarchical tree position */
570 struct Flag *next_flag; /*!< Pointer to next flag struct */
571};
572
573/*!
574 \brief Structure that stores module info
575
576 Used by the G_parser() system.
577*/
579{
580 const char *label; /*!< Optional short description for GUI */
581 const char *description; /*!< String describing module */
582 const char **keywords; /*!< Keywords describing module */
583 /* further items are possible: author(s), version, year */
584 int overwrite; /*!< overwrite old files */
585 int verbose; /*!< print all information about progress and so on */
586};
587
589{
590 DateTime dt[2]; /* two datetimes */
591 int count;
592};
593
594struct Counter {
595 int value;
596};
597
598struct Popen {
599 FILE *fp;
600 int pid;
601};
602
603typedef int CELL;
604typedef double DCELL;
605typedef float FCELL;
606
607/* 64 bit signed integer */
608#if HAVE_INT64_T
609#include <sys/types.h>
610typedef int64_t grass_int64;
611#elif defined(__MINGW32__)
612typedef __int64 grass_int64;
613#elif HAVE_LONG_LONG_INT
614typedef long long int grass_int64;
615#elif HAVE_LARGEFILES
616typedef off_t grass_int64;
617#else
618#error "no 64 bit integer available"
619#endif
620
621/* LCELL = large CELL, proposed new raster data type */
622typedef grass_int64 LCELL;
623
625{
627 unsigned char red;
628 unsigned char grn;
629 unsigned char blu;
630};
631
633{
634 struct _Color_Value_ low, high;
637};
638
640{
643
644 struct
645 {
646 unsigned char *red;
647 unsigned char *grn;
648 unsigned char *blu;
649 unsigned char *set;
653
654 struct
655 {
657 /* pointers to color rules corresponding to the intervals btwn vals */
659 int nalloc;
660 int active;
662
664};
665
666struct Colors
667{
668 int version; /* set by read_colors: -1=old,1=new */
671 int is_float; /* defined on floating point raster data? */
672 int null_set; /* the colors for null are set? */
673 unsigned char null_red;
674 unsigned char null_grn;
675 unsigned char null_blu;
676 int undef_set; /* the colors for cells not in range are set? */
677 unsigned char undef_red;
678 unsigned char undef_grn;
679 unsigned char undef_blu;
685};
686
687/*!
688 \brief List of integers
689*/
690struct ilist
691{
692 /*!
693 \brief Array of values
694 */
695 int *value;
696 /*!
697 \brief Number of values in the list
698 */
700 /*!
701 \brief Allocated space for values
702 */
704};
705
706/*============================== Prototypes ================================*/
707
708/* Since there are so many prototypes for the gis library they are stored */
709/* in the file gisdefs.h */
710#include <grass/defs/gis.h>
711
712#endif /* GRASS_GIS_H */
STD_OPT
Standard option identifiers (enum)
Definition: gis.h:235
@ G_OPT_STRDS_INPUTS
Definition: gis.h:314
@ G_OPT_M_REGION
Definition: gis.h:306
@ G_OPT_F_BIN_INPUT
Definition: gis.h:291
@ G_OPT_V_IDS
Definition: gis.h:288
@ G_OPT_DB_COLUMNS
Definition: gis.h:244
@ G_OPT_M_DIR
Definition: gis.h:305
@ G_OPT_R_BASENAME_INPUT
Definition: gis.h:263
@ G_OPT_R3_INPUTS
Definition: gis.h:267
@ G_OPT_R_ELEV
Definition: gis.h:259
@ G_OPT_R_MAPS
Definition: gis.h:256
@ G_OPT_V_CAT
Definition: gis.h:285
@ G_OPT_F_SEP
Definition: gis.h:293
@ G_OPT_R_BASENAME_OUTPUT
Definition: gis.h:264
@ G_OPT_STR3DS_INPUT
Definition: gis.h:317
@ G_OPT_R_ELEVS
Definition: gis.h:260
@ G_OPT_R_INPUTS
Definition: gis.h:252
@ G_OPT_STVDS_OUTPUT
Definition: gis.h:322
@ G_OPT_STRDS_OUTPUTS
Definition: gis.h:316
@ G_OPT_T_WHERE
Definition: gis.h:328
@ G_OPT_V_MAP
Definition: gis.h:279
@ G_OPT_DB_WHERE
Definition: gis.h:238
@ G_OPT_T_TYPE
Definition: gis.h:327
@ G_OPT_V_CATS
Definition: gis.h:286
@ G_OPT_R_COVER
Definition: gis.h:258
@ G_OPT_M_NULL_VALUE
Definition: gis.h:307
@ G_OPT_DB_KEYCOLUMN
Definition: gis.h:245
@ G_OPT_DB_COLUMN
Definition: gis.h:243
@ G_OPT_DB_SQL
Definition: gis.h:237
@ G_OPT_F_INPUT
Definition: gis.h:290
@ G_OPT_STRDS_OUTPUT
Definition: gis.h:315
@ G_OPT_V_INPUTS
Definition: gis.h:277
@ G_OPT_V_FIELD_ALL
Definition: gis.h:284
@ G_OPT_T_SAMPLE
Definition: gis.h:329
@ G_OPT_UNDEFINED
Definition: gis.h:236
@ G_OPT_V3_TYPE
Definition: gis.h:282
@ G_OPT_MAP_INPUT
Definition: gis.h:323
@ G_OPT_R3_TYPE
Definition: gis.h:271
@ G_OPT_V_MAPS
Definition: gis.h:280
@ G_OPT_STVDS_INPUT
Definition: gis.h:320
@ G_OPT_STRDS_INPUT
Definition: gis.h:313
@ G_OPT_M_NPROCS
Definition: gis.h:308
@ G_OPT_STDS_TYPE
Definition: gis.h:325
@ G_OPT_STR3DS_INPUTS
Definition: gis.h:318
@ G_OPT_R_MAP
Definition: gis.h:255
@ G_OPT_M_LOCATION
Definition: gis.h:301
@ G_OPT_M_COLR
Definition: gis.h:304
@ G_OPT_MAP_INPUTS
Definition: gis.h:324
@ G_OPT_V_ID
Definition: gis.h:287
@ G_OPT_M_DBASE
Definition: gis.h:302
@ G_OPT_M_COORDS
Definition: gis.h:303
@ G_OPT_M_MAPSET
Definition: gis.h:300
@ G_OPT_R_BASE
Definition: gis.h:257
@ G_OPT_STVDS_INPUTS
Definition: gis.h:321
@ G_OPT_R3_PRECISION
Definition: gis.h:272
@ G_OPT_R3_MAP
Definition: gis.h:269
@ G_OPT_STDS_INPUT
Definition: gis.h:310
@ G_OPT_C
Definition: gis.h:295
@ G_OPT_R3_OUTPUT
Definition: gis.h:268
@ G_OPT_R3_MAPS
Definition: gis.h:270
@ G_OPT_DB_TABLE
Definition: gis.h:239
@ G_OPT_STDS_INPUTS
Definition: gis.h:311
@ G_OPT_R3_INPUT
Definition: gis.h:266
@ G_OPT_STDS_OUTPUT
Definition: gis.h:312
@ G_OPT_R_TYPE
Definition: gis.h:261
@ G_OPT_V_FIELD
Definition: gis.h:283
@ G_OPT_V_TYPE
Definition: gis.h:281
@ G_OPT_MEMORYMB
Definition: gis.h:250
@ G_OPT_DB_DATABASE
Definition: gis.h:241
@ G_OPT_CN
Definition: gis.h:296
@ G_OPT_R_OUTPUTS
Definition: gis.h:254
@ G_OPT_R_INTERP_TYPE
Definition: gis.h:262
@ G_OPT_MAP_TYPE
Definition: gis.h:326
@ G_OPT_R_INPUT
Definition: gis.h:251
@ G_OPT_R3_TILE_DIMENSION
Definition: gis.h:273
@ G_OPT_F_OUTPUT
Definition: gis.h:292
@ G_OPT_DB_SCHEMA
Definition: gis.h:242
@ G_OPT_M_UNITS
Definition: gis.h:298
@ G_OPT_DB_DRIVER
Definition: gis.h:240
@ G_OPT_I_SUBGROUP
Definition: gis.h:248
@ G_OPT_V_OUTPUT
Definition: gis.h:278
@ G_OPT_R_OUTPUT
Definition: gis.h:253
@ G_OPT_V_INPUT
Definition: gis.h:276
@ G_OPT_M_DATATYPE
Definition: gis.h:299
@ G_OPT_I_GROUP
Definition: gis.h:247
@ G_OPT_STR3DS_OUTPUT
Definition: gis.h:319
@ G_OPT_R3_COMPRESSION
Definition: gis.h:274
grass_int64 LCELL
Definition: gis.h:622
float FCELL
Definition: gis.h:605
@ G_ELEMENT_RASTER
Definition: gis.h:399
@ G_ELEMENT_VECTOR
Definition: gis.h:401
@ G_ELEMENT_GROUP
Definition: gis.h:405
@ G_ELEMENT_RASTER3D
Definition: gis.h:400
@ G_ELEMENT_REGION
Definition: gis.h:404
@ G_ELEMENT_LABEL
Definition: gis.h:403
@ G_ELEMENT_ASCIIVECTOR
Definition: gis.h:402
#define __attribute__(x)
Definition: gis.h:38
rule_type
Definition: gis.h:350
@ RULE_EXCLUDES
Definition: gis.h:355
@ RULE_REQUIRES
Definition: gis.h:353
@ RULE_REQUIRED
Definition: gis.h:352
@ RULE_EXCLUSIVE
Definition: gis.h:351
@ RULE_COLLECTIVE
Definition: gis.h:356
@ RULE_REQUIRES_ALL
Definition: gis.h:354
double DCELL
Definition: gis.h:604
static const char * GRASS_copyright
Definition: gis.h:42
int CELL
Definition: gis.h:603
STD_FLG
Standard flag identifiers (enum)
Definition: gis.h:343
@ G_FLG_V_TOPO
Definition: gis.h:346
@ G_FLG_V_TABLE
Definition: gis.h:345
@ G_FLG_UNDEFINED
Definition: gis.h:344
2D/3D raster map header (used also for region)
Definition: gis.h:414
int cols3
Number of columns for 3D data.
Definition: gis.h:434
double ew_res
Resolution - east to west cell size for 2D data.
Definition: gis.h:449
double north
Extent coordinates (north)
Definition: gis.h:459
double bottom
Extent coordinates (bottom) - 3D data.
Definition: gis.h:469
int compressed
Compression mode (raster header only)
Definition: gis.h:426
int format
Max number of bytes per raster data value minus 1 (raster header only)
Definition: gis.h:419
int zone
Projection zone (UTM)
Definition: gis.h:447
int depths
number of depths for 3D data
Definition: gis.h:436
double east
Extent coordinates (east)
Definition: gis.h:463
double ew_res3
Resolution - east to west cell size for 3D data.
Definition: gis.h:451
double ns_res
Resolution - north to south cell size for 2D data.
Definition: gis.h:453
double ns_res3
Resolution - north to south cell size for 3D data.
Definition: gis.h:455
double top
Extent coordinates (top) - 3D data.
Definition: gis.h:467
int rows3
Number of rows for 3D data.
Definition: gis.h:430
int rows
Number of rows for 2D data.
Definition: gis.h:428
int cols
Number of columns for 2D data.
Definition: gis.h:432
int proj
Projection code.
Definition: gis.h:445
double south
Extent coordinates (south)
Definition: gis.h:461
double tb_res
Resolution - top to bottom cell size for 3D data.
Definition: gis.h:457
double west
Extent coordinates (west)
Definition: gis.h:465
Definition: gis.h:667
int null_set
Definition: gis.h:672
unsigned char undef_blu
Definition: gis.h:679
int is_float
Definition: gis.h:671
DCELL cmax
Definition: gis.h:683
unsigned char null_blu
Definition: gis.h:675
unsigned char undef_grn
Definition: gis.h:678
unsigned char undef_red
Definition: gis.h:677
struct _Color_Info_ fixed
Definition: gis.h:680
struct _Color_Info_ modular
Definition: gis.h:681
int version
Definition: gis.h:668
int invert
Definition: gis.h:670
int undef_set
Definition: gis.h:676
unsigned char null_grn
Definition: gis.h:674
int organizing
Definition: gis.h:684
DCELL shift
Definition: gis.h:669
unsigned char null_red
Definition: gis.h:673
DCELL cmin
Definition: gis.h:682
Definition: gis.h:594
int value
Definition: gis.h:595
Structure that stores flag info.
Definition: gis.h:562
const char * guisection
Definition: gis.h:569
char suppress_overwrite
Definition: gis.h:566
struct Flag * next_flag
Definition: gis.h:570
char suppress_required
Definition: gis.h:565
const char * description
Definition: gis.h:568
char key
Definition: gis.h:563
char answer
Definition: gis.h:564
const char * label
Definition: gis.h:567
Structure that stores module info.
Definition: gis.h:579
int verbose
Definition: gis.h:585
const char ** keywords
Definition: gis.h:582
const char * description
Definition: gis.h:581
int overwrite
Definition: gis.h:584
const char * label
Definition: gis.h:580
Definition: gis.h:476
struct Cell_head vwin
Definition: gis.h:499
int mesh_freq
Definition: gis.h:482
float from_to[2][3]
Definition: gis.h:478
float fov
Definition: gis.h:479
char pgm_id[40]
Definition: gis.h:477
char other_col[40]
Definition: gis.h:494
int colorgrid
Definition: gis.h:487
char bg_col[40]
Definition: gis.h:493
char grid_col[40]
Definition: gis.h:492
float lightcol[3]
Definition: gis.h:496
int shading
Definition: gis.h:488
int dozero
Definition: gis.h:486
int lightson
Definition: gis.h:485
float shine
Definition: gis.h:498
int display_type
Definition: gis.h:484
int poly_freq
Definition: gis.h:483
float ambient
Definition: gis.h:497
float exag
Definition: gis.h:481
float twist
Definition: gis.h:480
int fringe
Definition: gis.h:489
float lightpos[4]
Definition: gis.h:495
int surfonly
Definition: gis.h:490
int doavg
Definition: gis.h:491
Definition: gis.h:503
char ** value
Definition: gis.h:507
int nitems
Definition: gis.h:504
int nalloc
Definition: gis.h:505
char ** key
Definition: gis.h:506
Structure that stores option information.
Definition: gis.h:533
int(* checker)(const char *)
Definition: gis.h:552
const char * key
Definition: gis.h:534
struct Option * next_opt
Definition: gis.h:548
int count
Definition: gis.h:553
const char * key_desc
Definition: gis.h:540
const char ** opts
Definition: gis.h:539
const char * gisprompt
Definition: gis.h:549
const char * label
Definition: gis.h:541
int type
Definition: gis.h:535
const char * descriptions
Definition: gis.h:543
const char * def
Definition: gis.h:546
const char * description
Definition: gis.h:542
char * answer
Definition: gis.h:545
int required
Definition: gis.h:536
const char ** descs
Definition: gis.h:544
const char * options
Definition: gis.h:538
char ** answers
Definition: gis.h:547
int multiple
Definition: gis.h:537
const char * guisection
Definition: gis.h:550
const char * guidependency
Definition: gis.h:551
Definition: gis.h:598
int pid
Definition: gis.h:600
FILE * fp
Definition: gis.h:599
Definition: gis.h:589
DateTime dt[2]
Definition: gis.h:590
int count
Definition: gis.h:591
struct _Color_Info_::@3 lookup
unsigned char * red
Definition: gis.h:646
DCELL * vals
Definition: gis.h:656
struct _Color_Info_::@4 fp_lookup
DCELL max
Definition: gis.h:663
int active
Definition: gis.h:651
unsigned char * set
Definition: gis.h:649
unsigned char * blu
Definition: gis.h:648
struct _Color_Rule_ * rules
Definition: gis.h:641
unsigned char * grn
Definition: gis.h:647
struct _Color_Rule_ ** rules
Definition: gis.h:658
DCELL min
Definition: gis.h:663
int n_rules
Definition: gis.h:642
int nalloc
Definition: gis.h:650
struct _Color_Rule_ * prev
Definition: gis.h:636
struct _Color_Rule_ * next
Definition: gis.h:635
struct _Color_Value_ low high
Definition: gis.h:634
unsigned char blu
Definition: gis.h:629
unsigned char red
Definition: gis.h:627
DCELL value
Definition: gis.h:626
unsigned char grn
Definition: gis.h:628
List of integers.
Definition: gis.h:691
int n_values
Number of values in the list.
Definition: gis.h:699
int * value
Array of values.
Definition: gis.h:695
int alloc_values
Allocated space for values.
Definition: gis.h:703