17#include <grass/glocale.h>
19#include "parser_local_proto.h"
149 Opt->type = TYPE_STRING;
150 Opt->key_desc =
"sql_query";
152 Opt->label = _(
"SQL SELECT statement");
154 _(
"Example: select * from towns where population > 10000");
158 Opt->type = TYPE_STRING;
159 Opt->gisprompt =
"old,sql_query,sql_query";
160 Opt->key_desc =
"sql_query";
163 _(
"WHERE conditions of SQL statement without 'where' keyword");
164 Opt->description = _(
"Example: income < 1000 and population >= 10000");
168 Opt->type = TYPE_STRING;
169 Opt->key_desc =
"name";
172 Opt->description = _(
"Name of attribute table");
173 Opt->gisprompt =
"old,dbtable,dbtable";
175 case G_OPT_DB_DRIVER:
177 Opt->type = TYPE_STRING;
178 Opt->key_desc =
"name";
181 Opt->description = _(
"Name of database driver");
182 Opt->gisprompt =
"old,dbdriver,dbdriver";
184 case G_OPT_DB_DATABASE:
185 Opt->key =
"database";
186 Opt->type = TYPE_STRING;
187 Opt->key_desc =
"name";
190 Opt->description = _(
"Name of database");
191 Opt->gisprompt =
"old,dbname,dbname";
193 case G_OPT_DB_SCHEMA:
195 Opt->type = TYPE_STRING;
196 Opt->key_desc =
"name";
199 Opt->label = _(
"Database schema");
200 Opt->description = _(
"Do not use this option if schemas "
201 "are not supported by driver/database server");
203 case G_OPT_DB_COLUMN:
205 Opt->type = TYPE_STRING;
206 Opt->key_desc =
"name";
209 Opt->description = _(
"Name of attribute column");
210 Opt->gisprompt =
"old,dbcolumn,dbcolumn";
212 case G_OPT_DB_COLUMNS:
213 Opt->key =
"columns";
214 Opt->type = TYPE_STRING;
215 Opt->key_desc =
"name";
218 Opt->description = _(
"Name of attribute column(s)");
219 Opt->gisprompt =
"old,dbcolumn,dbcolumn";
221 case G_OPT_DB_KEYCOLUMN:
223 Opt->type = TYPE_STRING;
224 Opt->key_desc =
"name";
227 Opt->label = _(
"Name of key column");
228 Opt->description = _(
"Must refer to an integer column");
230 Opt->answer = GV_KEY_COLUMN;
236 Opt->type = TYPE_STRING;
237 Opt->key_desc =
"name";
239 Opt->gisprompt =
"old,group,group";
240 Opt->description = _(
"Name of input imagery group");
242 case G_OPT_I_SUBGROUP:
243 Opt->key =
"subgroup";
244 Opt->type = TYPE_STRING;
245 Opt->key_desc =
"name";
247 Opt->gisprompt =
"old,subgroup,subgroup";
248 Opt->description = _(
"Name of input imagery subgroup");
254 Opt->type = TYPE_INTEGER;
255 Opt->key_desc =
"memory in MB";
262 if (memstr && *memstr)
263 Opt->answer = memstr;
265 Opt->label = _(
"Maximum memory to be used (in MB)");
266 Opt->description = _(
"Cache size for raster rows");
270 Opt->type = TYPE_STRING;
271 Opt->key_desc =
"name";
273 Opt->gisprompt =
"old,cell,raster";
274 Opt->description = _(
"Name of input raster map");
278 Opt->type = TYPE_STRING;
279 Opt->key_desc =
"name";
282 Opt->gisprompt =
"old,cell,raster";
283 Opt->description = _(
"Name of input raster map(s)");
287 Opt->type = TYPE_STRING;
288 Opt->key_desc =
"name";
290 Opt->gisprompt =
"new,cell,raster";
291 Opt->description = _(
"Name for output raster map");
293 case G_OPT_R_OUTPUTS:
295 Opt->type = TYPE_STRING;
296 Opt->key_desc =
"name";
299 Opt->gisprompt =
"new,cell,raster";
300 Opt->description = _(
"Name for output raster map(s)");
304 Opt->type = TYPE_STRING;
305 Opt->key_desc =
"name";
307 Opt->gisprompt =
"old,cell,raster";
308 Opt->description = _(
"Name of raster map");
312 Opt->type = TYPE_STRING;
313 Opt->key_desc =
"name";
316 Opt->gisprompt =
"old,cell,raster";
317 Opt->description = _(
"Name of raster map(s)");
321 Opt->type = TYPE_STRING;
322 Opt->key_desc =
"name";
324 Opt->gisprompt =
"old,cell,raster";
325 Opt->description = _(
"Name of base raster map");
329 Opt->type = TYPE_STRING;
330 Opt->key_desc =
"name";
332 Opt->gisprompt =
"old,cell,raster";
333 Opt->description = _(
"Name of cover raster map");
336 Opt->key =
"elevation";
337 Opt->type = TYPE_STRING;
338 Opt->key_desc =
"name";
340 Opt->gisprompt =
"old,cell,raster";
341 Opt->description = _(
"Name of input elevation raster map");
344 Opt->key =
"elevation";
345 Opt->type = TYPE_STRING;
346 Opt->key_desc =
"name";
349 Opt->gisprompt =
"old,cell,raster";
350 Opt->description = _(
"Name of input elevation raster map(s)");
354 Opt->type = TYPE_STRING;
357 Opt->label = _(
"Type of raster map to be created");
358 Opt->description = _(
"Storage type for resultant raster map");
359 Opt->options =
"CELL,FCELL,DCELL";
360 G_asprintf((
char **)&(Opt->descriptions),
"CELL;%s;FCELL;%s;DCELL;%s",
361 _(
"Integer"), _(
"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"), _(
"Bicubic interpolation"));
375 case G_OPT_R_BASENAME_INPUT:
377 Opt->type = TYPE_STRING;
378 Opt->key_desc =
"basename";
381 Opt->gisprompt =
"old,cell,raster";
382 Opt->description = _(
"Name of input basename raster map(s)");
384 case G_OPT_R_BASENAME_OUTPUT:
386 Opt->type = TYPE_STRING;
387 Opt->key_desc =
"basename";
390 Opt->gisprompt =
"new,cell,raster";
391 Opt->description = _(
"Name for output basename raster map(s)");
397 Opt->type = TYPE_STRING;
398 Opt->key_desc =
"name";
400 Opt->gisprompt =
"old,grid3,raster_3d";
401 Opt->description = _(
"Name of input 3D raster map");
403 case G_OPT_R3_INPUTS:
405 Opt->type = TYPE_STRING;
406 Opt->key_desc =
"name";
409 Opt->gisprompt =
"old,grid3,raster_3d";
410 Opt->description = _(
"Name of input 3D raster map(s)");
412 case G_OPT_R3_OUTPUT:
414 Opt->type = TYPE_STRING;
415 Opt->key_desc =
"name";
417 Opt->gisprompt =
"new,grid3,raster_3d";
418 Opt->description = _(
"Name for output 3D raster map");
422 Opt->type = TYPE_STRING;
423 Opt->key_desc =
"name";
425 Opt->gisprompt =
"old,grid3,raster_3d";
426 Opt->description = _(
"Name of 3D raster map");
430 Opt->type = TYPE_STRING;
431 Opt->key_desc =
"name";
434 Opt->gisprompt =
"old,grid3,raster_3d";
435 Opt->description = _(
"Name of 3D raster map(s)");
439 Opt->type = TYPE_STRING;
442 Opt->answer =
"default";
443 Opt->options =
"default,double,float";
444 Opt->description = _(
"Data type used in the output raster3d map");
446 case G_OPT_R3_PRECISION:
447 Opt->key =
"precision";
448 Opt->type = TYPE_STRING;
451 Opt->answer =
"default";
453 _(
"Number of digits used as mantissa in the internal map storage, "
454 "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";
473 Opt->description = _(
"The dimensions of the tiles used in the output "
474 "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");
630 _(
"Special characters: pipe, comma, space, tab, newline");
636 Opt->type = TYPE_STRING;
637 Opt->key_desc =
"name";
639 Opt->answer = DEFAULT_FG_COLOR;
640 Opt->gisprompt =
"old,color,color";
641 Opt->label = _(
"Color");
642 Opt->description = _(
"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;
672 Opt->options =
"miles,feet,meters,kilometers,acres,hectares";
673 Opt->description = _(
"Units");
676 case G_OPT_M_DATATYPE:
678 Opt->key_desc =
"datatype";
679 Opt->type = TYPE_STRING;
682 Opt->description = _(
"Data type(s)");
687 Opt->type = TYPE_STRING;
690 Opt->key_desc =
"name";
691 Opt->gisprompt =
"old,mapset,mapset";
692 Opt->label = _(
"Name of mapset (default: current search path)");
693 Opt->description = _(
"'.' for current mapset");
696 case G_OPT_M_LOCATION:
697 Opt->key =
"project";
698 Opt->type = TYPE_STRING;
701 Opt->label = _(
"Project (location) name");
702 Opt->description = _(
"Project name (not path to project)");
703 Opt->gisprompt =
"old,location,location";
704 Opt->key_desc =
"name";
709 Opt->type = TYPE_STRING;
712 Opt->label = _(
"GRASS GIS database directory");
713 Opt->description = _(
"Default: path to the current GRASS GIS database");
714 Opt->gisprompt =
"old,dbase,dbase";
715 Opt->key_desc =
"path";
719 Opt->key =
"coordinates";
720 Opt->type = TYPE_DOUBLE;
723 Opt->key_desc =
"east,north";
724 Opt->gisprompt =
"old,coords,coords";
725 Opt->description = _(
"Coordinates");
730 Opt->key_desc =
"style";
731 Opt->type = TYPE_STRING;
734 Opt->description = _(
"Name of color table");
736 Opt->gisprompt =
"old,colortable,colortable";
739 case G_OPT_M_NULL_VALUE:
740 Opt->key =
"null_value";
741 Opt->key_desc =
"string";
742 Opt->type = TYPE_STRING;
745 Opt->description = _(
"String representing NULL value");
750 Opt->type = TYPE_STRING;
751 Opt->key_desc =
"name";
753 Opt->gisprompt =
"old,windows,region";
754 Opt->description = _(
"Name of saved region");
759 Opt->type = TYPE_INTEGER;
766 if (memstr && *memstr)
767 Opt->answer = memstr;
769 Opt->description = _(
"Number of threads for parallel computing");
773 case G_OPT_STDS_INPUT:
775 Opt->type = TYPE_STRING;
776 Opt->key_desc =
"name";
778 Opt->gisprompt =
"old,stds,stds";
779 Opt->description = _(
"Name of the input space time dataset");
781 case G_OPT_STDS_INPUTS:
783 Opt->type = TYPE_STRING;
784 Opt->key_desc =
"name";
787 Opt->gisprompt =
"old,stds,stds";
788 Opt->description = _(
"Name of the input space time datasets");
790 case G_OPT_STDS_OUTPUT:
792 Opt->type = TYPE_STRING;
793 Opt->key_desc =
"name";
795 Opt->gisprompt =
"new,stds,stds";
796 Opt->description = _(
"Name of the output space time dataset");
798 case G_OPT_STRDS_INPUT:
800 Opt->type = TYPE_STRING;
801 Opt->key_desc =
"name";
803 Opt->gisprompt =
"old,strds,strds";
804 Opt->description = _(
"Name of the input space time raster dataset");
806 case G_OPT_STRDS_INPUTS:
808 Opt->type = TYPE_STRING;
809 Opt->key_desc =
"name";
812 Opt->gisprompt =
"old,strds,strds";
813 Opt->description = _(
"Name of the input space time raster datasets");
815 case G_OPT_STRDS_OUTPUT:
817 Opt->type = TYPE_STRING;
818 Opt->key_desc =
"name";
820 Opt->gisprompt =
"new,strds,strds";
821 Opt->description = _(
"Name of the output space time raster dataset");
823 case G_OPT_STRDS_OUTPUTS:
824 Opt->key =
"outputs";
825 Opt->type = TYPE_STRING;
826 Opt->key_desc =
"name";
829 Opt->gisprompt =
"new,strds,strds";
830 Opt->description = _(
"Name of the output space time raster datasets");
832 case G_OPT_STVDS_INPUT:
834 Opt->type = TYPE_STRING;
835 Opt->key_desc =
"name";
837 Opt->gisprompt =
"old,stvds,stvds";
838 Opt->description = _(
"Name of the input space time vector dataset");
840 case G_OPT_STVDS_INPUTS:
842 Opt->type = TYPE_STRING;
843 Opt->key_desc =
"name";
846 Opt->gisprompt =
"old,stvds,stvds";
847 Opt->description = _(
"Name of the input space time vector datasets");
849 case G_OPT_STVDS_OUTPUT:
851 Opt->type = TYPE_STRING;
852 Opt->key_desc =
"name";
854 Opt->gisprompt =
"new,stvds,stvds";
855 Opt->description = _(
"Name of the output space time vector dataset");
857 case G_OPT_STR3DS_INPUT:
859 Opt->type = TYPE_STRING;
860 Opt->key_desc =
"name";
862 Opt->gisprompt =
"old,str3ds,str3ds";
863 Opt->description = _(
"Name of the input space time raster3d dataset");
865 case G_OPT_STR3DS_INPUTS:
867 Opt->type = TYPE_STRING;
868 Opt->key_desc =
"name";
871 Opt->gisprompt =
"old,str3ds,str3ds";
872 Opt->description = _(
"Name of the input space time raster3d datasets");
874 case G_OPT_STR3DS_OUTPUT:
876 Opt->type = TYPE_STRING;
877 Opt->key_desc =
"name";
879 Opt->gisprompt =
"new,str3ds,str3ds";
880 Opt->description = _(
"Name of the output space time raster3d dataset");
882 case G_OPT_STDS_TYPE:
884 Opt->type = TYPE_STRING;
885 Opt->key_desc =
"name";
887 Opt->answer =
"strds";
888 Opt->options =
"strds,stvds,str3ds";
889 Opt->description = _(
"Type of the input space time dataset");
891 case G_OPT_MAP_INPUT:
893 Opt->type = TYPE_STRING;
894 Opt->key_desc =
"name";
896 Opt->gisprompt =
"old,map,map";
897 Opt->description = _(
"Name of the input map");
899 case G_OPT_MAP_INPUTS:
901 Opt->type = TYPE_STRING;
902 Opt->key_desc =
"name";
905 Opt->gisprompt =
"old,map,map";
906 Opt->description = _(
"Name of the input maps");
910 Opt->type = TYPE_STRING;
911 Opt->key_desc =
"name";
913 Opt->answer =
"raster";
914 Opt->options =
"raster,vector,raster_3d";
915 Opt->description = _(
"Type of the input map");
918 Opt->key =
"temporaltype";
919 Opt->type = TYPE_STRING;
920 Opt->key_desc =
"name";
922 Opt->answer =
"absolute";
923 Opt->options =
"absolute,relative";
924 Opt->description = _(
"The temporal type of the space time dataset");
928 Opt->type = TYPE_STRING;
929 Opt->key_desc =
"sql_query";
931 Opt->label = _(
"WHERE conditions of SQL statement without 'where' "
932 "keyword used in the temporal GIS framework");
933 Opt->description = _(
"Example: start_time > '2001-01-01 12:30:00'");
936 Opt->key =
"sampling";
937 Opt->type = TYPE_STRING;
938 Opt->key_desc =
"name";
941 Opt->answer =
"start";
942 Opt->options =
"start,during,overlap,contain,equal,follows,precedes";
944 _(
"The method to be used for sampling the input dataset");
948 Opt->type = TYPE_STRING;
949 Opt->key_desc =
"name";
951 Opt->label = _(
"Output format");
952 Opt->answer =
"plain";
953 Opt->options =
"plain,json";
954 Opt->descriptions = _(
"plain;Plain text output;"
955 "json;JSON (JavaScript Object Notation);");
989 Flg->description = _(
"Do not create attribute table");
993 Flg->label = _(
"Do not build topology");
995 _(
"Advantageous when handling a large number of points");
int G_asprintf(char **out, const char *fmt,...)
char * G_color_rules_description_type(void)
Get color rules description for Option->descriptions.
char * G_color_rules_options(void)
Get list of color rules for Option->options.
const char * G_getenv_nofatal(const char *name)
Get environment variable.
struct Flag * G_define_flag(void)
Initializes a Flag struct.
struct Option * G_define_option(void)
Initializes an Option struct.
struct Option * G_define_standard_option(int opt)
Create standardised Option structure.
struct Flag * G_define_standard_flag(int flag)
Create standardised Flag structure.
char * G_store(const char *s)
Copy string to allocated memory.