GRASS GIS 7 Programmer's Manual
7.8.3(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"
146 Opt->type = TYPE_STRING;
147 Opt->key_desc =
"sql_query";
149 Opt->label = _(
"SQL SELECT statement");
151 _(
"Example: select * from towns where population > 10000");
155 Opt->type = TYPE_STRING;
156 Opt->gisprompt =
"old,sql_query,sql_query";
157 Opt->key_desc =
"sql_query";
159 Opt->label = _(
"WHERE conditions of SQL statement without 'where' keyword");
160 Opt->description = _(
"Example: income < 1000 and population >= 10000");
164 Opt->type = TYPE_STRING;
165 Opt->key_desc =
"name";
168 Opt->description = _(
"Name of attribute table");
169 Opt->gisprompt =
"old,dbtable,dbtable";
171 case G_OPT_DB_DRIVER:
173 Opt->type = TYPE_STRING;
174 Opt->key_desc =
"name";
177 Opt->description = _(
"Name of database driver");
178 Opt->gisprompt =
"old,dbdriver,dbdriver";
180 case G_OPT_DB_DATABASE:
181 Opt->key =
"database";
182 Opt->type = TYPE_STRING;
183 Opt->key_desc =
"name";
186 Opt->description = _(
"Name of database");
187 Opt->gisprompt =
"old,dbname,dbname";
189 case G_OPT_DB_SCHEMA:
191 Opt->type = TYPE_STRING;
192 Opt->key_desc =
"name";
195 Opt->label = _(
"Database schema");
196 Opt->description = _(
"Do not use this option if schemas "
197 "are not supported by driver/database server");
199 case G_OPT_DB_COLUMN:
201 Opt->type = TYPE_STRING;
202 Opt->key_desc =
"name";
205 Opt->description = _(
"Name of attribute column");
206 Opt->gisprompt =
"old,dbcolumn,dbcolumn";
208 case G_OPT_DB_COLUMNS:
209 Opt->key =
"columns";
210 Opt->type = TYPE_STRING;
211 Opt->key_desc =
"name";
214 Opt->description = _(
"Name of attribute column(s)");
215 Opt->gisprompt =
"old,dbcolumn,dbcolumn";
217 case G_OPT_DB_KEYCOLUMN:
219 Opt->type = TYPE_STRING;
220 Opt->key_desc =
"name";
223 Opt->label = _(
"Name of key column");
224 Opt->description = _(
"Must refer to an integer column");
226 Opt->answer = GV_KEY_COLUMN;
232 Opt->type = TYPE_STRING;
233 Opt->key_desc =
"name";
235 Opt->gisprompt =
"old,group,group";
236 Opt->description = _(
"Name of input imagery group");
238 case G_OPT_I_SUBGROUP:
239 Opt->key =
"subgroup";
240 Opt->type = TYPE_STRING;
241 Opt->key_desc =
"name";
243 Opt->gisprompt =
"old,subgroup,subgroup";
244 Opt->description = _(
"Name of input imagery subgroup");
250 Opt->type = TYPE_STRING;
251 Opt->key_desc =
"name";
253 Opt->gisprompt =
"old,cell,raster";
254 Opt->description = _(
"Name of input raster map");
258 Opt->type = TYPE_STRING;
259 Opt->key_desc =
"name";
262 Opt->gisprompt =
"old,cell,raster";
263 Opt->description = _(
"Name of input raster map(s)");
267 Opt->type = TYPE_STRING;
268 Opt->key_desc =
"name";
270 Opt->gisprompt =
"new,cell,raster";
271 Opt->description = _(
"Name for output raster map");
273 case G_OPT_R_OUTPUTS:
275 Opt->type = TYPE_STRING;
276 Opt->key_desc =
"name";
279 Opt->gisprompt =
"new,cell,raster";
280 Opt->description = _(
"Name for output raster map(s)");
284 Opt->type = TYPE_STRING;
285 Opt->key_desc =
"name";
287 Opt->gisprompt =
"old,cell,raster";
288 Opt->description = _(
"Name of raster map");
292 Opt->type = TYPE_STRING;
293 Opt->key_desc =
"name";
296 Opt->gisprompt =
"old,cell,raster";
297 Opt->description = _(
"Name of raster map(s)");
301 Opt->type = TYPE_STRING;
302 Opt->key_desc =
"name";
304 Opt->gisprompt =
"old,cell,raster";
305 Opt->description = _(
"Name of base raster map");
309 Opt->type = TYPE_STRING;
310 Opt->key_desc =
"name";
312 Opt->gisprompt =
"old,cell,raster";
313 Opt->description = _(
"Name of cover raster map");
316 Opt->key =
"elevation";
317 Opt->type = TYPE_STRING;
318 Opt->key_desc =
"name";
320 Opt->gisprompt =
"old,cell,raster";
321 Opt->description = _(
"Name of input elevation raster map");
324 Opt->key =
"elevation";
325 Opt->type = TYPE_STRING;
326 Opt->key_desc =
"name";
329 Opt->gisprompt =
"old,cell,raster";
330 Opt->description = _(
"Name of input elevation raster map(s)");
334 Opt->type = TYPE_STRING;
337 Opt->label = _(
"Type of raster map to be created");
338 Opt->description = _(
"Storage type for resultant raster map");
339 Opt->options =
"CELL,FCELL,DCELL";
341 "CELL;%s;FCELL;%s;DCELL;%s",
343 _(
"Single precision floating point"),
344 _(
"Double precision floating point"));
346 case G_OPT_R_INTERP_TYPE:
348 Opt->type = TYPE_STRING;
350 Opt->description = _(
"Sampling interpolation method");
351 Opt->options =
"nearest,bilinear,bicubic";
353 "nearest;%s;bilinear;%s;bicubic;%s",
354 _(
"Nearest-neighbor interpolation"),
355 _(
"Bilinear interpolation"),
356 _(
"Bicubic interpolation"));
358 case G_OPT_R_BASENAME_INPUT:
360 Opt->type = TYPE_STRING;
361 Opt->key_desc =
"basename";
364 Opt->gisprompt =
"old,cell,raster";
365 Opt->description = _(
"Name of input basename raster map(s)");
367 case G_OPT_R_BASENAME_OUTPUT:
369 Opt->type = TYPE_STRING;
370 Opt->key_desc =
"basename";
373 Opt->gisprompt =
"new,cell,raster";
374 Opt->description = _(
"Name for output basename raster map(s)");
380 Opt->type = TYPE_STRING;
381 Opt->key_desc =
"name";
383 Opt->gisprompt =
"old,grid3,raster_3d";
384 Opt->description = _(
"Name of input 3D raster map");
386 case G_OPT_R3_INPUTS:
388 Opt->type = TYPE_STRING;
389 Opt->key_desc =
"name";
392 Opt->gisprompt =
"old,grid3,raster_3d";
393 Opt->description = _(
"Name of input 3D raster map(s)");
395 case G_OPT_R3_OUTPUT:
397 Opt->type = TYPE_STRING;
398 Opt->key_desc =
"name";
400 Opt->gisprompt =
"new,grid3,raster_3d";
401 Opt->description = _(
"Name for output 3D raster map");
405 Opt->type = TYPE_STRING;
406 Opt->key_desc =
"name";
408 Opt->gisprompt =
"old,grid3,raster_3d";
409 Opt->description = _(
"Name of 3D raster map");
413 Opt->type = TYPE_STRING;
414 Opt->key_desc =
"name";
417 Opt->gisprompt =
"old,grid3,raster_3d";
418 Opt->description = _(
"Name of 3D raster map(s)");
422 Opt->type = TYPE_STRING;
425 Opt->answer =
"default";
426 Opt->options =
"default,double,float";
427 Opt->description = _(
"Data type used in the output raster3d map");
429 case G_OPT_R3_PRECISION:
430 Opt->key =
"precision";
431 Opt->type = TYPE_STRING;
434 Opt->answer =
"default";
436 _(
"Number of digits used as mantissa in the internal map storage, 0 -23 for float, 0 - 52 for double, max or default");
438 case G_OPT_R3_COMPRESSION:
439 Opt->key =
"compression";
440 Opt->type = TYPE_STRING;
443 Opt->answer =
"default";
444 Opt->options =
"default,zip,none";
446 _(
"The compression method used in the output raster3d map");
448 case G_OPT_R3_TILE_DIMENSION:
449 Opt->key =
"tiledimension";
450 Opt->type = TYPE_STRING;
453 Opt->key_desc =
"XxYxZ";
454 Opt->answer =
"default";
456 _(
"The dimensions of the tiles used in the output raster3d map (XxYxZ or default: 16x16x8)");
462 Opt->type = TYPE_STRING;
463 Opt->key_desc =
"name";
465 Opt->gisprompt =
"old,vector,vector";
466 Opt->label = _(
"Name of input vector map");
467 Opt->description = _(
"Or data source for direct OGR access");
471 Opt->type = TYPE_STRING;
472 Opt->key_desc =
"name";
475 Opt->gisprompt =
"old,vector,vector";
476 Opt->label = _(
"Name of input vector map(s)");
477 Opt->description = _(
"Or data source(s) for direct OGR access");
481 Opt->type = TYPE_STRING;
482 Opt->key_desc =
"name";
484 Opt->gisprompt =
"new,vector,vector";
485 Opt->description = _(
"Name for output vector map");
489 Opt->type = TYPE_STRING;
490 Opt->key_desc =
"name";
492 Opt->gisprompt =
"old,vector,vector";
493 Opt->label = _(
"Name of vector map");
494 Opt->description = _(
"Or data source for direct OGR access");
498 Opt->type = TYPE_STRING;
499 Opt->key_desc =
"name";
502 Opt->gisprompt =
"old,vector,vector";
503 Opt->description = _(
"Name of vector map(s)");
507 Opt->type = TYPE_STRING;
510 Opt->answer =
"point,line,boundary,centroid,area";
511 Opt->options =
"point,line,boundary,centroid,area";
512 Opt->description = _(
"Input feature type");
516 Opt->type = TYPE_STRING;
519 Opt->answer =
"point,line,boundary,centroid,area,face,kernel";
520 Opt->options =
"point,line,boundary,centroid,area,face,kernel";
521 Opt->description = _(
"Input feature type");
525 Opt->type = TYPE_STRING;
528 Opt->label = _(
"Layer number or name");
530 _(
"Vector features can have category values in different layers."
531 " This number determines which layer to use. "
532 "When used with direct OGR access this is the layer name.");
533 Opt->gisprompt =
"old,layer,layer";
535 case G_OPT_V_FIELD_ALL:
537 Opt->type = TYPE_STRING;
540 Opt->label = _(
"Layer number or name ('-1' for all layers)");
542 _(
"A single vector map can be connected to multiple database "
543 "tables. This number determines which table to use. "
544 "When used with direct OGR access this is the layer name.");
545 Opt->gisprompt =
"old,layer_all,layer";
549 Opt->type = TYPE_INTEGER;
551 Opt->description = _(
"Category value");
552 Opt->gisprompt =
"old,cat,cats";
556 Opt->type = TYPE_STRING;
557 Opt->key_desc =
"range";
559 Opt->label = _(
"Category values");
560 Opt->description = _(
"Example: 1,3,7-9,13");
561 Opt->gisprompt =
"old,cats,cats";
565 Opt->type = TYPE_INTEGER;
567 Opt->description = _(
"Feature id");
571 Opt->type = TYPE_STRING;
572 Opt->key_desc =
"range";
574 Opt->label = _(
"Feature ids");
575 Opt->description = _(
"Example: 1,3,7-9,13");
581 Opt->type = TYPE_STRING;
582 Opt->key_desc =
"name";
584 Opt->gisprompt =
"old,file,file";
585 Opt->description = _(
"Name of input file");
587 case G_OPT_F_BIN_INPUT:
589 Opt->type = TYPE_STRING;
590 Opt->key_desc =
"name";
592 Opt->gisprompt =
"old,bin,file";
593 Opt->description = _(
"Name of input file");
597 Opt->type = TYPE_STRING;
598 Opt->key_desc =
"name";
600 Opt->gisprompt =
"new,file,file";
601 Opt->description = _(
"Name for output file");
604 Opt->key =
"separator";
605 Opt->type = TYPE_STRING;
606 Opt->key_desc =
"character";
608 Opt->gisprompt =
"old,separator,separator";
609 Opt->answer =
"pipe";
610 Opt->label = _(
"Field separator");
611 Opt->description = _(
"Special characters: pipe, comma, space, tab, newline");
617 Opt->type = TYPE_STRING;
618 Opt->key_desc =
"name";
620 Opt->answer = DEFAULT_FG_COLOR;
621 Opt->gisprompt =
"old,color,color";
622 Opt->label = _(
"Color");
624 _(
"Either a standard color name or R:G:B triplet");
628 Opt->type = TYPE_STRING;
629 Opt->key_desc =
"name";
631 Opt->answer = DEFAULT_FG_COLOR;
632 Opt->gisprompt =
"old,color_none,color";
633 Opt->label = _(
"Color");
635 _(
"Either a standard color name, R:G:B triplet, or \"none\"");
642 Opt->type = TYPE_STRING;
643 Opt->key_desc =
"name";
645 Opt->gisprompt =
"old,dir,dir";
646 Opt->description = _(
"Name of input directory");
651 Opt->type = TYPE_STRING;
655 "miles,feet,meters,kilometers,acres,hectares";
656 Opt->description = _(
"Units");
659 case G_OPT_M_DATATYPE:
661 Opt->key_desc =
"datatype";
662 Opt->type = TYPE_STRING;
665 Opt->description = _(
"Data type(s)");
670 Opt->type = TYPE_STRING;
673 Opt->key_desc =
"name";
674 Opt->gisprompt =
"old,mapset,mapset";
675 Opt->label = _(
"Name of mapset (default: current search path)");
676 Opt->description = _(
"'.' for current mapset");
679 case G_OPT_M_LOCATION:
680 Opt->key =
"location";
681 Opt->type = TYPE_STRING;
684 Opt->label = _(
"Location name");
685 Opt->description = _(
"Location name (not location path)");
686 Opt->gisprompt =
"old,location,location";
687 Opt->key_desc =
"name";
692 Opt->type = TYPE_STRING;
695 Opt->label = _(
"GRASS GIS database directory");
696 Opt->description = _(
"Default: path to the current GRASS GIS database");
697 Opt->gisprompt =
"old,dbase,dbase";
698 Opt->key_desc =
"path";
702 Opt->key =
"coordinates";
703 Opt->type = TYPE_DOUBLE;
706 Opt->key_desc =
"east,north";
707 Opt->gisprompt =
"old,coords,coords";
708 Opt->description = _(
"Coordinates");
713 Opt->key_desc =
"style";
714 Opt->type = TYPE_STRING;
717 Opt->description = _(
"Name of color table");
719 Opt->gisprompt =
"old,colortable,colortable";
722 case G_OPT_M_NULL_VALUE:
723 Opt->key =
"null_value";
724 Opt->key_desc =
"string";
725 Opt->type = TYPE_STRING;
728 Opt->description = _(
"String representing NULL value");
733 Opt->type = TYPE_STRING;
734 Opt->key_desc =
"name";
736 Opt->gisprompt =
"old,windows,region";
737 Opt->description = _(
"Name of saved region");
741 case G_OPT_STDS_INPUT:
743 Opt->type = TYPE_STRING;
744 Opt->key_desc =
"name";
746 Opt->gisprompt =
"old,stds,stds";
747 Opt->description = _(
"Name of the input space time dataset");
749 case G_OPT_STDS_INPUTS:
751 Opt->type = TYPE_STRING;
752 Opt->key_desc =
"name";
755 Opt->gisprompt =
"old,stds,stds";
756 Opt->description = _(
"Name of the input space time datasets");
758 case G_OPT_STDS_OUTPUT:
760 Opt->type = TYPE_STRING;
761 Opt->key_desc =
"name";
763 Opt->gisprompt =
"new,stds,stds";
764 Opt->description = _(
"Name of the output space time dataset");
766 case G_OPT_STRDS_INPUT:
768 Opt->type = TYPE_STRING;
769 Opt->key_desc =
"name";
771 Opt->gisprompt =
"old,strds,strds";
772 Opt->description = _(
"Name of the input space time raster dataset");
774 case G_OPT_STRDS_INPUTS:
776 Opt->type = TYPE_STRING;
777 Opt->key_desc =
"name";
780 Opt->gisprompt =
"old,strds,strds";
781 Opt->description = _(
"Name of the input space time raster datasets");
783 case G_OPT_STRDS_OUTPUT:
785 Opt->type = TYPE_STRING;
786 Opt->key_desc =
"name";
788 Opt->gisprompt =
"new,strds,strds";
789 Opt->description = _(
"Name of the output space time raster dataset");
791 case G_OPT_STRDS_OUTPUTS:
792 Opt->key =
"outputs";
793 Opt->type = TYPE_STRING;
794 Opt->key_desc =
"name";
797 Opt->gisprompt =
"new,strds,strds";
798 Opt->description = _(
"Name of the output space time raster datasets");
800 case G_OPT_STVDS_INPUT:
802 Opt->type = TYPE_STRING;
803 Opt->key_desc =
"name";
805 Opt->gisprompt =
"old,stvds,stvds";
806 Opt->description = _(
"Name of the input space time vector dataset");
808 case G_OPT_STVDS_INPUTS:
810 Opt->type = TYPE_STRING;
811 Opt->key_desc =
"name";
814 Opt->gisprompt =
"old,stvds,stvds";
815 Opt->description = _(
"Name of the input space time vector datasets");
817 case G_OPT_STVDS_OUTPUT:
819 Opt->type = TYPE_STRING;
820 Opt->key_desc =
"name";
822 Opt->gisprompt =
"new,stvds,stvds";
823 Opt->description = _(
"Name of the output space time vector dataset");
825 case G_OPT_STR3DS_INPUT:
827 Opt->type = TYPE_STRING;
828 Opt->key_desc =
"name";
830 Opt->gisprompt =
"old,str3ds,str3ds";
831 Opt->description = _(
"Name of the input space time raster3d dataset");
833 case G_OPT_STR3DS_INPUTS:
835 Opt->type = TYPE_STRING;
836 Opt->key_desc =
"name";
839 Opt->gisprompt =
"old,str3ds,str3ds";
840 Opt->description = _(
"Name of the input space time raster3d datasets");
842 case G_OPT_STR3DS_OUTPUT:
844 Opt->type = TYPE_STRING;
845 Opt->key_desc =
"name";
847 Opt->gisprompt =
"new,str3ds,str3ds";
848 Opt->description = _(
"Name of the output space time raster3d dataset");
850 case G_OPT_STDS_TYPE:
852 Opt->type = TYPE_STRING;
853 Opt->key_desc =
"name";
855 Opt->answer =
"strds";
856 Opt->options =
"strds,stvds,str3ds";
857 Opt->description = _(
"Type of the input space time dataset");
859 case G_OPT_MAP_INPUT:
861 Opt->type = TYPE_STRING;
862 Opt->key_desc =
"name";
864 Opt->gisprompt =
"old,map,map";
865 Opt->description = _(
"Name of the input map");
867 case G_OPT_MAP_INPUTS:
869 Opt->type = TYPE_STRING;
870 Opt->key_desc =
"name";
873 Opt->gisprompt =
"old,map,map";
874 Opt->description = _(
"Name of the input maps");
878 Opt->type = TYPE_STRING;
879 Opt->key_desc =
"name";
881 Opt->answer =
"raster";
882 Opt->options =
"raster,vector,raster_3d";
883 Opt->description = _(
"Type of the input map");
886 Opt->key =
"temporaltype";
887 Opt->type = TYPE_STRING;
888 Opt->key_desc =
"name";
890 Opt->answer =
"absolute";
891 Opt->options =
"absolute,relative";
892 Opt->description = _(
"The temporal type of the space time dataset");
896 Opt->type = TYPE_STRING;
897 Opt->key_desc =
"sql_query";
899 Opt->label = _(
"WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework");
900 Opt->description = _(
"Example: start_time > '2001-01-01 12:30:00'");
903 Opt->key =
"sampling";
904 Opt->type = TYPE_STRING;
905 Opt->key_desc =
"name";
908 Opt->answer =
"start";
909 Opt->options =
"start,during,overlap,contain,equal,follows,precedes";
910 Opt->description = _(
"The method to be used for sampling the input dataset");
944 Flg->description = _(
"Do not create attribute table");
948 Flg->label = _(
"Do not build topology");
949 Flg->description = _(
"Advantageous when handling a large number of points");
struct Flag * G_define_flag(void)
Initializes a Flag struct.
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.
struct Flag * G_define_standard_flag(int flag)
Create standardised Flag structure.