[GRASS-SVN] r50922 - in grass/trunk: general/g.parser include lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 22 19:21:33 EST 2012


Author: huhabla
Date: 2012-02-22 16:21:33 -0800 (Wed, 22 Feb 2012)
New Revision: 50922

Modified:
   grass/trunk/general/g.parser/standard_option.c
   grass/trunk/include/gis.h
   grass/trunk/lib/gis/parser_standard_options.c
Log:
Bug fixing and a new standard option


Modified: grass/trunk/general/g.parser/standard_option.c
===================================================================
--- grass/trunk/general/g.parser/standard_option.c	2012-02-22 19:36:23 UTC (rev 50921)
+++ grass/trunk/general/g.parser/standard_option.c	2012-02-23 00:21:33 UTC (rev 50922)
@@ -146,6 +146,8 @@
 	key = G_OPT_T_TYPE;
     else if (G_strcasecmp(name, "G_OPT_T_WHERE") == 0)
 	key = G_OPT_T_WHERE;
+    else if (G_strcasecmp(name, "G_OPT_T_SAMPLE") == 0)
+	key = G_OPT_T_SAMPLE;
 
     if (key == G_OPT_UNDEFINED)
 	opt = G_define_option();

Modified: grass/trunk/include/gis.h
===================================================================
--- grass/trunk/include/gis.h	2012-02-22 19:36:23 UTC (rev 50921)
+++ grass/trunk/include/gis.h	2012-02-23 00:21:33 UTC (rev 50922)
@@ -249,6 +249,7 @@
     G_OPT_MAP_TYPE,             /* The type of an input map: raster, vect, rast3d */
     G_OPT_T_TYPE,               /* The temporal type of a space time dataset */
     G_OPT_T_WHERE,              /* A temporal GIS framework SQL WHERE statement */
+    G_OPT_T_SAMPLE,             /* Temporal sample methods */
 
 } STD_OPT;
 

Modified: grass/trunk/lib/gis/parser_standard_options.c
===================================================================
--- grass/trunk/lib/gis/parser_standard_options.c	2012-02-22 19:36:23 UTC (rev 50921)
+++ grass/trunk/lib/gis/parser_standard_options.c	2012-02-23 00:21:33 UTC (rev 50922)
@@ -709,7 +709,7 @@
 	Opt->key_desc = "name";
 	Opt->required = NO;
 	Opt->answer = "strds";
-	Opt->answer = "strds,stvds,str3ds";
+	Opt->options = "strds,stvds,str3ds";
 	Opt->description = _("Type of the input space time dataset");
 	break;
     case G_OPT_MAP_INPUT:
@@ -721,7 +721,7 @@
 	Opt->description = _("Name of the input map");
 	break;
     case G_OPT_MAP_INPUTS:
-	Opt->key = "map";
+	Opt->key = "maps";
 	Opt->type = TYPE_STRING;
 	Opt->key_desc = "name";
 	Opt->required = YES;
@@ -735,28 +735,38 @@
 	Opt->key_desc = "name";
 	Opt->required = NO;
 	Opt->answer = "rast";
-	Opt->answer = "rast,vect,rast3d";
+	Opt->options = "rast,vect,rast3d";
 	Opt->description = _("Type of the input map");
 	break;
     case G_OPT_T_TYPE:
-	Opt->key = "t_type";
+	Opt->key = "temporaltype";
 	Opt->type = TYPE_STRING;
 	Opt->key_desc = "name";
 	Opt->required = NO;
 	Opt->answer = "absolute";
-	Opt->answer = "absolute,relative";
+	Opt->options = "absolute,relative";
 	Opt->description = _("The temporal type of the space time dataset");
 	break;
     case G_OPT_T_WHERE:
-	Opt->key = "t_where";
+	Opt->key = "where";
 	Opt->type = TYPE_STRING;
 	Opt->key_desc = "sql_query";
 	Opt->required = NO;
 	Opt->label = _("WHERE conditions of SQL statement without 'where' keyword used in the temporal GIS framework");
 	Opt->description = _("Example: start_time > '2001-01-01 12:30:00'");
 	break;
+    case G_OPT_T_SAMPLE:
+	Opt->key = "sampling";
+	Opt->type = TYPE_STRING;
+	Opt->key_desc = "name";
+	Opt->required = NO;
+	Opt->multiple = YES;
+	Opt->answer = "start";
+	Opt->options = "start,during,overlap,contain,equal";
+	Opt->description = _("The method to be used for sampling the input dataset");
+	break;
     }
-
+    
     return Opt;
 }
 



More information about the grass-commit mailing list