16 #include <grass/gis.h> 17 #include <grass/glocale.h> 19 #include "parser_local_proto.h" 143 Opt->type = TYPE_STRING;
144 Opt->key_desc =
"sql_query";
146 Opt->label = _(
"SQL select statement");
148 _(
"For example: 'select * from rybniky where kapri = 'hodne'");
152 Opt->type = TYPE_STRING;
153 Opt->key_desc =
"sql_query";
155 Opt->label = _(
"WHERE conditions of SQL statement without 'where' keyword");
156 Opt->description = _(
"Example: income < 1000 and inhab >= 10000");
160 Opt->type = TYPE_STRING;
161 Opt->key_desc =
"name";
164 Opt->description = _(
"Name of attribute table");
165 Opt->gisprompt =
"old,dbtable,dbtable";
167 case G_OPT_DB_DRIVER:
169 Opt->type = TYPE_STRING;
170 Opt->key_desc =
"name";
173 Opt->description = _(
"Name of database driver");
174 Opt->gisprompt =
"old,dbdriver,dbdriver";
176 case G_OPT_DB_DATABASE:
177 Opt->key =
"database";
178 Opt->type = TYPE_STRING;
179 Opt->key_desc =
"name";
182 Opt->description = _(
"Name of database");
183 Opt->gisprompt =
"old,dbname,dbname";
185 case G_OPT_DB_SCHEMA:
187 Opt->type = TYPE_STRING;
188 Opt->key_desc =
"name";
191 Opt->label = _(
"Database schema");
192 Opt->description = _(
"Do not use this option if schemas " 193 "are not supported by driver/database server");
195 case G_OPT_DB_COLUMN:
197 Opt->type = TYPE_STRING;
198 Opt->key_desc =
"name";
201 Opt->description = _(
"Name of attribute column");
202 Opt->gisprompt =
"old,dbcolumn,dbcolumn";
204 case G_OPT_DB_COLUMNS:
205 Opt->key =
"columns";
206 Opt->type = TYPE_STRING;
207 Opt->key_desc =
"name";
210 Opt->description = _(
"Name of attribute column(s)");
211 Opt->gisprompt =
"old,dbcolumn,dbcolumn";
213 case G_OPT_DB_KEYCOLUMN:
215 Opt->type = TYPE_STRING;
216 Opt->key_desc =
"name";
219 Opt->label = _(
"Name of key column");
220 Opt->description = _(
"Must refer to an integer column");
222 Opt->answer = GV_KEY_COLUMN;
228 Opt->type = TYPE_STRING;
229 Opt->key_desc =
"name";
231 Opt->gisprompt =
"old,group,group";
232 Opt->description = _(
"Name of input imagery group");
234 case G_OPT_I_SUBGROUP:
235 Opt->key =
"subgroup";
236 Opt->type = TYPE_STRING;
237 Opt->key_desc =
"name";
239 Opt->gisprompt =
"old,subgroup,subgroup";
240 Opt->description = _(
"Name of input imagery subgroup");
246 Opt->type = TYPE_STRING;
247 Opt->key_desc =
"name";
249 Opt->gisprompt =
"old,cell,raster";
250 Opt->description = _(
"Name of input raster map");
254 Opt->type = TYPE_STRING;
255 Opt->key_desc =
"name";
258 Opt->gisprompt =
"old,cell,raster";
259 Opt->description = _(
"Name of input raster map(s)");
263 Opt->type = TYPE_STRING;
264 Opt->key_desc =
"name";
266 Opt->gisprompt =
"new,cell,raster";
267 Opt->description = _(
"Name for output raster map");
269 case G_OPT_R_OUTPUTS:
271 Opt->type = TYPE_STRING;
272 Opt->key_desc =
"name";
275 Opt->gisprompt =
"new,cell,raster";
276 Opt->description = _(
"Name for output raster map(s)");
280 Opt->type = TYPE_STRING;
281 Opt->key_desc =
"name";
283 Opt->gisprompt =
"old,cell,raster";
284 Opt->description = _(
"Name of raster map");
288 Opt->type = TYPE_STRING;
289 Opt->key_desc =
"name";
292 Opt->gisprompt =
"old,cell,raster";
293 Opt->description = _(
"Name of raster map(s)");
297 Opt->type = TYPE_STRING;
298 Opt->key_desc =
"name";
300 Opt->gisprompt =
"old,cell,raster";
301 Opt->description = _(
"Name of base raster map");
305 Opt->type = TYPE_STRING;
306 Opt->key_desc =
"name";
308 Opt->gisprompt =
"old,cell,raster";
309 Opt->description = _(
"Name of cover raster map");
312 Opt->key =
"elevation";
313 Opt->type = TYPE_STRING;
314 Opt->key_desc =
"name";
316 Opt->gisprompt =
"old,cell,raster";
317 Opt->description = _(
"Name of input elevation raster map");
320 Opt->key =
"elevation";
321 Opt->type = TYPE_STRING;
322 Opt->key_desc =
"name";
325 Opt->gisprompt =
"old,cell,raster";
326 Opt->description = _(
"Name of input elevation raster map(s)");
328 case G_OPT_R_INTERP_TYPE:
330 Opt->type = TYPE_STRING;
332 Opt->description = _(
"Sampling interpolation method");
333 Opt->options =
"nearest,bilinear,bicubic";
335 "nearest;%s;bilinear;%s;bicubic;%s",
336 _(
"Nearest-neighbor interpolation"),
337 _(
"Bilinear interpolation"),
338 _(
"Bicubic interpolation"));
340 case G_OPT_R_BASENAME_INPUT:
342 Opt->type = TYPE_STRING;
343 Opt->key_desc =
"basename";
346 Opt->gisprompt =
"old,cell,raster";
347 Opt->description = _(
"Name of input basename raster map(s)");
349 case G_OPT_R_BASENAME_OUTPUT:
351 Opt->type = TYPE_STRING;
352 Opt->key_desc =
"basename";
355 Opt->gisprompt =
"new,cell,raster";
356 Opt->description = _(
"Name for output basename raster map(s)");
362 Opt->type = TYPE_STRING;
363 Opt->key_desc =
"name";
365 Opt->gisprompt =
"old,grid3,raster_3d";
366 Opt->description = _(
"Name of input 3D raster map");
368 case G_OPT_R3_INPUTS:
370 Opt->type = TYPE_STRING;
371 Opt->key_desc =
"name";
374 Opt->gisprompt =
"old,grid3,raster_3d";
375 Opt->description = _(
"Name of input 3D raster map(s)");
377 case G_OPT_R3_OUTPUT:
379 Opt->type = TYPE_STRING;
380 Opt->key_desc =
"name";
382 Opt->gisprompt =
"new,grid3,raster_3d";
383 Opt->description = _(
"Name for output 3D raster map");
387 Opt->type = TYPE_STRING;
388 Opt->key_desc =
"name";
390 Opt->gisprompt =
"old,grid3,raster_3d";
391 Opt->description = _(
"Name of 3D raster map");
395 Opt->type = TYPE_STRING;
396 Opt->key_desc =
"name";
399 Opt->gisprompt =
"old,grid3,raster_3d";
400 Opt->description = _(
"Name of 3D raster map(s)");
404 Opt->type = TYPE_STRING;
407 Opt->answer =
"default";
408 Opt->options =
"default,double,float";
409 Opt->description = _(
"Data type used in the output raster3d map");
411 case G_OPT_R3_PRECISION:
412 Opt->key =
"precision";
413 Opt->type = TYPE_STRING;
416 Opt->answer =
"default";
418 _(
"Number of digits used as mantissa in the internal map storage, 0 -23 for float, 0 - 52 for double, max or default");
420 case G_OPT_R3_COMPRESSION:
421 Opt->key =
"compression";
422 Opt->type = TYPE_STRING;
425 Opt->answer =
"default";
426 Opt->options =
"default,zip,none";
428 _(
"The compression method used in the output raster3d map");
430 case G_OPT_R3_TILE_DIMENSION:
431 Opt->key =
"tiledimension";
432 Opt->type = TYPE_STRING;
435 Opt->key_desc =
"XxYxZ";
436 Opt->answer =
"default";
438 _(
"The dimensions of the tiles used in the output raster3d map (XxYxZ or default: 16x16x8)");
444 Opt->type = TYPE_STRING;
445 Opt->key_desc =
"name";
447 Opt->gisprompt =
"old,vector,vector";
448 Opt->label = _(
"Name of input vector map");
449 Opt->description = _(
"Or data source for direct OGR access");
453 Opt->type = TYPE_STRING;
454 Opt->key_desc =
"name";
457 Opt->gisprompt =
"old,vector,vector";
458 Opt->label = _(
"Name of input vector map(s)");
459 Opt->description = _(
"Or data source(s) for direct OGR access");
463 Opt->type = TYPE_STRING;
464 Opt->key_desc =
"name";
466 Opt->gisprompt =
"new,vector,vector";
467 Opt->description = _(
"Name for output vector map");
471 Opt->type = TYPE_STRING;
472 Opt->key_desc =
"name";
474 Opt->gisprompt =
"old,vector,vector";
475 Opt->label = _(
"Name of vector map");
476 Opt->description = _(
"Or data source for direct OGR access");
480 Opt->type = TYPE_STRING;
481 Opt->key_desc =
"name";
484 Opt->gisprompt =
"old,vector,vector";
485 Opt->description = _(
"Name of vector map(s)");
489 Opt->type = TYPE_STRING;
492 Opt->answer =
"point,line,boundary,centroid,area";
493 Opt->options =
"point,line,boundary,centroid,area";
494 Opt->description = _(
"Input feature type");
498 Opt->type = TYPE_STRING;
501 Opt->answer =
"point,line,boundary,centroid,area,face,kernel";
502 Opt->options =
"point,line,boundary,centroid,area,face,kernel";
503 Opt->description = _(
"Input feature type");
507 Opt->type = TYPE_STRING;
510 Opt->label = _(
"Layer number or name");
512 _(
"Vector features can have category values in different layers." 513 " This number determines which layer to use. " 514 "When used with direct OGR access this is the layer name.");
515 Opt->gisprompt =
"old,layer,layer";
517 case G_OPT_V_FIELD_ALL:
519 Opt->type = TYPE_STRING;
522 Opt->label = _(
"Layer number or name ('-1' for all layers)");
524 _(
"A single vector map can be connected to multiple database " 525 "tables. This number determines which table to use. " 526 "When used with direct OGR access this is the layer name.");
527 Opt->gisprompt =
"old,layer_all,layer";
531 Opt->type = TYPE_INTEGER;
533 Opt->description = _(
"Category value");
534 Opt->gisprompt =
"old,cat,cats";
538 Opt->type = TYPE_STRING;
539 Opt->key_desc =
"range";
541 Opt->label = _(
"Category values");
542 Opt->description = _(
"Example: 1,3,7-9,13");
543 Opt->gisprompt =
"old,cats,cats";
547 Opt->type = TYPE_INTEGER;
549 Opt->description = _(
"Feature id");
553 Opt->type = TYPE_STRING;
554 Opt->key_desc =
"range";
556 Opt->label = _(
"Feature ids");
557 Opt->description = _(
"Example: 1,3,7-9,13");
563 Opt->type = TYPE_STRING;
564 Opt->key_desc =
"name";
566 Opt->gisprompt =
"old,file,file";
567 Opt->description = _(
"Name of input file");
569 case G_OPT_F_BIN_INPUT:
571 Opt->type = TYPE_STRING;
572 Opt->key_desc =
"name";
574 Opt->gisprompt =
"old,bin,file";
575 Opt->description = _(
"Name of input file");
579 Opt->type = TYPE_STRING;
580 Opt->key_desc =
"name";
582 Opt->gisprompt =
"new,file,file";
583 Opt->description = _(
"Name for output file");
586 Opt->key =
"separator";
587 Opt->type = TYPE_STRING;
588 Opt->key_desc =
"character";
590 Opt->gisprompt =
"old,separator,separator";
591 Opt->answer =
"pipe";
592 Opt->label = _(
"Field separator");
593 Opt->description = _(
"Special characters: pipe, comma, space, tab, newline");
599 Opt->type = TYPE_STRING;
600 Opt->key_desc =
"name";
602 Opt->answer = DEFAULT_FG_COLOR;
603 Opt->gisprompt =
"old,color,color";
604 Opt->label = _(
"Color");
606 _(
"Either a standard color name or R:G:B triplet");
610 Opt->type = TYPE_STRING;
611 Opt->key_desc =
"name";
613 Opt->answer = DEFAULT_FG_COLOR;
614 Opt->gisprompt =
"old,color_none,color";
615 Opt->label = _(
"Color");
617 _(
"Either a standard color name, R:G:B triplet, or \"none\"");
624 Opt->type = TYPE_STRING;
625 Opt->key_desc =
"name";
627 Opt->gisprompt =
"old,dir,dir";
628 Opt->description = _(
"Name of input directory");
633 Opt->type = TYPE_STRING;
637 "miles,feet,meters,kilometers,acres,hectares";
638 Opt->description = _(
"Units");
641 case G_OPT_M_DATATYPE:
643 Opt->key_desc =
"datatype";
644 Opt->type = TYPE_STRING;
647 Opt->description = _(
"Data type(s)");
652 Opt->type = TYPE_STRING;
655 Opt->key_desc =
"name";
656 Opt->gisprompt =
"old,mapset,mapset";
657 Opt->label = _(
"Name of mapset (default: current search path)");
658 Opt->description = _(
"'.' for current mapset");
661 case G_OPT_M_LOCATION:
662 Opt->key =
"location";
663 Opt->type = TYPE_STRING;
666 Opt->label = _(
"Location name");
667 Opt->description = _(
"Location name (not location path)");
668 Opt->gisprompt =
"old,location,location";
669 Opt->key_desc =
"name";
674 Opt->type = TYPE_STRING;
677 Opt->label = _(
"GRASS GIS database directory");
678 Opt->description = _(
"Default: path to the current GRASS GIS database");
679 Opt->gisprompt =
"old,dbase,dbase";
680 Opt->key_desc =
"path";
684 Opt->key =
"coordinates";
685 Opt->type = TYPE_DOUBLE;
688 Opt->key_desc =
"east,north";
689 Opt->gisprompt =
"old,coords,coords";
690 Opt->description = _(
"Coordinates");
695 Opt->key_desc =
"style";
696 Opt->type = TYPE_STRING;
699 Opt->description = _(
"Name of color table");
701 Opt->gisprompt =
"old,colortable,colortable";
704 case G_OPT_M_NULL_VALUE:
705 Opt->key =
"null_value";
706 Opt->key_desc =
"string";
707 Opt->type = TYPE_STRING;
710 Opt->description = _(
"String representing NULL value");
715 Opt->type = TYPE_STRING;
716 Opt->key_desc =
"name";
718 Opt->gisprompt =
"old,windows,region";
719 Opt->description = _(
"Name of saved region");
723 case G_OPT_STDS_INPUT:
725 Opt->type = TYPE_STRING;
726 Opt->key_desc =
"name";
728 Opt->gisprompt =
"old,stds,stds";
729 Opt->description = _(
"Name of the input space time dataset");
731 case G_OPT_STDS_INPUTS:
733 Opt->type = TYPE_STRING;
734 Opt->key_desc =
"name";
737 Opt->gisprompt =
"old,stds,stds";
738 Opt->description = _(
"Name of the input space time datasets");
740 case G_OPT_STDS_OUTPUT:
742 Opt->type = TYPE_STRING;
743 Opt->key_desc =
"name";
745 Opt->gisprompt =
"new,stds,stds";
746 Opt->description = _(
"Name of the output space time dataset");
748 case G_OPT_STRDS_INPUT:
750 Opt->type = TYPE_STRING;
751 Opt->key_desc =
"name";
753 Opt->gisprompt =
"old,strds,strds";
754 Opt->description = _(
"Name of the input space time raster dataset");
756 case G_OPT_STRDS_INPUTS:
758 Opt->type = TYPE_STRING;
759 Opt->key_desc =
"name";
762 Opt->gisprompt =
"old,strds,strds";
763 Opt->description = _(
"Name of the input space time raster datasets");
765 case G_OPT_STRDS_OUTPUT:
767 Opt->type = TYPE_STRING;
768 Opt->key_desc =
"name";
770 Opt->gisprompt =
"new,strds,strds";
771 Opt->description = _(
"Name of the output space time raster dataset");
773 case G_OPT_STVDS_INPUT:
775 Opt->type = TYPE_STRING;
776 Opt->key_desc =
"name";
778 Opt->gisprompt =
"old,stvds,stvds";
779 Opt->description = _(
"Name of the input space time vector dataset");
781 case G_OPT_STVDS_INPUTS:
783 Opt->type = TYPE_STRING;
784 Opt->key_desc =
"name";
787 Opt->gisprompt =
"old,stvds,stvds";
788 Opt->description = _(
"Name of the input space time vector datasets");
790 case G_OPT_STVDS_OUTPUT:
792 Opt->type = TYPE_STRING;
793 Opt->key_desc =
"name";
795 Opt->gisprompt =
"new,stvds,stvds";
796 Opt->description = _(
"Name of the output space time vector dataset");
798 case G_OPT_STR3DS_INPUT:
800 Opt->type = TYPE_STRING;
801 Opt->key_desc =
"name";
803 Opt->gisprompt =
"old,str3ds,str3ds";
804 Opt->description = _(
"Name of the input space time raster3d dataset");
806 case G_OPT_STR3DS_INPUTS:
808 Opt->type = TYPE_STRING;
809 Opt->key_desc =
"name";
812 Opt->gisprompt =
"old,str3ds,str3ds";
813 Opt->description = _(
"Name of the input space time raster3d datasets");
815 case G_OPT_STR3DS_OUTPUT:
817 Opt->type = TYPE_STRING;
818 Opt->key_desc =
"name";
820 Opt->gisprompt =
"new,str3ds,str3ds";
821 Opt->description = _(
"Name of the output space time raster3d dataset");
823 case G_OPT_STDS_TYPE:
825 Opt->type = TYPE_STRING;
826 Opt->key_desc =
"name";
828 Opt->answer =
"strds";
829 Opt->options =
"strds,stvds,str3ds";
830 Opt->description = _(
"Type of the input space time dataset");
832 case G_OPT_MAP_INPUT:
834 Opt->type = TYPE_STRING;
835 Opt->key_desc =
"name";
837 Opt->gisprompt =
"old,map,map";
838 Opt->description = _(
"Name of the input map");
840 case G_OPT_MAP_INPUTS:
842 Opt->type = TYPE_STRING;
843 Opt->key_desc =
"name";
846 Opt->gisprompt =
"old,map,map";
847 Opt->description = _(
"Name of the input maps");
851 Opt->type = TYPE_STRING;
852 Opt->key_desc =
"name";
854 Opt->answer =
"raster";
855 Opt->options =
"raster,vector,raster_3d";
856 Opt->description = _(
"Type of the input map");
859 Opt->key =
"temporaltype";
860 Opt->type = TYPE_STRING;
861 Opt->key_desc =
"name";
863 Opt->answer =
"absolute";
864 Opt->options =
"absolute,relative";
865 Opt->description = _(
"The temporal type of the space time dataset");
869 Opt->type = TYPE_STRING;
870 Opt->key_desc =
"sql_query";
872 Opt->label = _(
"WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework");
873 Opt->description = _(
"Example: start_time > '2001-01-01 12:30:00'");
876 Opt->key =
"sampling";
877 Opt->type = TYPE_STRING;
878 Opt->key_desc =
"name";
881 Opt->answer =
"start";
882 Opt->options =
"start,during,overlap,contain,equal,follows,precedes";
883 Opt->description = _(
"The method to be used for sampling the input dataset");
917 Flg->description = _(
"Do not create attribute table");
921 Flg->label = _(
"Do not build topology");
922 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.