16 #include <grass/gis.h> 17 #include <grass/glocale.h> 19 #include "parser_local_proto.h" 144 Opt->type = TYPE_STRING;
145 Opt->key_desc =
"sql_query";
147 Opt->label = _(
"SQL SELECT statement");
149 _(
"Example: select * from towns where population > 10000");
153 Opt->type = TYPE_STRING;
154 Opt->gisprompt =
"old,sql_query,sql_query";
155 Opt->key_desc =
"sql_query";
157 Opt->label = _(
"WHERE conditions of SQL statement without 'where' keyword");
158 Opt->description = _(
"Example: income < 1000 and population >= 10000");
162 Opt->type = TYPE_STRING;
163 Opt->key_desc =
"name";
166 Opt->description = _(
"Name of attribute table");
167 Opt->gisprompt =
"old,dbtable,dbtable";
169 case G_OPT_DB_DRIVER:
171 Opt->type = TYPE_STRING;
172 Opt->key_desc =
"name";
175 Opt->description = _(
"Name of database driver");
176 Opt->gisprompt =
"old,dbdriver,dbdriver";
178 case G_OPT_DB_DATABASE:
179 Opt->key =
"database";
180 Opt->type = TYPE_STRING;
181 Opt->key_desc =
"name";
184 Opt->description = _(
"Name of database");
185 Opt->gisprompt =
"old,dbname,dbname";
187 case G_OPT_DB_SCHEMA:
189 Opt->type = TYPE_STRING;
190 Opt->key_desc =
"name";
193 Opt->label = _(
"Database schema");
194 Opt->description = _(
"Do not use this option if schemas " 195 "are not supported by driver/database server");
197 case G_OPT_DB_COLUMN:
199 Opt->type = TYPE_STRING;
200 Opt->key_desc =
"name";
203 Opt->description = _(
"Name of attribute column");
204 Opt->gisprompt =
"old,dbcolumn,dbcolumn";
206 case G_OPT_DB_COLUMNS:
207 Opt->key =
"columns";
208 Opt->type = TYPE_STRING;
209 Opt->key_desc =
"name";
212 Opt->description = _(
"Name of attribute column(s)");
213 Opt->gisprompt =
"old,dbcolumn,dbcolumn";
215 case G_OPT_DB_KEYCOLUMN:
217 Opt->type = TYPE_STRING;
218 Opt->key_desc =
"name";
221 Opt->label = _(
"Name of key column");
222 Opt->description = _(
"Must refer to an integer column");
224 Opt->answer = GV_KEY_COLUMN;
230 Opt->type = TYPE_STRING;
231 Opt->key_desc =
"name";
233 Opt->gisprompt =
"old,group,group";
234 Opt->description = _(
"Name of input imagery group");
236 case G_OPT_I_SUBGROUP:
237 Opt->key =
"subgroup";
238 Opt->type = TYPE_STRING;
239 Opt->key_desc =
"name";
241 Opt->gisprompt =
"old,subgroup,subgroup";
242 Opt->description = _(
"Name of input imagery subgroup");
248 Opt->type = TYPE_STRING;
249 Opt->key_desc =
"name";
251 Opt->gisprompt =
"old,cell,raster";
252 Opt->description = _(
"Name of input raster map");
256 Opt->type = TYPE_STRING;
257 Opt->key_desc =
"name";
260 Opt->gisprompt =
"old,cell,raster";
261 Opt->description = _(
"Name of input raster map(s)");
265 Opt->type = TYPE_STRING;
266 Opt->key_desc =
"name";
268 Opt->gisprompt =
"new,cell,raster";
269 Opt->description = _(
"Name for output raster map");
271 case G_OPT_R_OUTPUTS:
273 Opt->type = TYPE_STRING;
274 Opt->key_desc =
"name";
277 Opt->gisprompt =
"new,cell,raster";
278 Opt->description = _(
"Name for output raster map(s)");
282 Opt->type = TYPE_STRING;
283 Opt->key_desc =
"name";
285 Opt->gisprompt =
"old,cell,raster";
286 Opt->description = _(
"Name of raster map");
290 Opt->type = TYPE_STRING;
291 Opt->key_desc =
"name";
294 Opt->gisprompt =
"old,cell,raster";
295 Opt->description = _(
"Name of raster map(s)");
299 Opt->type = TYPE_STRING;
300 Opt->key_desc =
"name";
302 Opt->gisprompt =
"old,cell,raster";
303 Opt->description = _(
"Name of base raster map");
307 Opt->type = TYPE_STRING;
308 Opt->key_desc =
"name";
310 Opt->gisprompt =
"old,cell,raster";
311 Opt->description = _(
"Name of cover raster map");
314 Opt->key =
"elevation";
315 Opt->type = TYPE_STRING;
316 Opt->key_desc =
"name";
318 Opt->gisprompt =
"old,cell,raster";
319 Opt->description = _(
"Name of input elevation raster map");
322 Opt->key =
"elevation";
323 Opt->type = TYPE_STRING;
324 Opt->key_desc =
"name";
327 Opt->gisprompt =
"old,cell,raster";
328 Opt->description = _(
"Name of input elevation raster map(s)");
332 Opt->type = TYPE_STRING;
335 Opt->label = _(
"Type of raster map to be created");
336 Opt->description = _(
"Storage type for resultant raster map");
337 Opt->options =
"CELL,FCELL,DCELL";
339 "CELL;%s;FCELL;%s;DCELL;%s",
341 _(
"Single precision floating point"),
342 _(
"Double precision floating point"));
344 case G_OPT_R_INTERP_TYPE:
346 Opt->type = TYPE_STRING;
348 Opt->description = _(
"Sampling interpolation method");
349 Opt->options =
"nearest,bilinear,bicubic";
351 "nearest;%s;bilinear;%s;bicubic;%s",
352 _(
"Nearest-neighbor interpolation"),
353 _(
"Bilinear interpolation"),
354 _(
"Bicubic interpolation"));
356 case G_OPT_R_BASENAME_INPUT:
358 Opt->type = TYPE_STRING;
359 Opt->key_desc =
"basename";
362 Opt->gisprompt =
"old,cell,raster";
363 Opt->description = _(
"Name of input basename raster map(s)");
365 case G_OPT_R_BASENAME_OUTPUT:
367 Opt->type = TYPE_STRING;
368 Opt->key_desc =
"basename";
371 Opt->gisprompt =
"new,cell,raster";
372 Opt->description = _(
"Name for output basename raster map(s)");
378 Opt->type = TYPE_STRING;
379 Opt->key_desc =
"name";
381 Opt->gisprompt =
"old,grid3,raster_3d";
382 Opt->description = _(
"Name of input 3D raster map");
384 case G_OPT_R3_INPUTS:
386 Opt->type = TYPE_STRING;
387 Opt->key_desc =
"name";
390 Opt->gisprompt =
"old,grid3,raster_3d";
391 Opt->description = _(
"Name of input 3D raster map(s)");
393 case G_OPT_R3_OUTPUT:
395 Opt->type = TYPE_STRING;
396 Opt->key_desc =
"name";
398 Opt->gisprompt =
"new,grid3,raster_3d";
399 Opt->description = _(
"Name for output 3D raster map");
403 Opt->type = TYPE_STRING;
404 Opt->key_desc =
"name";
406 Opt->gisprompt =
"old,grid3,raster_3d";
407 Opt->description = _(
"Name of 3D raster map");
411 Opt->type = TYPE_STRING;
412 Opt->key_desc =
"name";
415 Opt->gisprompt =
"old,grid3,raster_3d";
416 Opt->description = _(
"Name of 3D raster map(s)");
420 Opt->type = TYPE_STRING;
423 Opt->answer =
"default";
424 Opt->options =
"default,double,float";
425 Opt->description = _(
"Data type used in the output raster3d map");
427 case G_OPT_R3_PRECISION:
428 Opt->key =
"precision";
429 Opt->type = TYPE_STRING;
432 Opt->answer =
"default";
434 _(
"Number of digits used as mantissa in the internal map storage, 0 -23 for float, 0 - 52 for double, max or default");
436 case G_OPT_R3_COMPRESSION:
437 Opt->key =
"compression";
438 Opt->type = TYPE_STRING;
441 Opt->answer =
"default";
442 Opt->options =
"default,zip,none";
444 _(
"The compression method used in the output raster3d map");
446 case G_OPT_R3_TILE_DIMENSION:
447 Opt->key =
"tiledimension";
448 Opt->type = TYPE_STRING;
451 Opt->key_desc =
"XxYxZ";
452 Opt->answer =
"default";
454 _(
"The dimensions of the tiles used in the output raster3d map (XxYxZ or default: 16x16x8)");
460 Opt->type = TYPE_STRING;
461 Opt->key_desc =
"name";
463 Opt->gisprompt =
"old,vector,vector";
464 Opt->label = _(
"Name of input vector map");
465 Opt->description = _(
"Or data source for direct OGR access");
469 Opt->type = TYPE_STRING;
470 Opt->key_desc =
"name";
473 Opt->gisprompt =
"old,vector,vector";
474 Opt->label = _(
"Name of input vector map(s)");
475 Opt->description = _(
"Or data source(s) for direct OGR access");
479 Opt->type = TYPE_STRING;
480 Opt->key_desc =
"name";
482 Opt->gisprompt =
"new,vector,vector";
483 Opt->description = _(
"Name for output vector map");
487 Opt->type = TYPE_STRING;
488 Opt->key_desc =
"name";
490 Opt->gisprompt =
"old,vector,vector";
491 Opt->label = _(
"Name of vector map");
492 Opt->description = _(
"Or data source for direct OGR access");
496 Opt->type = TYPE_STRING;
497 Opt->key_desc =
"name";
500 Opt->gisprompt =
"old,vector,vector";
501 Opt->description = _(
"Name of vector map(s)");
505 Opt->type = TYPE_STRING;
508 Opt->answer =
"point,line,boundary,centroid,area";
509 Opt->options =
"point,line,boundary,centroid,area";
510 Opt->description = _(
"Input feature type");
514 Opt->type = TYPE_STRING;
517 Opt->answer =
"point,line,boundary,centroid,area,face,kernel";
518 Opt->options =
"point,line,boundary,centroid,area,face,kernel";
519 Opt->description = _(
"Input feature type");
523 Opt->type = TYPE_STRING;
526 Opt->label = _(
"Layer number or name");
528 _(
"Vector features can have category values in different layers." 529 " This number determines which layer to use. " 530 "When used with direct OGR access this is the layer name.");
531 Opt->gisprompt =
"old,layer,layer";
533 case G_OPT_V_FIELD_ALL:
535 Opt->type = TYPE_STRING;
538 Opt->label = _(
"Layer number or name ('-1' for all layers)");
540 _(
"A single vector map can be connected to multiple database " 541 "tables. This number determines which table to use. " 542 "When used with direct OGR access this is the layer name.");
543 Opt->gisprompt =
"old,layer_all,layer";
547 Opt->type = TYPE_INTEGER;
549 Opt->description = _(
"Category value");
550 Opt->gisprompt =
"old,cat,cats";
554 Opt->type = TYPE_STRING;
555 Opt->key_desc =
"range";
557 Opt->label = _(
"Category values");
558 Opt->description = _(
"Example: 1,3,7-9,13");
559 Opt->gisprompt =
"old,cats,cats";
563 Opt->type = TYPE_INTEGER;
565 Opt->description = _(
"Feature id");
569 Opt->type = TYPE_STRING;
570 Opt->key_desc =
"range";
572 Opt->label = _(
"Feature ids");
573 Opt->description = _(
"Example: 1,3,7-9,13");
579 Opt->type = TYPE_STRING;
580 Opt->key_desc =
"name";
582 Opt->gisprompt =
"old,file,file";
583 Opt->description = _(
"Name of input file");
585 case G_OPT_F_BIN_INPUT:
587 Opt->type = TYPE_STRING;
588 Opt->key_desc =
"name";
590 Opt->gisprompt =
"old,bin,file";
591 Opt->description = _(
"Name of input file");
595 Opt->type = TYPE_STRING;
596 Opt->key_desc =
"name";
598 Opt->gisprompt =
"new,file,file";
599 Opt->description = _(
"Name for output file");
602 Opt->key =
"separator";
603 Opt->type = TYPE_STRING;
604 Opt->key_desc =
"character";
606 Opt->gisprompt =
"old,separator,separator";
607 Opt->answer =
"pipe";
608 Opt->label = _(
"Field separator");
609 Opt->description = _(
"Special characters: pipe, comma, space, tab, newline");
615 Opt->type = TYPE_STRING;
616 Opt->key_desc =
"name";
618 Opt->answer = DEFAULT_FG_COLOR;
619 Opt->gisprompt =
"old,color,color";
620 Opt->label = _(
"Color");
622 _(
"Either a standard color name or R:G:B triplet");
626 Opt->type = TYPE_STRING;
627 Opt->key_desc =
"name";
629 Opt->answer = DEFAULT_FG_COLOR;
630 Opt->gisprompt =
"old,color_none,color";
631 Opt->label = _(
"Color");
633 _(
"Either a standard color name, R:G:B triplet, or \"none\"");
640 Opt->type = TYPE_STRING;
641 Opt->key_desc =
"name";
643 Opt->gisprompt =
"old,dir,dir";
644 Opt->description = _(
"Name of input directory");
649 Opt->type = TYPE_STRING;
653 "miles,feet,meters,kilometers,acres,hectares";
654 Opt->description = _(
"Units");
657 case G_OPT_M_DATATYPE:
659 Opt->key_desc =
"datatype";
660 Opt->type = TYPE_STRING;
663 Opt->description = _(
"Data type(s)");
668 Opt->type = TYPE_STRING;
671 Opt->key_desc =
"name";
672 Opt->gisprompt =
"old,mapset,mapset";
673 Opt->label = _(
"Name of mapset (default: current search path)");
674 Opt->description = _(
"'.' for current mapset");
677 case G_OPT_M_LOCATION:
678 Opt->key =
"location";
679 Opt->type = TYPE_STRING;
682 Opt->label = _(
"Location name");
683 Opt->description = _(
"Location name (not location path)");
684 Opt->gisprompt =
"old,location,location";
685 Opt->key_desc =
"name";
690 Opt->type = TYPE_STRING;
693 Opt->label = _(
"GRASS GIS database directory");
694 Opt->description = _(
"Default: path to the current GRASS GIS database");
695 Opt->gisprompt =
"old,dbase,dbase";
696 Opt->key_desc =
"path";
700 Opt->key =
"coordinates";
701 Opt->type = TYPE_DOUBLE;
704 Opt->key_desc =
"east,north";
705 Opt->gisprompt =
"old,coords,coords";
706 Opt->description = _(
"Coordinates");
711 Opt->key_desc =
"style";
712 Opt->type = TYPE_STRING;
715 Opt->description = _(
"Name of color table");
717 Opt->gisprompt =
"old,colortable,colortable";
720 case G_OPT_M_NULL_VALUE:
721 Opt->key =
"null_value";
722 Opt->key_desc =
"string";
723 Opt->type = TYPE_STRING;
726 Opt->description = _(
"String representing NULL value");
731 Opt->type = TYPE_STRING;
732 Opt->key_desc =
"name";
734 Opt->gisprompt =
"old,windows,region";
735 Opt->description = _(
"Name of saved region");
739 case G_OPT_STDS_INPUT:
741 Opt->type = TYPE_STRING;
742 Opt->key_desc =
"name";
744 Opt->gisprompt =
"old,stds,stds";
745 Opt->description = _(
"Name of the input space time dataset");
747 case G_OPT_STDS_INPUTS:
749 Opt->type = TYPE_STRING;
750 Opt->key_desc =
"name";
753 Opt->gisprompt =
"old,stds,stds";
754 Opt->description = _(
"Name of the input space time datasets");
756 case G_OPT_STDS_OUTPUT:
758 Opt->type = TYPE_STRING;
759 Opt->key_desc =
"name";
761 Opt->gisprompt =
"new,stds,stds";
762 Opt->description = _(
"Name of the output space time dataset");
764 case G_OPT_STRDS_INPUT:
766 Opt->type = TYPE_STRING;
767 Opt->key_desc =
"name";
769 Opt->gisprompt =
"old,strds,strds";
770 Opt->description = _(
"Name of the input space time raster dataset");
772 case G_OPT_STRDS_INPUTS:
774 Opt->type = TYPE_STRING;
775 Opt->key_desc =
"name";
778 Opt->gisprompt =
"old,strds,strds";
779 Opt->description = _(
"Name of the input space time raster datasets");
781 case G_OPT_STRDS_OUTPUT:
783 Opt->type = TYPE_STRING;
784 Opt->key_desc =
"name";
786 Opt->gisprompt =
"new,strds,strds";
787 Opt->description = _(
"Name of the output space time raster dataset");
789 case G_OPT_STVDS_INPUT:
791 Opt->type = TYPE_STRING;
792 Opt->key_desc =
"name";
794 Opt->gisprompt =
"old,stvds,stvds";
795 Opt->description = _(
"Name of the input space time vector dataset");
797 case G_OPT_STVDS_INPUTS:
799 Opt->type = TYPE_STRING;
800 Opt->key_desc =
"name";
803 Opt->gisprompt =
"old,stvds,stvds";
804 Opt->description = _(
"Name of the input space time vector datasets");
806 case G_OPT_STVDS_OUTPUT:
808 Opt->type = TYPE_STRING;
809 Opt->key_desc =
"name";
811 Opt->gisprompt =
"new,stvds,stvds";
812 Opt->description = _(
"Name of the output space time vector dataset");
814 case G_OPT_STR3DS_INPUT:
816 Opt->type = TYPE_STRING;
817 Opt->key_desc =
"name";
819 Opt->gisprompt =
"old,str3ds,str3ds";
820 Opt->description = _(
"Name of the input space time raster3d dataset");
822 case G_OPT_STR3DS_INPUTS:
824 Opt->type = TYPE_STRING;
825 Opt->key_desc =
"name";
828 Opt->gisprompt =
"old,str3ds,str3ds";
829 Opt->description = _(
"Name of the input space time raster3d datasets");
831 case G_OPT_STR3DS_OUTPUT:
833 Opt->type = TYPE_STRING;
834 Opt->key_desc =
"name";
836 Opt->gisprompt =
"new,str3ds,str3ds";
837 Opt->description = _(
"Name of the output space time raster3d dataset");
839 case G_OPT_STDS_TYPE:
841 Opt->type = TYPE_STRING;
842 Opt->key_desc =
"name";
844 Opt->answer =
"strds";
845 Opt->options =
"strds,stvds,str3ds";
846 Opt->description = _(
"Type of the input space time dataset");
848 case G_OPT_MAP_INPUT:
850 Opt->type = TYPE_STRING;
851 Opt->key_desc =
"name";
853 Opt->gisprompt =
"old,map,map";
854 Opt->description = _(
"Name of the input map");
856 case G_OPT_MAP_INPUTS:
858 Opt->type = TYPE_STRING;
859 Opt->key_desc =
"name";
862 Opt->gisprompt =
"old,map,map";
863 Opt->description = _(
"Name of the input maps");
867 Opt->type = TYPE_STRING;
868 Opt->key_desc =
"name";
870 Opt->answer =
"raster";
871 Opt->options =
"raster,vector,raster_3d";
872 Opt->description = _(
"Type of the input map");
875 Opt->key =
"temporaltype";
876 Opt->type = TYPE_STRING;
877 Opt->key_desc =
"name";
879 Opt->answer =
"absolute";
880 Opt->options =
"absolute,relative";
881 Opt->description = _(
"The temporal type of the space time dataset");
885 Opt->type = TYPE_STRING;
886 Opt->key_desc =
"sql_query";
888 Opt->label = _(
"WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework");
889 Opt->description = _(
"Example: start_time > '2001-01-01 12:30:00'");
892 Opt->key =
"sampling";
893 Opt->type = TYPE_STRING;
894 Opt->key_desc =
"name";
897 Opt->answer =
"start";
898 Opt->options =
"start,during,overlap,contain,equal,follows,precedes";
899 Opt->description = _(
"The method to be used for sampling the input dataset");
933 Flg->description = _(
"Do not create attribute table");
937 Flg->label = _(
"Do not build topology");
938 Flg->description = _(
"Advantageous when handling a large number of points");
struct Option * G_define_standard_option(int opt)
Create standardised Option structure.
int G_asprintf(char **out, const char *fmt,...)
struct Flag * G_define_standard_flag(int flag)
Create standardised Flag structure.
struct Flag * G_define_flag(void)
Initializes a Flag struct.
struct Option * G_define_option(void)
Initializes an Option struct.
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.