GRASS GIS 7 Programmer's Manual  7.0.4(2016)-r00000
parser_standard_options.c
Go to the documentation of this file.
1 
16 #include <grass/gis.h>
17 #include <grass/glocale.h>
18 
19 #include "parser_local_proto.h"
20 
134 struct Option *G_define_standard_option(int opt)
135 {
136  struct Option *Opt;
137 
138  Opt = G_define_option();
139 
140  switch (opt) {
141  case G_OPT_DB_SQL:
142  Opt->key = "sql";
143  Opt->type = TYPE_STRING;
144  Opt->key_desc = "sql_query";
145  Opt->required = NO;
146  Opt->label = _("SQL select statement");
147  Opt->description =
148  _("For example: 'select * from rybniky where kapri = 'hodne'");
149  break;
150  case G_OPT_DB_WHERE:
151  Opt->key = "where";
152  Opt->type = TYPE_STRING;
153  Opt->key_desc = "sql_query";
154  Opt->required = NO;
155  Opt->label = _("WHERE conditions of SQL statement without 'where' keyword");
156  Opt->description = _("Example: income < 1000 and inhab >= 10000");
157  break;
158  case G_OPT_DB_TABLE:
159  Opt->key = "table";
160  Opt->type = TYPE_STRING;
161  Opt->key_desc = "name";
162  Opt->required = NO;
163  Opt->multiple = NO;
164  Opt->description = _("Name of attribute table");
165  Opt->gisprompt = "old,dbtable,dbtable";
166  break;
167  case G_OPT_DB_DRIVER:
168  Opt->key = "driver";
169  Opt->type = TYPE_STRING;
170  Opt->key_desc = "name";
171  Opt->required = NO;
172  Opt->multiple = NO;
173  Opt->description = _("Name of database driver");
174  Opt->gisprompt = "old,dbdriver,dbdriver";
175  break;
176  case G_OPT_DB_DATABASE:
177  Opt->key = "database";
178  Opt->type = TYPE_STRING;
179  Opt->key_desc = "name";
180  Opt->required = NO;
181  Opt->multiple = NO;
182  Opt->description = _("Name of database");
183  Opt->gisprompt = "old,dbname,dbname";
184  break;
185  case G_OPT_DB_SCHEMA:
186  Opt->key = "schema";
187  Opt->type = TYPE_STRING;
188  Opt->key_desc = "name";
189  Opt->required = NO;
190  Opt->multiple = NO;
191  Opt->label = _("Database schema");
192  Opt->description = _("Do not use this option if schemas "
193  "are not supported by driver/database server");
194  break;
195  case G_OPT_DB_COLUMN:
196  Opt->key = "column";
197  Opt->type = TYPE_STRING;
198  Opt->key_desc = "name";
199  Opt->required = NO;
200  Opt->multiple = NO;
201  Opt->description = _("Name of attribute column");
202  Opt->gisprompt = "old,dbcolumn,dbcolumn";
203  break;
204  case G_OPT_DB_COLUMNS:
205  Opt->key = "columns";
206  Opt->type = TYPE_STRING;
207  Opt->key_desc = "name";
208  Opt->required = NO;
209  Opt->multiple = YES;
210  Opt->description = _("Name of attribute column(s)");
211  Opt->gisprompt = "old,dbcolumn,dbcolumn";
212  break;
213  case G_OPT_DB_KEYCOLUMN:
214  Opt->key = "key";
215  Opt->type = TYPE_STRING;
216  Opt->key_desc = "name";
217  Opt->required = NO;
218  Opt->multiple = NO;
219  Opt->label = _("Name of key column");
220  Opt->description = _("Must refer to an integer column");
221  /* Opt->gisprompt = "old,dbcolumn,dbcolumn"; */
222  Opt->answer = GV_KEY_COLUMN;
223  break;
224 
225  /* imagery group */
226  case G_OPT_I_GROUP:
227  Opt->key = "group";
228  Opt->type = TYPE_STRING;
229  Opt->key_desc = "name";
230  Opt->required = YES;
231  Opt->gisprompt = "old,group,group";
232  Opt->description = _("Name of input imagery group");
233  break;
234  case G_OPT_I_SUBGROUP:
235  Opt->key = "subgroup";
236  Opt->type = TYPE_STRING;
237  Opt->key_desc = "name";
238  Opt->required = YES;
239  Opt->gisprompt = "old,subgroup,subgroup";
240  Opt->description = _("Name of input imagery subgroup");
241  break;
242 
243  /* raster maps */
244  case G_OPT_R_INPUT:
245  Opt->key = "input";
246  Opt->type = TYPE_STRING;
247  Opt->key_desc = "name";
248  Opt->required = YES;
249  Opt->gisprompt = "old,cell,raster";
250  Opt->description = _("Name of input raster map");
251  break;
252  case G_OPT_R_INPUTS:
253  Opt->key = "input";
254  Opt->type = TYPE_STRING;
255  Opt->key_desc = "name";
256  Opt->required = YES;
257  Opt->multiple = YES;
258  Opt->gisprompt = "old,cell,raster";
259  Opt->description = _("Name of input raster map(s)");
260  break;
261  case G_OPT_R_OUTPUT:
262  Opt->key = "output";
263  Opt->type = TYPE_STRING;
264  Opt->key_desc = "name";
265  Opt->required = YES;
266  Opt->gisprompt = "new,cell,raster";
267  Opt->description = _("Name for output raster map");
268  break;
269  case G_OPT_R_OUTPUTS:
270  Opt->key = "output";
271  Opt->type = TYPE_STRING;
272  Opt->key_desc = "name";
273  Opt->required = YES;
274  Opt->multiple = YES;
275  Opt->gisprompt = "new,cell,raster";
276  Opt->description = _("Name for output raster map(s)");
277  break;
278  case G_OPT_R_MAP:
279  Opt->key = "map";
280  Opt->type = TYPE_STRING;
281  Opt->key_desc = "name";
282  Opt->required = YES;
283  Opt->gisprompt = "old,cell,raster";
284  Opt->description = _("Name of raster map");
285  break;
286  case G_OPT_R_MAPS:
287  Opt->key = "map";
288  Opt->type = TYPE_STRING;
289  Opt->key_desc = "name";
290  Opt->required = YES;
291  Opt->multiple = YES;
292  Opt->gisprompt = "old,cell,raster";
293  Opt->description = _("Name of raster map(s)");
294  break;
295  case G_OPT_R_BASE:
296  Opt->key = "base";
297  Opt->type = TYPE_STRING;
298  Opt->key_desc = "name";
299  Opt->required = YES;
300  Opt->gisprompt = "old,cell,raster";
301  Opt->description = _("Name of base raster map");
302  break;
303  case G_OPT_R_COVER:
304  Opt->key = "cover";
305  Opt->type = TYPE_STRING;
306  Opt->key_desc = "name";
307  Opt->required = YES;
308  Opt->gisprompt = "old,cell,raster";
309  Opt->description = _("Name of cover raster map");
310  break;
311  case G_OPT_R_ELEV:
312  Opt->key = "elevation";
313  Opt->type = TYPE_STRING;
314  Opt->key_desc = "name";
315  Opt->required = YES;
316  Opt->gisprompt = "old,cell,raster";
317  Opt->description = _("Name of input elevation raster map");
318  break;
319  case G_OPT_R_ELEVS:
320  Opt->key = "elevation";
321  Opt->type = TYPE_STRING;
322  Opt->key_desc = "name";
323  Opt->required = YES;
324  Opt->multiple = YES;
325  Opt->gisprompt = "old,cell,raster";
326  Opt->description = _("Name of input elevation raster map(s)");
327  break;
328  case G_OPT_R_INTERP_TYPE:
329  Opt->key = "method";
330  Opt->type = TYPE_STRING;
331  Opt->required = NO;
332  Opt->description = _("Sampling interpolation method");
333  Opt->options = "nearest,bilinear,bicubic";
334  G_asprintf((char **) &(Opt->descriptions),
335  "nearest;%s;bilinear;%s;bicubic;%s",
336  _("Nearest-neighbor interpolation"),
337  _("Bilinear interpolation"),
338  _("Bicubic interpolation"));
339  break;
340  case G_OPT_R_BASENAME_INPUT:
341  Opt->key = "input";
342  Opt->type = TYPE_STRING;
343  Opt->key_desc = "basename";
344  Opt->required = YES;
345  Opt->multiple = NO;
346  Opt->gisprompt = "old,cell,raster";
347  Opt->description = _("Name of input basename raster map(s)");
348  break;
349  case G_OPT_R_BASENAME_OUTPUT:
350  Opt->key = "output";
351  Opt->type = TYPE_STRING;
352  Opt->key_desc = "basename";
353  Opt->required = YES;
354  Opt->multiple = NO;
355  Opt->gisprompt = "new,cell,raster";
356  Opt->description = _("Name for output basename raster map(s)");
357  break;
358 
359  /*g3d maps */
360  case G_OPT_R3_INPUT:
361  Opt->key = "input";
362  Opt->type = TYPE_STRING;
363  Opt->key_desc = "name";
364  Opt->required = YES;
365  Opt->gisprompt = "old,grid3,raster_3d";
366  Opt->description = _("Name of input 3D raster map");
367  break;
368  case G_OPT_R3_INPUTS:
369  Opt->key = "input";
370  Opt->type = TYPE_STRING;
371  Opt->key_desc = "name";
372  Opt->required = YES;
373  Opt->multiple = YES;
374  Opt->gisprompt = "old,grid3,raster_3d";
375  Opt->description = _("Name of input 3D raster map(s)");
376  break;
377  case G_OPT_R3_OUTPUT:
378  Opt->key = "output";
379  Opt->type = TYPE_STRING;
380  Opt->key_desc = "name";
381  Opt->required = YES;
382  Opt->gisprompt = "new,grid3,raster_3d";
383  Opt->description = _("Name for output 3D raster map");
384  break;
385  case G_OPT_R3_MAP:
386  Opt->key = "map";
387  Opt->type = TYPE_STRING;
388  Opt->key_desc = "name";
389  Opt->required = YES;
390  Opt->gisprompt = "old,grid3,raster_3d";
391  Opt->description = _("Name of 3D raster map");
392  break;
393  case G_OPT_R3_MAPS:
394  Opt->key = "map";
395  Opt->type = TYPE_STRING;
396  Opt->key_desc = "name";
397  Opt->required = YES;
398  Opt->multiple = YES;
399  Opt->gisprompt = "old,grid3,raster_3d";
400  Opt->description = _("Name of 3D raster map(s)");
401  break;
402  case G_OPT_R3_TYPE:
403  Opt->key = "type";
404  Opt->type = TYPE_STRING;
405  Opt->required = NO;
406  Opt->multiple = NO;
407  Opt->answer = "default";
408  Opt->options = "default,double,float";
409  Opt->description = _("Data type used in the output raster3d map");
410  break;
411  case G_OPT_R3_PRECISION:
412  Opt->key = "precision";
413  Opt->type = TYPE_STRING;
414  Opt->required = NO;
415  Opt->multiple = NO;
416  Opt->answer = "default";
417  Opt->description =
418  _("Number of digits used as mantissa in the internal map storage, 0 -23 for float, 0 - 52 for double, max or default");
419  break;
420  case G_OPT_R3_COMPRESSION:
421  Opt->key = "compression";
422  Opt->type = TYPE_STRING;
423  Opt->required = NO;
424  Opt->multiple = NO;
425  Opt->answer = "default";
426  Opt->options = "default,zip,none";
427  Opt->description =
428  _("The compression method used in the output raster3d map");
429  break;
430  case G_OPT_R3_TILE_DIMENSION:
431  Opt->key = "tiledimension";
432  Opt->type = TYPE_STRING;
433  Opt->required = NO;
434  Opt->multiple = NO;
435  Opt->key_desc = "XxYxZ";
436  Opt->answer = "default";
437  Opt->description =
438  _("The dimensions of the tiles used in the output raster3d map (XxYxZ or default: 16x16x8)");
439  break;
440 
441  /*vector maps */
442  case G_OPT_V_INPUT:
443  Opt->key = "input";
444  Opt->type = TYPE_STRING;
445  Opt->key_desc = "name";
446  Opt->required = YES;
447  Opt->gisprompt = "old,vector,vector";
448  Opt->label = _("Name of input vector map");
449  Opt->description = _("Or data source for direct OGR access");
450  break;
451  case G_OPT_V_INPUTS:
452  Opt->key = "input";
453  Opt->type = TYPE_STRING;
454  Opt->key_desc = "name";
455  Opt->required = YES;
456  Opt->multiple = YES;
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");
460  break;
461  case G_OPT_V_OUTPUT:
462  Opt->key = "output";
463  Opt->type = TYPE_STRING;
464  Opt->key_desc = "name";
465  Opt->required = YES;
466  Opt->gisprompt = "new,vector,vector";
467  Opt->description = _("Name for output vector map");
468  break;
469  case G_OPT_V_MAP:
470  Opt->key = "map";
471  Opt->type = TYPE_STRING;
472  Opt->key_desc = "name";
473  Opt->required = YES;
474  Opt->gisprompt = "old,vector,vector";
475  Opt->label = _("Name of vector map");
476  Opt->description = _("Or data source for direct OGR access");
477  break;
478  case G_OPT_V_MAPS:
479  Opt->key = "map";
480  Opt->type = TYPE_STRING;
481  Opt->key_desc = "name";
482  Opt->required = YES;
483  Opt->multiple = YES;
484  Opt->gisprompt = "old,vector,vector";
485  Opt->description = _("Name of vector map(s)");
486  break;
487  case G_OPT_V_TYPE:
488  Opt->key = "type";
489  Opt->type = TYPE_STRING;
490  Opt->required = NO;
491  Opt->multiple = YES;
492  Opt->answer = "point,line,boundary,centroid,area";
493  Opt->options = "point,line,boundary,centroid,area";
494  Opt->description = _("Input feature type");
495  break;
496  case G_OPT_V3_TYPE:
497  Opt->key = "type";
498  Opt->type = TYPE_STRING;
499  Opt->required = NO;
500  Opt->multiple = YES;
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");
504  break;
505  case G_OPT_V_FIELD:
506  Opt->key = "layer";
507  Opt->type = TYPE_STRING;
508  Opt->required = NO;
509  Opt->answer = "1";
510  Opt->label = _("Layer number or name");
511  Opt->description =
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";
516  break;
517  case G_OPT_V_FIELD_ALL:
518  Opt->key = "layer";
519  Opt->type = TYPE_STRING;
520  Opt->required = NO;
521  Opt->answer = "-1";
522  Opt->label = _("Layer number or name ('-1' for all layers)");
523  Opt->description =
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";
528  break;
529  case G_OPT_V_CAT:
530  Opt->key = "cat";
531  Opt->type = TYPE_INTEGER;
532  Opt->required = NO;
533  Opt->description = _("Category value");
534  break;
535  case G_OPT_V_CATS:
536  Opt->key = "cats";
537  Opt->type = TYPE_STRING;
538  Opt->key_desc = "range";
539  Opt->required = NO;
540  Opt->label = _("Category values");
541  Opt->description = _("Example: 1,3,7-9,13");
542  break;
543  case G_OPT_V_ID:
544  Opt->key = "id";
545  Opt->type = TYPE_INTEGER;
546  Opt->required = NO;
547  Opt->description = _("Feature id");
548  break;
549  case G_OPT_V_IDS:
550  Opt->key = "ids";
551  Opt->type = TYPE_STRING;
552  Opt->key_desc = "range";
553  Opt->required = NO;
554  Opt->label = _("Feature ids");
555  Opt->description = _("Example: 1,3,7-9,13");
556  break;
557 
558  /* files */
559  case G_OPT_F_INPUT:
560  Opt->key = "input";
561  Opt->type = TYPE_STRING;
562  Opt->key_desc = "name";
563  Opt->required = YES;
564  Opt->gisprompt = "old,file,file";
565  Opt->description = _("Name of input file");
566  break;
567  case G_OPT_F_BIN_INPUT:
568  Opt->key = "input";
569  Opt->type = TYPE_STRING;
570  Opt->key_desc = "name";
571  Opt->required = YES;
572  Opt->gisprompt = "old,bin,file";
573  Opt->description = _("Name of input file");
574  break;
575  case G_OPT_F_OUTPUT:
576  Opt->key = "output";
577  Opt->type = TYPE_STRING;
578  Opt->key_desc = "name";
579  Opt->required = YES;
580  Opt->gisprompt = "new,file,file";
581  Opt->description = _("Name for output file");
582  break;
583  case G_OPT_F_SEP:
584  Opt->key = "separator";
585  Opt->type = TYPE_STRING;
586  Opt->key_desc = "character";
587  Opt->required = NO;
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");
592  break;
593 
594  /* colors */
595  case G_OPT_C:
596  Opt->key = "color";
597  Opt->type = TYPE_STRING;
598  Opt->key_desc = "name";
599  Opt->required = NO;
600  Opt->answer = DEFAULT_FG_COLOR;
601  Opt->gisprompt = "old,color,color";
602  Opt->label = _("Color");
603  Opt->description =
604  _("Either a standard color name or R:G:B triplet");
605  break;
606  case G_OPT_CN:
607  Opt->key = "color";
608  Opt->type = TYPE_STRING;
609  Opt->key_desc = "name";
610  Opt->required = NO;
611  Opt->answer = DEFAULT_FG_COLOR;
612  Opt->gisprompt = "old,color_none,color";
613  Opt->label = _("Color");
614  Opt->description =
615  _("Either a standard color name, R:G:B triplet, or \"none\"");
616  break;
617 
618  /* misc */
619 
620  case G_OPT_M_DIR:
621  Opt->key = "input";
622  Opt->type = TYPE_STRING;
623  Opt->key_desc = "name";
624  Opt->required = YES;
625  Opt->gisprompt = "old,dir,dir";
626  Opt->description = _("Name of input directory");
627  break;
628 
629  case G_OPT_M_UNITS:
630  Opt->key = "units";
631  Opt->type = TYPE_STRING;
632  Opt->required = NO;
633  Opt->multiple = NO;
634  Opt->options =
635  "miles,feet,meters,kilometers,acres,hectares";
636  Opt->description = _("Units");
637  break;
638 
639  case G_OPT_M_DATATYPE:
640  Opt->key = "type";
641  Opt->key_desc = "datatype";
642  Opt->type = TYPE_STRING;
643  Opt->required = YES;
644  Opt->multiple = YES;
645  Opt->description = _("Data type(s)");
646  break;
647 
648  case G_OPT_M_MAPSET:
649  Opt->key = "mapset";
650  Opt->type = TYPE_STRING;
651  Opt->required = NO;
652  Opt->multiple = NO;
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");
657  break;
658 
659  case G_OPT_M_LOCATION:
660  Opt->key = "location";
661  Opt->type = TYPE_STRING;
662  Opt->required = NO;
663  Opt->multiple = NO;
664  Opt->label = _("Location name");
665  Opt->description = _("Location name (not location path)");
666  Opt->gisprompt = "old,location,location";
667  Opt->key_desc = "name";
668  break;
669 
670  case G_OPT_M_DBASE:
671  Opt->key = "dbase";
672  Opt->type = TYPE_STRING;
673  Opt->required = NO;
674  Opt->multiple = NO;
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";
679  break;
680 
681  case G_OPT_M_COORDS:
682  Opt->key = "coordinates";
683  Opt->type = TYPE_DOUBLE;
684  Opt->required = NO;
685  Opt->multiple = NO;
686  Opt->key_desc = "east,north";
687  Opt->gisprompt = "old,coords,coords";
688  Opt->description = _("Coordinates");
689  break;
690 
691  case G_OPT_M_COLR:
692  Opt->key = "color";
693  Opt->key_desc = "style";
694  Opt->type = TYPE_STRING;
695  Opt->required = NO;
696  Opt->options = G_color_rules_options();
697  Opt->description = _("Name of color table");
698  Opt->descriptions = G_color_rules_descriptions();
699  Opt->gisprompt = "old,colortable,colortable";
700  break;
701 
702  case G_OPT_M_NULL_VALUE:
703  Opt->key = "null_value";
704  Opt->key_desc = "string";
705  Opt->type = TYPE_STRING;
706  Opt->required = NO;
707  Opt->multiple = NO;
708  Opt->description = _("String representing NULL value");
709  break;
710 
711  case G_OPT_M_REGION:
712  Opt->key = "region";
713  Opt->type = TYPE_STRING;
714  Opt->key_desc = "name";
715  Opt->required = NO;
716  Opt->gisprompt = "old,windows,region";
717  Opt->description = _("Name of saved region");
718  break;
719 
720  /* Spatio-temporal modules of the temporal GIS framework */
721  case G_OPT_STDS_INPUT:
722  Opt->key = "input";
723  Opt->type = TYPE_STRING;
724  Opt->key_desc = "name";
725  Opt->required = YES;
726  Opt->gisprompt = "old,stds,stds";
727  Opt->description = _("Name of the input space time dataset");
728  break;
729  case G_OPT_STDS_INPUTS:
730  Opt->key = "inputs";
731  Opt->type = TYPE_STRING;
732  Opt->key_desc = "name";
733  Opt->required = YES;
734  Opt->multiple = YES;
735  Opt->gisprompt = "old,stds,stds";
736  Opt->description = _("Name of the input space time datasets");
737  break;
738  case G_OPT_STDS_OUTPUT:
739  Opt->key = "output";
740  Opt->type = TYPE_STRING;
741  Opt->key_desc = "name";
742  Opt->required = YES;
743  Opt->gisprompt = "new,stds,stds";
744  Opt->description = _("Name of the output space time dataset");
745  break;
746  case G_OPT_STRDS_INPUT:
747  Opt->key = "input";
748  Opt->type = TYPE_STRING;
749  Opt->key_desc = "name";
750  Opt->required = YES;
751  Opt->gisprompt = "old,strds,strds";
752  Opt->description = _("Name of the input space time raster dataset");
753  break;
754  case G_OPT_STRDS_INPUTS:
755  Opt->key = "inputs";
756  Opt->type = TYPE_STRING;
757  Opt->key_desc = "name";
758  Opt->required = YES;
759  Opt->multiple = YES;
760  Opt->gisprompt = "old,strds,strds";
761  Opt->description = _("Name of the input space time raster datasets");
762  break;
763  case G_OPT_STRDS_OUTPUT:
764  Opt->key = "output";
765  Opt->type = TYPE_STRING;
766  Opt->key_desc = "name";
767  Opt->required = YES;
768  Opt->gisprompt = "new,strds,strds";
769  Opt->description = _("Name of the output space time raster dataset");
770  break;
771  case G_OPT_STVDS_INPUT:
772  Opt->key = "input";
773  Opt->type = TYPE_STRING;
774  Opt->key_desc = "name";
775  Opt->required = YES;
776  Opt->gisprompt = "old,stvds,stvds";
777  Opt->description = _("Name of the input space time vector dataset");
778  break;
779  case G_OPT_STVDS_INPUTS:
780  Opt->key = "inputs";
781  Opt->type = TYPE_STRING;
782  Opt->key_desc = "name";
783  Opt->required = YES;
784  Opt->multiple = YES;
785  Opt->gisprompt = "old,stvds,stvds";
786  Opt->description = _("Name of the input space time vector datasets");
787  break;
788  case G_OPT_STVDS_OUTPUT:
789  Opt->key = "output";
790  Opt->type = TYPE_STRING;
791  Opt->key_desc = "name";
792  Opt->required = YES;
793  Opt->gisprompt = "new,stvds,stvds";
794  Opt->description = _("Name of the output space time vector dataset");
795  break;
796  case G_OPT_STR3DS_INPUT:
797  Opt->key = "input";
798  Opt->type = TYPE_STRING;
799  Opt->key_desc = "name";
800  Opt->required = YES;
801  Opt->gisprompt = "old,str3ds,str3ds";
802  Opt->description = _("Name of the input space time raster3d dataset");
803  break;
804  case G_OPT_STR3DS_INPUTS:
805  Opt->key = "inputs";
806  Opt->type = TYPE_STRING;
807  Opt->key_desc = "name";
808  Opt->required = YES;
809  Opt->multiple = YES;
810  Opt->gisprompt = "old,str3ds,str3ds";
811  Opt->description = _("Name of the input space time raster3d datasets");
812  break;
813  case G_OPT_STR3DS_OUTPUT:
814  Opt->key = "output";
815  Opt->type = TYPE_STRING;
816  Opt->key_desc = "name";
817  Opt->required = YES;
818  Opt->gisprompt = "new,str3ds,str3ds";
819  Opt->description = _("Name of the output space time raster3d dataset");
820  break;
821  case G_OPT_STDS_TYPE:
822  Opt->key = "type";
823  Opt->type = TYPE_STRING;
824  Opt->key_desc = "name";
825  Opt->required = NO;
826  Opt->answer = "strds";
827  Opt->options = "strds,stvds,str3ds";
828  Opt->description = _("Type of the input space time dataset");
829  break;
830  case G_OPT_MAP_INPUT:
831  Opt->key = "map";
832  Opt->type = TYPE_STRING;
833  Opt->key_desc = "name";
834  Opt->required = YES;
835  Opt->gisprompt = "old,map,map";
836  Opt->description = _("Name of the input map");
837  break;
838  case G_OPT_MAP_INPUTS:
839  Opt->key = "maps";
840  Opt->type = TYPE_STRING;
841  Opt->key_desc = "name";
842  Opt->required = YES;
843  Opt->multiple = YES;
844  Opt->gisprompt = "old,map,map";
845  Opt->description = _("Name of the input maps");
846  break;
847  case G_OPT_MAP_TYPE:
848  Opt->key = "type";
849  Opt->type = TYPE_STRING;
850  Opt->key_desc = "name";
851  Opt->required = NO;
852  Opt->answer = "raster";
853  Opt->options = "raster,vector,raster_3d";
854  Opt->description = _("Type of the input map");
855  break;
856  case G_OPT_T_TYPE:
857  Opt->key = "temporaltype";
858  Opt->type = TYPE_STRING;
859  Opt->key_desc = "name";
860  Opt->required = NO;
861  Opt->answer = "absolute";
862  Opt->options = "absolute,relative";
863  Opt->description = _("The temporal type of the space time dataset");
864  break;
865  case G_OPT_T_WHERE:
866  Opt->key = "where";
867  Opt->type = TYPE_STRING;
868  Opt->key_desc = "sql_query";
869  Opt->required = NO;
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'");
872  break;
873  case G_OPT_T_SAMPLE:
874  Opt->key = "sampling";
875  Opt->type = TYPE_STRING;
876  Opt->key_desc = "name";
877  Opt->required = NO;
878  Opt->multiple = YES;
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");
882  break;
883  }
884 
885  return Opt;
886 }
887 
906 struct Flag *G_define_standard_flag(int flag)
907 {
908  struct Flag *Flg;
909 
910  Flg = G_define_flag();
911 
912  switch (flag) {
913  case G_FLG_V_TABLE:
914  Flg->key = 't';
915  Flg->description = _("Do not create attribute table");
916  break;
917  case G_FLG_V_TOPO:
918  Flg->key = 'b';
919  Flg->description = _("Do not build topology");
920  break;
921  }
922 
923  return Flg;
924 }
struct Option * G_define_standard_option(int opt)
Create standardised Option structure.
int G_asprintf(char **out, const char *fmt,...)
Definition: asprintf.c:70
struct Flag * G_define_standard_flag(int flag)
Create standardised Flag structure.
struct Flag * G_define_flag(void)
Initializes a Flag struct.
Definition: parser.c:154
struct Option * G_define_option(void)
Initializes an Option struct.
Definition: parser.c:208
char * G_color_rules_descriptions(void)
Get color rules description for Option->descriptions.
Definition: color_rules.c:63
char * G_color_rules_options(void)
Get list of color rules for Option->options.
Definition: color_rules.c:25