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 _(
"For example: 'select * from rybniky where kapri = 'hodne'");
153 Opt->type = TYPE_STRING;
154 Opt->key_desc =
"sql_query";
156 Opt->label = _(
"WHERE conditions of SQL statement without 'where' keyword");
157 Opt->description = _(
"Example: income < 1000 and inhab >= 10000");
161 Opt->type = TYPE_STRING;
162 Opt->key_desc =
"name";
165 Opt->description = _(
"Name of attribute table");
166 Opt->gisprompt =
"old,dbtable,dbtable";
168 case G_OPT_DB_DRIVER:
170 Opt->type = TYPE_STRING;
171 Opt->key_desc =
"name";
174 Opt->description = _(
"Name of database driver");
175 Opt->gisprompt =
"old,dbdriver,dbdriver";
177 case G_OPT_DB_DATABASE:
178 Opt->key =
"database";
179 Opt->type = TYPE_STRING;
180 Opt->key_desc =
"name";
183 Opt->description = _(
"Name of database");
184 Opt->gisprompt =
"old,dbname,dbname";
186 case G_OPT_DB_SCHEMA:
188 Opt->type = TYPE_STRING;
189 Opt->key_desc =
"name";
192 Opt->label = _(
"Database schema");
193 Opt->description = _(
"Do not use this option if schemas " 194 "are not supported by driver/database server");
196 case G_OPT_DB_COLUMN:
198 Opt->type = TYPE_STRING;
199 Opt->key_desc =
"name";
202 Opt->description = _(
"Name of attribute column");
203 Opt->gisprompt =
"old,dbcolumn,dbcolumn";
205 case G_OPT_DB_COLUMNS:
206 Opt->key =
"columns";
207 Opt->type = TYPE_STRING;
208 Opt->key_desc =
"name";
211 Opt->description = _(
"Name of attribute column(s)");
212 Opt->gisprompt =
"old,dbcolumn,dbcolumn";
214 case G_OPT_DB_KEYCOLUMN:
216 Opt->type = TYPE_STRING;
217 Opt->key_desc =
"name";
220 Opt->label = _(
"Name of key column");
221 Opt->description = _(
"Must refer to an integer column");
223 Opt->answer = GV_KEY_COLUMN;
229 Opt->type = TYPE_STRING;
230 Opt->key_desc =
"name";
232 Opt->gisprompt =
"old,group,group";
233 Opt->description = _(
"Name of input imagery group");
235 case G_OPT_I_SUBGROUP:
236 Opt->key =
"subgroup";
237 Opt->type = TYPE_STRING;
238 Opt->key_desc =
"name";
240 Opt->gisprompt =
"old,subgroup,subgroup";
241 Opt->description = _(
"Name of input imagery subgroup");
247 Opt->type = TYPE_STRING;
248 Opt->key_desc =
"name";
250 Opt->gisprompt =
"old,cell,raster";
251 Opt->description = _(
"Name of input raster map");
255 Opt->type = TYPE_STRING;
256 Opt->key_desc =
"name";
259 Opt->gisprompt =
"old,cell,raster";
260 Opt->description = _(
"Name of input raster map(s)");
264 Opt->type = TYPE_STRING;
265 Opt->key_desc =
"name";
267 Opt->gisprompt =
"new,cell,raster";
268 Opt->description = _(
"Name for output raster map");
270 case G_OPT_R_OUTPUTS:
272 Opt->type = TYPE_STRING;
273 Opt->key_desc =
"name";
276 Opt->gisprompt =
"new,cell,raster";
277 Opt->description = _(
"Name for output raster map(s)");
281 Opt->type = TYPE_STRING;
282 Opt->key_desc =
"name";
284 Opt->gisprompt =
"old,cell,raster";
285 Opt->description = _(
"Name of raster map");
289 Opt->type = TYPE_STRING;
290 Opt->key_desc =
"name";
293 Opt->gisprompt =
"old,cell,raster";
294 Opt->description = _(
"Name of raster map(s)");
298 Opt->type = TYPE_STRING;
299 Opt->key_desc =
"name";
301 Opt->gisprompt =
"old,cell,raster";
302 Opt->description = _(
"Name of base raster map");
306 Opt->type = TYPE_STRING;
307 Opt->key_desc =
"name";
309 Opt->gisprompt =
"old,cell,raster";
310 Opt->description = _(
"Name of cover raster map");
313 Opt->key =
"elevation";
314 Opt->type = TYPE_STRING;
315 Opt->key_desc =
"name";
317 Opt->gisprompt =
"old,cell,raster";
318 Opt->description = _(
"Name of input elevation raster map");
321 Opt->key =
"elevation";
322 Opt->type = TYPE_STRING;
323 Opt->key_desc =
"name";
326 Opt->gisprompt =
"old,cell,raster";
327 Opt->description = _(
"Name of input elevation raster map(s)");
331 Opt->type = TYPE_STRING;
334 Opt->label = _(
"Type of raster map to be created");
335 Opt->description = _(
"Storage type for resultant raster map");
336 Opt->options =
"CELL,FCELL,DCELL";
338 "CELL;%s;FCELL;%s;DCELL;%s",
340 _(
"Single precision floating point"),
341 _(
"Double precision floating point"));
343 case G_OPT_R_INTERP_TYPE:
345 Opt->type = TYPE_STRING;
347 Opt->description = _(
"Sampling interpolation method");
348 Opt->options =
"nearest,bilinear,bicubic";
350 "nearest;%s;bilinear;%s;bicubic;%s",
351 _(
"Nearest-neighbor interpolation"),
352 _(
"Bilinear interpolation"),
353 _(
"Bicubic interpolation"));
355 case G_OPT_R_BASENAME_INPUT:
357 Opt->type = TYPE_STRING;
358 Opt->key_desc =
"basename";
361 Opt->gisprompt =
"old,cell,raster";
362 Opt->description = _(
"Name of input basename raster map(s)");
364 case G_OPT_R_BASENAME_OUTPUT:
366 Opt->type = TYPE_STRING;
367 Opt->key_desc =
"basename";
370 Opt->gisprompt =
"new,cell,raster";
371 Opt->description = _(
"Name for output basename raster map(s)");
377 Opt->type = TYPE_STRING;
378 Opt->key_desc =
"name";
380 Opt->gisprompt =
"old,grid3,raster_3d";
381 Opt->description = _(
"Name of input 3D raster map");
383 case G_OPT_R3_INPUTS:
385 Opt->type = TYPE_STRING;
386 Opt->key_desc =
"name";
389 Opt->gisprompt =
"old,grid3,raster_3d";
390 Opt->description = _(
"Name of input 3D raster map(s)");
392 case G_OPT_R3_OUTPUT:
394 Opt->type = TYPE_STRING;
395 Opt->key_desc =
"name";
397 Opt->gisprompt =
"new,grid3,raster_3d";
398 Opt->description = _(
"Name for output 3D raster map");
402 Opt->type = TYPE_STRING;
403 Opt->key_desc =
"name";
405 Opt->gisprompt =
"old,grid3,raster_3d";
406 Opt->description = _(
"Name of 3D raster map");
410 Opt->type = TYPE_STRING;
411 Opt->key_desc =
"name";
414 Opt->gisprompt =
"old,grid3,raster_3d";
415 Opt->description = _(
"Name of 3D raster map(s)");
419 Opt->type = TYPE_STRING;
422 Opt->answer =
"default";
423 Opt->options =
"default,double,float";
424 Opt->description = _(
"Data type used in the output raster3d map");
426 case G_OPT_R3_PRECISION:
427 Opt->key =
"precision";
428 Opt->type = TYPE_STRING;
431 Opt->answer =
"default";
433 _(
"Number of digits used as mantissa in the internal map storage, 0 -23 for float, 0 - 52 for double, max or default");
435 case G_OPT_R3_COMPRESSION:
436 Opt->key =
"compression";
437 Opt->type = TYPE_STRING;
440 Opt->answer =
"default";
441 Opt->options =
"default,zip,none";
443 _(
"The compression method used in the output raster3d map");
445 case G_OPT_R3_TILE_DIMENSION:
446 Opt->key =
"tiledimension";
447 Opt->type = TYPE_STRING;
450 Opt->key_desc =
"XxYxZ";
451 Opt->answer =
"default";
453 _(
"The dimensions of the tiles used in the output raster3d map (XxYxZ or default: 16x16x8)");
459 Opt->type = TYPE_STRING;
460 Opt->key_desc =
"name";
462 Opt->gisprompt =
"old,vector,vector";
463 Opt->label = _(
"Name of input vector map");
464 Opt->description = _(
"Or data source for direct OGR access");
468 Opt->type = TYPE_STRING;
469 Opt->key_desc =
"name";
472 Opt->gisprompt =
"old,vector,vector";
473 Opt->label = _(
"Name of input vector map(s)");
474 Opt->description = _(
"Or data source(s) for direct OGR access");
478 Opt->type = TYPE_STRING;
479 Opt->key_desc =
"name";
481 Opt->gisprompt =
"new,vector,vector";
482 Opt->description = _(
"Name for output vector map");
486 Opt->type = TYPE_STRING;
487 Opt->key_desc =
"name";
489 Opt->gisprompt =
"old,vector,vector";
490 Opt->label = _(
"Name of vector map");
491 Opt->description = _(
"Or data source for direct OGR access");
495 Opt->type = TYPE_STRING;
496 Opt->key_desc =
"name";
499 Opt->gisprompt =
"old,vector,vector";
500 Opt->description = _(
"Name of vector map(s)");
504 Opt->type = TYPE_STRING;
507 Opt->answer =
"point,line,boundary,centroid,area";
508 Opt->options =
"point,line,boundary,centroid,area";
509 Opt->description = _(
"Input feature type");
513 Opt->type = TYPE_STRING;
516 Opt->answer =
"point,line,boundary,centroid,area,face,kernel";
517 Opt->options =
"point,line,boundary,centroid,area,face,kernel";
518 Opt->description = _(
"Input feature type");
522 Opt->type = TYPE_STRING;
525 Opt->label = _(
"Layer number or name");
527 _(
"Vector features can have category values in different layers." 528 " This number determines which layer to use. " 529 "When used with direct OGR access this is the layer name.");
530 Opt->gisprompt =
"old,layer,layer";
532 case G_OPT_V_FIELD_ALL:
534 Opt->type = TYPE_STRING;
537 Opt->label = _(
"Layer number or name ('-1' for all layers)");
539 _(
"A single vector map can be connected to multiple database " 540 "tables. This number determines which table to use. " 541 "When used with direct OGR access this is the layer name.");
542 Opt->gisprompt =
"old,layer_all,layer";
546 Opt->type = TYPE_INTEGER;
548 Opt->description = _(
"Category value");
549 Opt->gisprompt =
"old,cat,cats";
553 Opt->type = TYPE_STRING;
554 Opt->key_desc =
"range";
556 Opt->label = _(
"Category values");
557 Opt->description = _(
"Example: 1,3,7-9,13");
558 Opt->gisprompt =
"old,cats,cats";
562 Opt->type = TYPE_INTEGER;
564 Opt->description = _(
"Feature id");
568 Opt->type = TYPE_STRING;
569 Opt->key_desc =
"range";
571 Opt->label = _(
"Feature ids");
572 Opt->description = _(
"Example: 1,3,7-9,13");
578 Opt->type = TYPE_STRING;
579 Opt->key_desc =
"name";
581 Opt->gisprompt =
"old,file,file";
582 Opt->description = _(
"Name of input file");
584 case G_OPT_F_BIN_INPUT:
586 Opt->type = TYPE_STRING;
587 Opt->key_desc =
"name";
589 Opt->gisprompt =
"old,bin,file";
590 Opt->description = _(
"Name of input file");
594 Opt->type = TYPE_STRING;
595 Opt->key_desc =
"name";
597 Opt->gisprompt =
"new,file,file";
598 Opt->description = _(
"Name for output file");
601 Opt->key =
"separator";
602 Opt->type = TYPE_STRING;
603 Opt->key_desc =
"character";
605 Opt->gisprompt =
"old,separator,separator";
606 Opt->answer =
"pipe";
607 Opt->label = _(
"Field separator");
608 Opt->description = _(
"Special characters: pipe, comma, space, tab, newline");
614 Opt->type = TYPE_STRING;
615 Opt->key_desc =
"name";
617 Opt->answer = DEFAULT_FG_COLOR;
618 Opt->gisprompt =
"old,color,color";
619 Opt->label = _(
"Color");
621 _(
"Either a standard color name or R:G:B triplet");
625 Opt->type = TYPE_STRING;
626 Opt->key_desc =
"name";
628 Opt->answer = DEFAULT_FG_COLOR;
629 Opt->gisprompt =
"old,color_none,color";
630 Opt->label = _(
"Color");
632 _(
"Either a standard color name, R:G:B triplet, or \"none\"");
639 Opt->type = TYPE_STRING;
640 Opt->key_desc =
"name";
642 Opt->gisprompt =
"old,dir,dir";
643 Opt->description = _(
"Name of input directory");
648 Opt->type = TYPE_STRING;
652 "miles,feet,meters,kilometers,acres,hectares";
653 Opt->description = _(
"Units");
656 case G_OPT_M_DATATYPE:
658 Opt->key_desc =
"datatype";
659 Opt->type = TYPE_STRING;
662 Opt->description = _(
"Data type(s)");
667 Opt->type = TYPE_STRING;
670 Opt->key_desc =
"name";
671 Opt->gisprompt =
"old,mapset,mapset";
672 Opt->label = _(
"Name of mapset (default: current search path)");
673 Opt->description = _(
"'.' for current mapset");
676 case G_OPT_M_LOCATION:
677 Opt->key =
"location";
678 Opt->type = TYPE_STRING;
681 Opt->label = _(
"Location name");
682 Opt->description = _(
"Location name (not location path)");
683 Opt->gisprompt =
"old,location,location";
684 Opt->key_desc =
"name";
689 Opt->type = TYPE_STRING;
692 Opt->label = _(
"GRASS GIS database directory");
693 Opt->description = _(
"Default: path to the current GRASS GIS database");
694 Opt->gisprompt =
"old,dbase,dbase";
695 Opt->key_desc =
"path";
699 Opt->key =
"coordinates";
700 Opt->type = TYPE_DOUBLE;
703 Opt->key_desc =
"east,north";
704 Opt->gisprompt =
"old,coords,coords";
705 Opt->description = _(
"Coordinates");
710 Opt->key_desc =
"style";
711 Opt->type = TYPE_STRING;
714 Opt->description = _(
"Name of color table");
716 Opt->gisprompt =
"old,colortable,colortable";
719 case G_OPT_M_NULL_VALUE:
720 Opt->key =
"null_value";
721 Opt->key_desc =
"string";
722 Opt->type = TYPE_STRING;
725 Opt->description = _(
"String representing NULL value");
730 Opt->type = TYPE_STRING;
731 Opt->key_desc =
"name";
733 Opt->gisprompt =
"old,windows,region";
734 Opt->description = _(
"Name of saved region");
738 case G_OPT_STDS_INPUT:
740 Opt->type = TYPE_STRING;
741 Opt->key_desc =
"name";
743 Opt->gisprompt =
"old,stds,stds";
744 Opt->description = _(
"Name of the input space time dataset");
746 case G_OPT_STDS_INPUTS:
748 Opt->type = TYPE_STRING;
749 Opt->key_desc =
"name";
752 Opt->gisprompt =
"old,stds,stds";
753 Opt->description = _(
"Name of the input space time datasets");
755 case G_OPT_STDS_OUTPUT:
757 Opt->type = TYPE_STRING;
758 Opt->key_desc =
"name";
760 Opt->gisprompt =
"new,stds,stds";
761 Opt->description = _(
"Name of the output space time dataset");
763 case G_OPT_STRDS_INPUT:
765 Opt->type = TYPE_STRING;
766 Opt->key_desc =
"name";
768 Opt->gisprompt =
"old,strds,strds";
769 Opt->description = _(
"Name of the input space time raster dataset");
771 case G_OPT_STRDS_INPUTS:
773 Opt->type = TYPE_STRING;
774 Opt->key_desc =
"name";
777 Opt->gisprompt =
"old,strds,strds";
778 Opt->description = _(
"Name of the input space time raster datasets");
780 case G_OPT_STRDS_OUTPUT:
782 Opt->type = TYPE_STRING;
783 Opt->key_desc =
"name";
785 Opt->gisprompt =
"new,strds,strds";
786 Opt->description = _(
"Name of the output space time raster dataset");
788 case G_OPT_STVDS_INPUT:
790 Opt->type = TYPE_STRING;
791 Opt->key_desc =
"name";
793 Opt->gisprompt =
"old,stvds,stvds";
794 Opt->description = _(
"Name of the input space time vector dataset");
796 case G_OPT_STVDS_INPUTS:
798 Opt->type = TYPE_STRING;
799 Opt->key_desc =
"name";
802 Opt->gisprompt =
"old,stvds,stvds";
803 Opt->description = _(
"Name of the input space time vector datasets");
805 case G_OPT_STVDS_OUTPUT:
807 Opt->type = TYPE_STRING;
808 Opt->key_desc =
"name";
810 Opt->gisprompt =
"new,stvds,stvds";
811 Opt->description = _(
"Name of the output space time vector dataset");
813 case G_OPT_STR3DS_INPUT:
815 Opt->type = TYPE_STRING;
816 Opt->key_desc =
"name";
818 Opt->gisprompt =
"old,str3ds,str3ds";
819 Opt->description = _(
"Name of the input space time raster3d dataset");
821 case G_OPT_STR3DS_INPUTS:
823 Opt->type = TYPE_STRING;
824 Opt->key_desc =
"name";
827 Opt->gisprompt =
"old,str3ds,str3ds";
828 Opt->description = _(
"Name of the input space time raster3d datasets");
830 case G_OPT_STR3DS_OUTPUT:
832 Opt->type = TYPE_STRING;
833 Opt->key_desc =
"name";
835 Opt->gisprompt =
"new,str3ds,str3ds";
836 Opt->description = _(
"Name of the output space time raster3d dataset");
838 case G_OPT_STDS_TYPE:
840 Opt->type = TYPE_STRING;
841 Opt->key_desc =
"name";
843 Opt->answer =
"strds";
844 Opt->options =
"strds,stvds,str3ds";
845 Opt->description = _(
"Type of the input space time dataset");
847 case G_OPT_MAP_INPUT:
849 Opt->type = TYPE_STRING;
850 Opt->key_desc =
"name";
852 Opt->gisprompt =
"old,map,map";
853 Opt->description = _(
"Name of the input map");
855 case G_OPT_MAP_INPUTS:
857 Opt->type = TYPE_STRING;
858 Opt->key_desc =
"name";
861 Opt->gisprompt =
"old,map,map";
862 Opt->description = _(
"Name of the input maps");
866 Opt->type = TYPE_STRING;
867 Opt->key_desc =
"name";
869 Opt->answer =
"raster";
870 Opt->options =
"raster,vector,raster_3d";
871 Opt->description = _(
"Type of the input map");
874 Opt->key =
"temporaltype";
875 Opt->type = TYPE_STRING;
876 Opt->key_desc =
"name";
878 Opt->answer =
"absolute";
879 Opt->options =
"absolute,relative";
880 Opt->description = _(
"The temporal type of the space time dataset");
884 Opt->type = TYPE_STRING;
885 Opt->key_desc =
"sql_query";
887 Opt->label = _(
"WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework");
888 Opt->description = _(
"Example: start_time > '2001-01-01 12:30:00'");
891 Opt->key =
"sampling";
892 Opt->type = TYPE_STRING;
893 Opt->key_desc =
"name";
896 Opt->answer =
"start";
897 Opt->options =
"start,during,overlap,contain,equal,follows,precedes";
898 Opt->description = _(
"The method to be used for sampling the input dataset");
932 Flg->description = _(
"Do not create attribute table");
936 Flg->label = _(
"Do not build topology");
937 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_descriptions(void)
Get color rules description for Option->descriptions.
char * G_color_rules_options(void)
Get list of color rules for Option->options.