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,3d-raster";
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,3d-raster";
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,3d-raster";
383 Opt->description = _(
"Name for output 3D raster map");
387 Opt->type = TYPE_STRING;
388 Opt->key_desc =
"name";
390 Opt->gisprompt =
"old,grid3,3d-raster";
391 Opt->description = _(
"Name of 3D raster map");
395 Opt->type = TYPE_STRING;
396 Opt->key_desc =
"name";
399 Opt->gisprompt =
"old,grid3,3d-raster";
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");
537 Opt->type = TYPE_STRING;
538 Opt->key_desc =
"range";
540 Opt->label = _(
"Category values");
541 Opt->description = _(
"Example: 1,3,7-9,13");
545 Opt->type = TYPE_INTEGER;
547 Opt->description = _(
"Feature id");
551 Opt->type = TYPE_STRING;
552 Opt->key_desc =
"range";
554 Opt->label = _(
"Feature ids");
555 Opt->description = _(
"Example: 1,3,7-9,13");
561 Opt->type = TYPE_STRING;
562 Opt->key_desc =
"name";
564 Opt->gisprompt =
"old,file,file";
565 Opt->description = _(
"Name of input file");
567 case G_OPT_F_BIN_INPUT:
569 Opt->type = TYPE_STRING;
570 Opt->key_desc =
"name";
572 Opt->gisprompt =
"old,bin,file";
573 Opt->description = _(
"Name of input file");
577 Opt->type = TYPE_STRING;
578 Opt->key_desc =
"name";
580 Opt->gisprompt =
"new,file,file";
581 Opt->description = _(
"Name for output file");
584 Opt->key =
"separator";
585 Opt->type = TYPE_STRING;
586 Opt->key_desc =
"character";
588 Opt->gisprompt =
"old,separator,separator";
589 Opt->answer =
"pipe";
590 Opt->label = _(
"Field separator");
591 Opt->description = _(
"Special characters: pipe, comma, space, tab, newline");
597 Opt->type = TYPE_STRING;
598 Opt->key_desc =
"name";
600 Opt->answer = DEFAULT_FG_COLOR;
601 Opt->gisprompt =
"old,color,color";
602 Opt->label = _(
"Color");
604 _(
"Either a standard color name or R:G:B triplet");
608 Opt->type = TYPE_STRING;
609 Opt->key_desc =
"name";
611 Opt->answer = DEFAULT_FG_COLOR;
612 Opt->gisprompt =
"old,color_none,color";
613 Opt->label = _(
"Color");
615 _(
"Either a standard color name, R:G:B triplet, or \"none\"");
622 Opt->type = TYPE_STRING;
623 Opt->key_desc =
"name";
625 Opt->gisprompt =
"old,dir,dir";
626 Opt->description = _(
"Name of input directory");
631 Opt->type = TYPE_STRING;
635 "miles,feet,meters,kilometers,acres,hectares";
636 Opt->description = _(
"Units");
639 case G_OPT_M_DATATYPE:
641 Opt->key_desc =
"datatype";
642 Opt->type = TYPE_STRING;
645 Opt->description = _(
"Data type(s)");
650 Opt->type = TYPE_STRING;
653 Opt->key_desc =
"name";
654 Opt->gisprompt =
"old,mapset,mapset";
655 Opt->label = _(
"Name of mapset (default: current search path)");
656 Opt->description = _(
"'.' for current mapset");
659 case G_OPT_M_LOCATION:
660 Opt->key =
"location";
661 Opt->type = TYPE_STRING;
664 Opt->label = _(
"Location name");
665 Opt->description = _(
"Location name (not location path)");
666 Opt->gisprompt =
"old,location,location";
667 Opt->key_desc =
"name";
672 Opt->type = TYPE_STRING;
675 Opt->label = _(
"GRASS GIS database directory");
676 Opt->description = _(
"Default: path to the current GRASS GIS database");
677 Opt->gisprompt =
"old,dbase,dbase";
678 Opt->key_desc =
"path";
682 Opt->key =
"coordinates";
683 Opt->type = TYPE_DOUBLE;
686 Opt->key_desc =
"east,north";
687 Opt->gisprompt =
"old,coords,coords";
688 Opt->description = _(
"Coordinates");
693 Opt->key_desc =
"style";
694 Opt->type = TYPE_STRING;
697 Opt->description = _(
"Name of color table");
699 Opt->gisprompt =
"old,colortable,colortable";
702 case G_OPT_M_NULL_VALUE:
703 Opt->key =
"null_value";
704 Opt->key_desc =
"string";
705 Opt->type = TYPE_STRING;
708 Opt->description = _(
"String representing NULL value");
713 Opt->type = TYPE_STRING;
714 Opt->key_desc =
"name";
716 Opt->gisprompt =
"old,windows,region";
717 Opt->description = _(
"Name of saved region");
721 case G_OPT_STDS_INPUT:
723 Opt->type = TYPE_STRING;
724 Opt->key_desc =
"name";
726 Opt->gisprompt =
"old,stds,stds";
727 Opt->description = _(
"Name of the input space time dataset");
729 case G_OPT_STDS_INPUTS:
731 Opt->type = TYPE_STRING;
732 Opt->key_desc =
"name";
735 Opt->gisprompt =
"old,stds,stds";
736 Opt->description = _(
"Name of the input space time datasets");
738 case G_OPT_STDS_OUTPUT:
740 Opt->type = TYPE_STRING;
741 Opt->key_desc =
"name";
743 Opt->gisprompt =
"new,stds,stds";
744 Opt->description = _(
"Name of the output space time dataset");
746 case G_OPT_STRDS_INPUT:
748 Opt->type = TYPE_STRING;
749 Opt->key_desc =
"name";
751 Opt->gisprompt =
"old,strds,strds";
752 Opt->description = _(
"Name of the input space time raster dataset");
754 case G_OPT_STRDS_INPUTS:
756 Opt->type = TYPE_STRING;
757 Opt->key_desc =
"name";
760 Opt->gisprompt =
"old,strds,strds";
761 Opt->description = _(
"Name of the input space time raster datasets");
763 case G_OPT_STRDS_OUTPUT:
765 Opt->type = TYPE_STRING;
766 Opt->key_desc =
"name";
768 Opt->gisprompt =
"new,strds,strds";
769 Opt->description = _(
"Name of the output space time raster dataset");
771 case G_OPT_STVDS_INPUT:
773 Opt->type = TYPE_STRING;
774 Opt->key_desc =
"name";
776 Opt->gisprompt =
"old,stvds,stvds";
777 Opt->description = _(
"Name of the input space time vector dataset");
779 case G_OPT_STVDS_INPUTS:
781 Opt->type = TYPE_STRING;
782 Opt->key_desc =
"name";
785 Opt->gisprompt =
"old,stvds,stvds";
786 Opt->description = _(
"Name of the input space time vector datasets");
788 case G_OPT_STVDS_OUTPUT:
790 Opt->type = TYPE_STRING;
791 Opt->key_desc =
"name";
793 Opt->gisprompt =
"new,stvds,stvds";
794 Opt->description = _(
"Name of the output space time vector dataset");
796 case G_OPT_STR3DS_INPUT:
798 Opt->type = TYPE_STRING;
799 Opt->key_desc =
"name";
801 Opt->gisprompt =
"old,str3ds,str3ds";
802 Opt->description = _(
"Name of the input space time raster3d dataset");
804 case G_OPT_STR3DS_INPUTS:
806 Opt->type = TYPE_STRING;
807 Opt->key_desc =
"name";
810 Opt->gisprompt =
"old,str3ds,str3ds";
811 Opt->description = _(
"Name of the input space time raster3d datasets");
813 case G_OPT_STR3DS_OUTPUT:
815 Opt->type = TYPE_STRING;
816 Opt->key_desc =
"name";
818 Opt->gisprompt =
"new,str3ds,str3ds";
819 Opt->description = _(
"Name of the output space time raster3d dataset");
821 case G_OPT_STDS_TYPE:
823 Opt->type = TYPE_STRING;
824 Opt->key_desc =
"name";
826 Opt->answer =
"strds";
827 Opt->options =
"strds,stvds,str3ds";
828 Opt->description = _(
"Type of the input space time dataset");
830 case G_OPT_MAP_INPUT:
832 Opt->type = TYPE_STRING;
833 Opt->key_desc =
"name";
835 Opt->gisprompt =
"old,map,map";
836 Opt->description = _(
"Name of the input map");
838 case G_OPT_MAP_INPUTS:
840 Opt->type = TYPE_STRING;
841 Opt->key_desc =
"name";
844 Opt->gisprompt =
"old,map,map";
845 Opt->description = _(
"Name of the input maps");
849 Opt->type = TYPE_STRING;
850 Opt->key_desc =
"name";
852 Opt->answer =
"raster";
853 Opt->options =
"raster,vector,raster_3d";
854 Opt->description = _(
"Type of the input map");
857 Opt->key =
"temporaltype";
858 Opt->type = TYPE_STRING;
859 Opt->key_desc =
"name";
861 Opt->answer =
"absolute";
862 Opt->options =
"absolute,relative";
863 Opt->description = _(
"The temporal type of the space time dataset");
867 Opt->type = TYPE_STRING;
868 Opt->key_desc =
"sql_query";
870 Opt->label = _(
"WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework");
871 Opt->description = _(
"Example: start_time > '2001-01-01 12:30:00'");
874 Opt->key =
"sampling";
875 Opt->type = TYPE_STRING;
876 Opt->key_desc =
"name";
879 Opt->answer =
"start";
880 Opt->options =
"start,during,overlap,contain,equal,follows,precedes";
881 Opt->description = _(
"The method to be used for sampling the input dataset");
915 Flg->description = _(
"Do not create attribute table");
919 Flg->description = _(
"Do not build topology");
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.