GRASS GIS 7 Programmer's Manual
7.8.5(2020)-exported
|
Go to the documentation of this file.
16 #include <grass/gis.h>
17 #include <grass/glocale.h>
19 #include "parser_local_proto.h"
148 Opt->type = TYPE_STRING;
149 Opt->key_desc =
"sql_query";
151 Opt->label = _(
"SQL SELECT statement");
153 _(
"Example: select * from towns where population > 10000");
157 Opt->type = TYPE_STRING;
158 Opt->gisprompt =
"old,sql_query,sql_query";
159 Opt->key_desc =
"sql_query";
161 Opt->label = _(
"WHERE conditions of SQL statement without 'where' keyword");
162 Opt->description = _(
"Example: income < 1000 and population >= 10000");
166 Opt->type = TYPE_STRING;
167 Opt->key_desc =
"name";
170 Opt->description = _(
"Name of attribute table");
171 Opt->gisprompt =
"old,dbtable,dbtable";
173 case G_OPT_DB_DRIVER:
175 Opt->type = TYPE_STRING;
176 Opt->key_desc =
"name";
179 Opt->description = _(
"Name of database driver");
180 Opt->gisprompt =
"old,dbdriver,dbdriver";
182 case G_OPT_DB_DATABASE:
183 Opt->key =
"database";
184 Opt->type = TYPE_STRING;
185 Opt->key_desc =
"name";
188 Opt->description = _(
"Name of database");
189 Opt->gisprompt =
"old,dbname,dbname";
191 case G_OPT_DB_SCHEMA:
193 Opt->type = TYPE_STRING;
194 Opt->key_desc =
"name";
197 Opt->label = _(
"Database schema");
198 Opt->description = _(
"Do not use this option if schemas "
199 "are not supported by driver/database server");
201 case G_OPT_DB_COLUMN:
203 Opt->type = TYPE_STRING;
204 Opt->key_desc =
"name";
207 Opt->description = _(
"Name of attribute column");
208 Opt->gisprompt =
"old,dbcolumn,dbcolumn";
210 case G_OPT_DB_COLUMNS:
211 Opt->key =
"columns";
212 Opt->type = TYPE_STRING;
213 Opt->key_desc =
"name";
216 Opt->description = _(
"Name of attribute column(s)");
217 Opt->gisprompt =
"old,dbcolumn,dbcolumn";
219 case G_OPT_DB_KEYCOLUMN:
221 Opt->type = TYPE_STRING;
222 Opt->key_desc =
"name";
225 Opt->label = _(
"Name of key column");
226 Opt->description = _(
"Must refer to an integer column");
228 Opt->answer = GV_KEY_COLUMN;
234 Opt->type = TYPE_STRING;
235 Opt->key_desc =
"name";
237 Opt->gisprompt =
"old,group,group";
238 Opt->description = _(
"Name of input imagery group");
240 case G_OPT_I_SUBGROUP:
241 Opt->key =
"subgroup";
242 Opt->type = TYPE_STRING;
243 Opt->key_desc =
"name";
245 Opt->gisprompt =
"old,subgroup,subgroup";
246 Opt->description = _(
"Name of input imagery subgroup");
252 Opt->type = TYPE_INTEGER;
253 Opt->key_desc =
"memory in MB";
260 if (memstr && *memstr)
261 Opt->answer = memstr;
263 Opt->label = _(
"Maximum memory to be used (in MB)");
264 Opt->description = _(
"Cache size for raster rows");
268 Opt->type = TYPE_STRING;
269 Opt->key_desc =
"name";
271 Opt->gisprompt =
"old,cell,raster";
272 Opt->description = _(
"Name of input raster map");
276 Opt->type = TYPE_STRING;
277 Opt->key_desc =
"name";
280 Opt->gisprompt =
"old,cell,raster";
281 Opt->description = _(
"Name of input raster map(s)");
285 Opt->type = TYPE_STRING;
286 Opt->key_desc =
"name";
288 Opt->gisprompt =
"new,cell,raster";
289 Opt->description = _(
"Name for output raster map");
291 case G_OPT_R_OUTPUTS:
293 Opt->type = TYPE_STRING;
294 Opt->key_desc =
"name";
297 Opt->gisprompt =
"new,cell,raster";
298 Opt->description = _(
"Name for output raster map(s)");
302 Opt->type = TYPE_STRING;
303 Opt->key_desc =
"name";
305 Opt->gisprompt =
"old,cell,raster";
306 Opt->description = _(
"Name of raster map");
310 Opt->type = TYPE_STRING;
311 Opt->key_desc =
"name";
314 Opt->gisprompt =
"old,cell,raster";
315 Opt->description = _(
"Name of raster map(s)");
319 Opt->type = TYPE_STRING;
320 Opt->key_desc =
"name";
322 Opt->gisprompt =
"old,cell,raster";
323 Opt->description = _(
"Name of base raster map");
327 Opt->type = TYPE_STRING;
328 Opt->key_desc =
"name";
330 Opt->gisprompt =
"old,cell,raster";
331 Opt->description = _(
"Name of cover raster map");
334 Opt->key =
"elevation";
335 Opt->type = TYPE_STRING;
336 Opt->key_desc =
"name";
338 Opt->gisprompt =
"old,cell,raster";
339 Opt->description = _(
"Name of input elevation raster map");
342 Opt->key =
"elevation";
343 Opt->type = TYPE_STRING;
344 Opt->key_desc =
"name";
347 Opt->gisprompt =
"old,cell,raster";
348 Opt->description = _(
"Name of input elevation raster map(s)");
352 Opt->type = TYPE_STRING;
355 Opt->label = _(
"Type of raster map to be created");
356 Opt->description = _(
"Storage type for resultant raster map");
357 Opt->options =
"CELL,FCELL,DCELL";
359 "CELL;%s;FCELL;%s;DCELL;%s",
361 _(
"Single precision floating point"),
362 _(
"Double precision floating point"));
364 case G_OPT_R_INTERP_TYPE:
366 Opt->type = TYPE_STRING;
368 Opt->description = _(
"Sampling interpolation method");
369 Opt->options =
"nearest,bilinear,bicubic";
371 "nearest;%s;bilinear;%s;bicubic;%s",
372 _(
"Nearest-neighbor interpolation"),
373 _(
"Bilinear interpolation"),
374 _(
"Bicubic interpolation"));
376 case G_OPT_R_BASENAME_INPUT:
378 Opt->type = TYPE_STRING;
379 Opt->key_desc =
"basename";
382 Opt->gisprompt =
"old,cell,raster";
383 Opt->description = _(
"Name of input basename raster map(s)");
385 case G_OPT_R_BASENAME_OUTPUT:
387 Opt->type = TYPE_STRING;
388 Opt->key_desc =
"basename";
391 Opt->gisprompt =
"new,cell,raster";
392 Opt->description = _(
"Name for output basename raster map(s)");
398 Opt->type = TYPE_STRING;
399 Opt->key_desc =
"name";
401 Opt->gisprompt =
"old,grid3,raster_3d";
402 Opt->description = _(
"Name of input 3D raster map");
404 case G_OPT_R3_INPUTS:
406 Opt->type = TYPE_STRING;
407 Opt->key_desc =
"name";
410 Opt->gisprompt =
"old,grid3,raster_3d";
411 Opt->description = _(
"Name of input 3D raster map(s)");
413 case G_OPT_R3_OUTPUT:
415 Opt->type = TYPE_STRING;
416 Opt->key_desc =
"name";
418 Opt->gisprompt =
"new,grid3,raster_3d";
419 Opt->description = _(
"Name for output 3D raster map");
423 Opt->type = TYPE_STRING;
424 Opt->key_desc =
"name";
426 Opt->gisprompt =
"old,grid3,raster_3d";
427 Opt->description = _(
"Name of 3D raster map");
431 Opt->type = TYPE_STRING;
432 Opt->key_desc =
"name";
435 Opt->gisprompt =
"old,grid3,raster_3d";
436 Opt->description = _(
"Name of 3D raster map(s)");
440 Opt->type = TYPE_STRING;
443 Opt->answer =
"default";
444 Opt->options =
"default,double,float";
445 Opt->description = _(
"Data type used in the output raster3d map");
447 case G_OPT_R3_PRECISION:
448 Opt->key =
"precision";
449 Opt->type = TYPE_STRING;
452 Opt->answer =
"default";
454 _(
"Number of digits used as mantissa in the internal map storage, 0 -23 for float, 0 - 52 for double, max or default");
456 case G_OPT_R3_COMPRESSION:
457 Opt->key =
"compression";
458 Opt->type = TYPE_STRING;
461 Opt->answer =
"default";
462 Opt->options =
"default,zip,none";
464 _(
"The compression method used in the output raster3d map");
466 case G_OPT_R3_TILE_DIMENSION:
467 Opt->key =
"tiledimension";
468 Opt->type = TYPE_STRING;
471 Opt->key_desc =
"XxYxZ";
472 Opt->answer =
"default";
474 _(
"The dimensions of the tiles used in the output raster3d map (XxYxZ or default: 16x16x8)");
480 Opt->type = TYPE_STRING;
481 Opt->key_desc =
"name";
483 Opt->gisprompt =
"old,vector,vector";
484 Opt->label = _(
"Name of input vector map");
485 Opt->description = _(
"Or data source for direct OGR access");
489 Opt->type = TYPE_STRING;
490 Opt->key_desc =
"name";
493 Opt->gisprompt =
"old,vector,vector";
494 Opt->label = _(
"Name of input vector map(s)");
495 Opt->description = _(
"Or data source(s) for direct OGR access");
499 Opt->type = TYPE_STRING;
500 Opt->key_desc =
"name";
502 Opt->gisprompt =
"new,vector,vector";
503 Opt->description = _(
"Name for output vector map");
507 Opt->type = TYPE_STRING;
508 Opt->key_desc =
"name";
510 Opt->gisprompt =
"old,vector,vector";
511 Opt->label = _(
"Name of vector map");
512 Opt->description = _(
"Or data source for direct OGR access");
516 Opt->type = TYPE_STRING;
517 Opt->key_desc =
"name";
520 Opt->gisprompt =
"old,vector,vector";
521 Opt->description = _(
"Name of vector map(s)");
525 Opt->type = TYPE_STRING;
528 Opt->answer =
"point,line,boundary,centroid,area";
529 Opt->options =
"point,line,boundary,centroid,area";
530 Opt->description = _(
"Input feature type");
534 Opt->type = TYPE_STRING;
537 Opt->answer =
"point,line,boundary,centroid,area,face,kernel";
538 Opt->options =
"point,line,boundary,centroid,area,face,kernel";
539 Opt->description = _(
"Input feature type");
543 Opt->type = TYPE_STRING;
546 Opt->label = _(
"Layer number or name");
548 _(
"Vector features can have category values in different layers."
549 " This number determines which layer to use. "
550 "When used with direct OGR access this is the layer name.");
551 Opt->gisprompt =
"old,layer,layer";
553 case G_OPT_V_FIELD_ALL:
555 Opt->type = TYPE_STRING;
558 Opt->label = _(
"Layer number or name ('-1' for all layers)");
560 _(
"A single vector map can be connected to multiple database "
561 "tables. This number determines which table to use. "
562 "When used with direct OGR access this is the layer name.");
563 Opt->gisprompt =
"old,layer_all,layer";
567 Opt->type = TYPE_INTEGER;
569 Opt->description = _(
"Category value");
570 Opt->gisprompt =
"old,cat,cats";
574 Opt->type = TYPE_STRING;
575 Opt->key_desc =
"range";
577 Opt->label = _(
"Category values");
578 Opt->description = _(
"Example: 1,3,7-9,13");
579 Opt->gisprompt =
"old,cats,cats";
583 Opt->type = TYPE_INTEGER;
585 Opt->description = _(
"Feature id");
589 Opt->type = TYPE_STRING;
590 Opt->key_desc =
"range";
592 Opt->label = _(
"Feature ids");
593 Opt->description = _(
"Example: 1,3,7-9,13");
599 Opt->type = TYPE_STRING;
600 Opt->key_desc =
"name";
602 Opt->gisprompt =
"old,file,file";
603 Opt->description = _(
"Name of input file");
605 case G_OPT_F_BIN_INPUT:
607 Opt->type = TYPE_STRING;
608 Opt->key_desc =
"name";
610 Opt->gisprompt =
"old,bin,file";
611 Opt->description = _(
"Name of input file");
615 Opt->type = TYPE_STRING;
616 Opt->key_desc =
"name";
618 Opt->gisprompt =
"new,file,file";
619 Opt->description = _(
"Name for output file");
622 Opt->key =
"separator";
623 Opt->type = TYPE_STRING;
624 Opt->key_desc =
"character";
626 Opt->gisprompt =
"old,separator,separator";
627 Opt->answer =
"pipe";
628 Opt->label = _(
"Field separator");
629 Opt->description = _(
"Special characters: pipe, comma, space, tab, newline");
635 Opt->type = TYPE_STRING;
636 Opt->key_desc =
"name";
638 Opt->answer = DEFAULT_FG_COLOR;
639 Opt->gisprompt =
"old,color,color";
640 Opt->label = _(
"Color");
642 _(
"Either a standard color name or R:G:B triplet");
646 Opt->type = TYPE_STRING;
647 Opt->key_desc =
"name";
649 Opt->answer = DEFAULT_FG_COLOR;
650 Opt->gisprompt =
"old,color_none,color";
651 Opt->label = _(
"Color");
653 _(
"Either a standard color name, R:G:B triplet, or \"none\"");
660 Opt->type = TYPE_STRING;
661 Opt->key_desc =
"name";
663 Opt->gisprompt =
"old,dir,dir";
664 Opt->description = _(
"Name of input directory");
669 Opt->type = TYPE_STRING;
673 "miles,feet,meters,kilometers,acres,hectares";
674 Opt->description = _(
"Units");
677 case G_OPT_M_DATATYPE:
679 Opt->key_desc =
"datatype";
680 Opt->type = TYPE_STRING;
683 Opt->description = _(
"Data type(s)");
688 Opt->type = TYPE_STRING;
691 Opt->key_desc =
"name";
692 Opt->gisprompt =
"old,mapset,mapset";
693 Opt->label = _(
"Name of mapset (default: current search path)");
694 Opt->description = _(
"'.' for current mapset");
697 case G_OPT_M_LOCATION:
698 Opt->key =
"location";
699 Opt->type = TYPE_STRING;
702 Opt->label = _(
"Location name");
703 Opt->description = _(
"Location name (not location path)");
704 Opt->gisprompt =
"old,location,location";
705 Opt->key_desc =
"name";
710 Opt->type = TYPE_STRING;
713 Opt->label = _(
"GRASS GIS database directory");
714 Opt->description = _(
"Default: path to the current GRASS GIS database");
715 Opt->gisprompt =
"old,dbase,dbase";
716 Opt->key_desc =
"path";
720 Opt->key =
"coordinates";
721 Opt->type = TYPE_DOUBLE;
724 Opt->key_desc =
"east,north";
725 Opt->gisprompt =
"old,coords,coords";
726 Opt->description = _(
"Coordinates");
731 Opt->key_desc =
"style";
732 Opt->type = TYPE_STRING;
735 Opt->description = _(
"Name of color table");
737 Opt->gisprompt =
"old,colortable,colortable";
740 case G_OPT_M_NULL_VALUE:
741 Opt->key =
"null_value";
742 Opt->key_desc =
"string";
743 Opt->type = TYPE_STRING;
746 Opt->description = _(
"String representing NULL value");
751 Opt->type = TYPE_STRING;
752 Opt->key_desc =
"name";
754 Opt->gisprompt =
"old,windows,region";
755 Opt->description = _(
"Name of saved region");
759 case G_OPT_STDS_INPUT:
761 Opt->type = TYPE_STRING;
762 Opt->key_desc =
"name";
764 Opt->gisprompt =
"old,stds,stds";
765 Opt->description = _(
"Name of the input space time dataset");
767 case G_OPT_STDS_INPUTS:
769 Opt->type = TYPE_STRING;
770 Opt->key_desc =
"name";
773 Opt->gisprompt =
"old,stds,stds";
774 Opt->description = _(
"Name of the input space time datasets");
776 case G_OPT_STDS_OUTPUT:
778 Opt->type = TYPE_STRING;
779 Opt->key_desc =
"name";
781 Opt->gisprompt =
"new,stds,stds";
782 Opt->description = _(
"Name of the output space time dataset");
784 case G_OPT_STRDS_INPUT:
786 Opt->type = TYPE_STRING;
787 Opt->key_desc =
"name";
789 Opt->gisprompt =
"old,strds,strds";
790 Opt->description = _(
"Name of the input space time raster dataset");
792 case G_OPT_STRDS_INPUTS:
794 Opt->type = TYPE_STRING;
795 Opt->key_desc =
"name";
798 Opt->gisprompt =
"old,strds,strds";
799 Opt->description = _(
"Name of the input space time raster datasets");
801 case G_OPT_STRDS_OUTPUT:
803 Opt->type = TYPE_STRING;
804 Opt->key_desc =
"name";
806 Opt->gisprompt =
"new,strds,strds";
807 Opt->description = _(
"Name of the output space time raster dataset");
809 case G_OPT_STRDS_OUTPUTS:
810 Opt->key =
"outputs";
811 Opt->type = TYPE_STRING;
812 Opt->key_desc =
"name";
815 Opt->gisprompt =
"new,strds,strds";
816 Opt->description = _(
"Name of the output space time raster datasets");
818 case G_OPT_STVDS_INPUT:
820 Opt->type = TYPE_STRING;
821 Opt->key_desc =
"name";
823 Opt->gisprompt =
"old,stvds,stvds";
824 Opt->description = _(
"Name of the input space time vector dataset");
826 case G_OPT_STVDS_INPUTS:
828 Opt->type = TYPE_STRING;
829 Opt->key_desc =
"name";
832 Opt->gisprompt =
"old,stvds,stvds";
833 Opt->description = _(
"Name of the input space time vector datasets");
835 case G_OPT_STVDS_OUTPUT:
837 Opt->type = TYPE_STRING;
838 Opt->key_desc =
"name";
840 Opt->gisprompt =
"new,stvds,stvds";
841 Opt->description = _(
"Name of the output space time vector dataset");
843 case G_OPT_STR3DS_INPUT:
845 Opt->type = TYPE_STRING;
846 Opt->key_desc =
"name";
848 Opt->gisprompt =
"old,str3ds,str3ds";
849 Opt->description = _(
"Name of the input space time raster3d dataset");
851 case G_OPT_STR3DS_INPUTS:
853 Opt->type = TYPE_STRING;
854 Opt->key_desc =
"name";
857 Opt->gisprompt =
"old,str3ds,str3ds";
858 Opt->description = _(
"Name of the input space time raster3d datasets");
860 case G_OPT_STR3DS_OUTPUT:
862 Opt->type = TYPE_STRING;
863 Opt->key_desc =
"name";
865 Opt->gisprompt =
"new,str3ds,str3ds";
866 Opt->description = _(
"Name of the output space time raster3d dataset");
868 case G_OPT_STDS_TYPE:
870 Opt->type = TYPE_STRING;
871 Opt->key_desc =
"name";
873 Opt->answer =
"strds";
874 Opt->options =
"strds,stvds,str3ds";
875 Opt->description = _(
"Type of the input space time dataset");
877 case G_OPT_MAP_INPUT:
879 Opt->type = TYPE_STRING;
880 Opt->key_desc =
"name";
882 Opt->gisprompt =
"old,map,map";
883 Opt->description = _(
"Name of the input map");
885 case G_OPT_MAP_INPUTS:
887 Opt->type = TYPE_STRING;
888 Opt->key_desc =
"name";
891 Opt->gisprompt =
"old,map,map";
892 Opt->description = _(
"Name of the input maps");
896 Opt->type = TYPE_STRING;
897 Opt->key_desc =
"name";
899 Opt->answer =
"raster";
900 Opt->options =
"raster,vector,raster_3d";
901 Opt->description = _(
"Type of the input map");
904 Opt->key =
"temporaltype";
905 Opt->type = TYPE_STRING;
906 Opt->key_desc =
"name";
908 Opt->answer =
"absolute";
909 Opt->options =
"absolute,relative";
910 Opt->description = _(
"The temporal type of the space time dataset");
914 Opt->type = TYPE_STRING;
915 Opt->key_desc =
"sql_query";
917 Opt->label = _(
"WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework");
918 Opt->description = _(
"Example: start_time > '2001-01-01 12:30:00'");
921 Opt->key =
"sampling";
922 Opt->type = TYPE_STRING;
923 Opt->key_desc =
"name";
926 Opt->answer =
"start";
927 Opt->options =
"start,during,overlap,contain,equal,follows,precedes";
928 Opt->description = _(
"The method to be used for sampling the input dataset");
962 Flg->description = _(
"Do not create attribute table");
966 Flg->label = _(
"Do not build topology");
967 Flg->description = _(
"Advantageous when handling a large number of points");
struct Flag * G_define_flag(void)
Initializes a Flag struct.
char * G_store(const char *s)
Copy string to allocated memory.
int G_asprintf(char **out, const char *fmt,...)
char * G_color_rules_description_type(void)
Get color rules description for Option->descriptions.
struct Option * G_define_option(void)
Initializes an Option struct.
char * G_color_rules_options(void)
Get list of color rules for Option->options.
struct Option * G_define_standard_option(int opt)
Create standardised Option structure.
const char * G_getenv_nofatal(const char *name)
Get environment variable.
struct Flag * G_define_standard_flag(int flag)
Create standardised Flag structure.