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