Forráskód Böngészése

Use parser standard options

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@50924 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 13 éve
szülő
commit
e2bdc35eb3

+ 8 - 26
temporal/t.create/t.create.py

@@ -16,17 +16,17 @@
 
 #%module
 #% description: Create a space time dataset
-#% keywords: spacetime
-#% keywords: dataset
+#% keywords: temporal
 #% keywords: create
 #%end
 
-#%option
-#% key: output
-#% type: string
-#% description: Name of the new space time dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STDS_OUTPUT
+#%end
+
+#%option G_OPT_STDS_TYPE
+#%end
+
+#%option G_OPT_T_TYPE
 #%end
 
 #%option
@@ -40,24 +40,6 @@
 #%end
 
 #%option
-#% key: type
-#% type: string
-#% description: Type of the space time dataset, default is strds
-#% required: no
-#% options: strds, str3ds, stvds
-#% answer: strds
-#%end
-
-#%option
-#% key: temporaltype
-#% type: string
-#% description: The temporal type of the space time dataset, default is absolute
-#% required: no
-#% options: absolute,relative
-#% answer: absolute
-#%end
-
-#%option
 #% key: title
 #% type: string
 #% description: Title of the new space time dataset

+ 2 - 2
temporal/t.info/t.info.py

@@ -16,8 +16,8 @@
 
 #%module
 #% description: List informtion about space time and map datasets
-#% keywords: spacetime dataset
-#% keywords: remove
+#% keywords: temporal
+#% keywords: info
 #%end
 
 #%option

+ 4 - 16
temporal/t.list/t.list.py

@@ -15,9 +15,8 @@
 #############################################################################
 
 #%module
-#% description: List space time and map datasets
-#% keywords: dataset
-#% keywords: spacetime
+#% description: List space time datasets and map 
+#% keywords: temporal
 #% keywords: list
 #%end
 
@@ -50,21 +49,10 @@
 #% answer: id
 #%end
 
-#%option
-#% key: where
-#% type: string
-#% description: A where statement for selected listing without "WHERE" e.g: "start_time < '2001-01-01' AND end_time > '2001-01-01'"
-#% required: no
-#% multiple: no
+#%option G_OPT_T_WHERE
 #%end
 
-#%option
-#% key: temporaltype
-#% type: string
-#% description: The temporal type of the space time dataset, default is absolute
-#% required: no
-#% options: absolute,relative
-#% answer: absolute
+#%option G_OPT_T_TYPE
 #%end
 
 #%option

+ 7 - 26
temporal/t.register/t.register.py

@@ -16,43 +16,24 @@
 
 #%module
 #% description: Register raster, vector adn raster3d maps in a space time datasets
-#% keywords: temnporal
-#% keywords: raster
-#% keywords: vector
-#% keywords: raster3d
+#% keywords: temporal
+#% keywords: register
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of an existing space time dataset of type raster, vector or raster3d
-#% required: yes
-#% multiple: no
+#%option G_OPT_STDS_INPUT
+#% required: no
 #%end
 
-#%option
-#% key: maps
-#% type: string
-#% description: Name(s) of existing map(s) of type raster, vector or raster3d
+#%option G_OPT_MAP_INPUTS
 #% required: no
-#% multiple: yes
 #%end
 
-#%option
-#% key: type
-#% type: string
-#% description: Type of the input map(s)
-#% required: no
-#% options: rast, vect, rast3d
-#% answer: rast
+#%option G_OPT_MAP_TYPE
 #%end
 
-#%option
+#%option G_OPT_FILE_INPUT
 #% key: file
-#% type: string
 #% description: Input file with map names, one per line. Additionally the start time and the end time can be specified per line
-#% required: no
-#% multiple: no
 #%end
 
 #%option

+ 2 - 7
temporal/t.remove/t.remove.py

@@ -16,17 +16,12 @@
 
 #%module
 #% description: Remove space time datasets from temporal database
-#% keywords: spacetime
-#% keywords: dataset
+#% keywords: temporal
 #% keywords: remove
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name(s) of the space time dataset to be removed from the temporal database
+#%option G_OPT_STDS_INPUT
 #% required: no
-#% multiple: yes
 #%end
 
 #%option

+ 8 - 32
temporal/t.sample/t.sample.py

@@ -16,60 +16,36 @@
 
 #%module
 #% description: Sample the input space time dataset with a sample space time dataset and print the result to stdout
-#% keywords: dataset
-#% keywords: spacetime
-#% keywords: raster
+#% keywords: temporal
 #% keywords: sample
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STDS_INPUT
 #%end
 
-#%option
+#%option G_OPT_STDS_INPUT
 #% key: sample
-#% type: string
 #% description: Name of the sample space time dataset 
-#% required: yes
-#% multiple: no
 #%end
 
-#%option
+#%option G_OPT_STDS_TYPE
 #% key: intype
-#% type: string
-#% description: Type of the input space time dataset, default is space time raster dataset (strds)
-#% required: no
-#% options: strds, str3ds, stvds
-#% answer: strds
 #%end
 
-#%option
+#%option G_OPT_STDS_TYPE
 #% key: samtype
-#% type: string
-#% description: Type of the sample space time dataset, default is space time raster dataset (strds)
-#% required: no
-#% options: strds, str3ds, stvds
-#% answer: strds
+#% description: Type of the sample space time dataset
 #%end
 
-#%option
+#%option G_OPT_T_SAMPLE
 #% key: method
-#% type: string
-#% description: The method to be used for sampling
-#% required: no
-#% multiple: yes
-#% options: start,during,overlap,contain,equal
 #% answer: during,overlap,contain,equal
 #%end
 
 #%option
 #% key: fs
 #% type: string
-#% description: The field separator character between the columns, default is tabular " | ". Do not use "," as this char is reserved to list several map ids in a sample granule
+#% description: The field separator character between the output columns, default is tabular " | ". Do not use "," as this char is reserved to list several map ids in a sample granule
 #% required: no
 #%end
 

+ 4 - 16
temporal/t.support/t.support.py

@@ -16,17 +16,11 @@
 
 #%module
 #% description: Modify the metadata of a space time dataset
-#% keywords: spacetime
-#% keywords: dataset
-#% keywords: create
+#% keywords: temporal
+#% keywords: support
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of the space time dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STDS_INPUT
 #%end
 
 #%option
@@ -39,13 +33,7 @@
 #% answer: mean
 #%end
 
-#%option
-#% key: type
-#% type: string
-#% description: Type of the space time dataset, default is strds
-#% required: no
-#% options: strds, str3ds, stvds
-#% answer: strds
+#%option G_OPT_STDS_TYPE
 #%end
 
 #%option

+ 5 - 16
temporal/t.topology/t.topology.py

@@ -16,28 +16,17 @@
 
 #%module
 #% description: List and modify temporal topology of a space time dataset
-#% keywords: spacetime dataset
-#% keywords: remove
+#% keywords: temporal
+#% keywords: topology
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of an existing space time dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STDS_INPUT
 #%end
 
-#%option
-#% key: type
-#% type: string
-#% description: Type of the space time dataset, default is space time raster dataset (strds)
-#% required: no
-#% options: strds, str3ds, stvds
-#% answer: strds
+#%option G_OPT_STDS_TYPE
 #%end
 
-#%option G_OPT_DB_WHERE
+#%option G_OPT_T_WHERE
 #%end
 
 #%flag

+ 5 - 25
temporal/t.unregister/t.unregister.py

@@ -17,46 +17,26 @@
 #%module
 #% description: Unregister raster, vector and raster3d maps from the temporal database or a specific space time dataset
 #% keywords: temporal
-#% keywords: raster
-#% keywords: vector
-#% keywords: raster3d
-#% keywords: strds
-#% keywords: stvds
-#% keywords: str3ds
+#% keywords: unregister
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of an existing space time raster dataset. If no name is provided the raster map(s) are unregistered from all space time datasets in which they are registered.
+#%option G_OPT_STDS_INPUT
 #% required: no
-#% multiple: no
 #%end
 
-#%option
+#%option G_OPT_F_INPUT
 #% key: file
-#% type: string
 #% description: Input file with map names, one per line
 #% required: no
-#% multiple: no
 #%end
 
-#%option
-#% key: type
-#% type: string
-#% description: Type of the input map(s)
-#% required: no
-#% options: rast, vect, rast3d
-#% answer: rast
+#%option G_OPT_MAP_TYPE
 #%end
 
 
-#%option
-#% key: maps
-#% type: string
+#%option G_OPT_MAP_INPUTS
 #% description: Name(s) of existing raster, vector or raster3d map(s) to unregister
 #% required: no
-#% multiple: yes
 #%end
 
 import grass.script as grass

+ 6 - 32
temporal/tr.aggregate.ds/tr.aggregate.ds.py

@@ -16,34 +16,20 @@
 
 #%module
 #% description: Aggregated data of an existing space time raster dataset using the temporal topology of a second space time dataset
-#% keywords: spacetime raster dataset
-#% keywords: raster
+#% keywords: temporal
 #% keywords: aggregation
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time raster dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STRDS_INPUT
 #%end
 
-#%option
+#%option G_OPT_STDS_INPUT
 #% key: sample
-#% type: string
 #% description: The time intervals from this space time dataset (raster, vector or raster3d) are used for aggregation computation. 
-#% required: yes
-#% multiple: no
 #%end
 
-#%option
-#% key: type
-#% type: string
+#%option G_OPT_STDS_TYPE
 #% description: Type of the aggregation space time dataset, default is strds
-#% required: no                                                 
-#% options: strds, str3ds, stvds
-#% answer: strds                                                
 #%end                                                           
 
 #%option
@@ -64,22 +50,10 @@
 #% answer: average
 #%end
 
-#%option
-#% key: sampling
-#% type: string
-#% description: The method to be used for sampling the input dataset
-#% required: no
-#% multiple: yes
-#% options: start,during,overlap,contain,equal
-#% answer: start
+#%option G_OPT_T_SAMPLE
 #%end
 
-#%option
-#% key: base
-#% type: string
-#% description: Base name of the new created raster maps
-#% required: yes
-#% multiple: no
+#%option G_OPT_R_BASE
 #%end
 
 #%flag

+ 5 - 23
temporal/tr.aggregate/tr.aggregate.py

@@ -16,20 +16,14 @@
 
 #%module
 #% description: Create a new space time raster dataset from the aggregated data of an existing space time raster dataset
-#% keywords: spacetime raster dataset
-#% keywords: raster
+#% keywords: temporal
 #% keywords: aggregation
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time raster dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STRDS_INPUT
 #%end
 
-#%option G_OPT_DB_WHERE
+#%option G_OPT_T_WHERE
 #%end
 
 #%option
@@ -58,22 +52,10 @@
 #% answer: average
 #%end
 
-#%option
-#% key: sampling
-#% type: string
-#% description: The method to be used for sampling the input dataset
-#% required: no
-#% multiple: yes
-#% options: start,during,overlap,contain,equal
-#% answer: start
+#%option G_OPT_T_SAMPLE
 #%end
 
-#%option
-#% key: base
-#% type: string
-#% description: Base name of the new created raster maps
-#% required: yes
-#% multiple: no
+#%option G_OPT_R_BASE
 #%end
 
 #%flag

+ 4 - 20
temporal/tr.export/tr.export.py

@@ -16,26 +16,15 @@
 
 #%module
 #% description: Export space time raster dataset 
-#% keywords: dataset
-#% keywords: spacetime
-#% keywords: raster
+#% keywords: temporal
 #% keywords: export
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time raster dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STRDS_INPUT
 #%end
 
-#%option
-#% key: output
-#% type: string
+#%option G_OPT_F_OUTPUT
 #% description: Name of a space time raster dataset archive
-#% required: yes
-#% multiple: no
 #%end
 
 #%option
@@ -58,12 +47,7 @@
 #% answer: bzip2
 #%end
 
-#%option
-#% key: where
-#% type: string
-#% description: A where statement for selected listing e.g: start_time < '2001-01-01' and end_time > '2001-01-01"'
-#% required: no
-#% multiple: no
+#%option G_OPT_T_WHERE
 #%end
 
 import shutil

+ 5 - 26
temporal/tr.extract/tr.extract.py

@@ -16,25 +16,14 @@
 
 #%module
 #% description: Extract a subset of a space time raster dataset
-#% keywords: spacetime raster dataset
-#% keywords: raster
+#% keywords: temporal
 #% keywords: extract
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time raster dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STRDS_INPUT
 #%end
 
-#%option
-#% key: where
-#% type: string
-#% description: A where statement for selected listing without "WHERE" e.g: "start_time < '2001-01-01' AND end_time > '2001-01-01'"
-#% required: no
-#% multiple: no
+#%option G_OPT_T_WHERE
 #%end
 
 #%option
@@ -45,20 +34,10 @@
 #% multiple: no
 #%end
 
-#%option
-#% key: output
-#% type: string
-#% description: Name of the output space time raster dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STRDS_OUTPUT
 #%end
 
-#%option
-#% key: base
-#% type: string
-#% description: Base name of the new created raster maps
-#% required: no
-#% multiple: no
+#%option G_OPT_R_BASE
 #%end
 
 #%flag

+ 3 - 15
temporal/tr.import/tr.import.py

@@ -16,26 +16,14 @@
 
 #%module
 #% description: Import space time raster dataset 
-#% keywords: dataset
-#% keywords: spacetime
-#% keywords: raster
+#% keywords: temporal
 #% keywords: import
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time raster dataset archive file
-#% required: yes
-#% multiple: no
+#%option G_OPT_F_INPUT
 #%end
 
-#%option
-#% key: output
-#% type: string
-#% description: Name of a space time raster dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STRDS_OUTPUT
 #%end
 
 #%option

+ 3 - 14
temporal/tr.list/tr.list.py

@@ -16,18 +16,12 @@
 
 #%module
 #% description: List registered maps of a space time raster dataset 
-#% keywords: dataset
-#% keywords: spacetime
+#% keywords: temporal
 #% keywords: raster
 #% keywords: list
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time raster dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STRDS_INPUT
 #%end
 
 #%option
@@ -50,12 +44,7 @@
 #% answer: name,mapset,start_time,end_time
 #%end
 
-#%option
-#% key: where
-#% type: string
-#% description: A where statement for selected listing without "WHERE" e.g: "start_time < '2001-01-01' AND end_time > '2001-01-01'"
-#% required: no
-#% multiple: no
+#%option G_OPT_T_WHERE
 #%end
 
 #%option

+ 3 - 17
temporal/tr.out.vtk/tr.out.vtk.py

@@ -23,12 +23,7 @@
 #% keywords: VTK
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time raster dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STRDS_INPUT
 #%end
 
 #%option
@@ -39,20 +34,11 @@
 #% multiple: no
 #%end
 
-#%option G_OPT_R_INPUT
-#% key: elevation
-#% type: string
-#% description: Elevation raster map
+#%option G_OPT_R_ELEV
 #% required: no
-#% multiple: no
 #%end
 
-#%option
-#% key: where
-#% type: string
-#% description: A where statement for selected listing e.g: (start_time < '2001-01-01' and end_time > '2001-01-01')
-#% required: no
-#% multiple: no
+#%option G_OPT_T_WHERE
 #%end
 
 #%option

+ 4 - 10
temporal/tr.series/tr.series.py

@@ -16,17 +16,11 @@
 
 #%module
 #% description: Performe different aggregation algorithms from r.series on all or a subset of raster maps in a space time raster dataset
-#% keywords: spacetime raster dataset
-#% keywords: raster
-#% keywords: extract
+#% keywords: temporal
+#% keywords: series
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of an existing space time raster dataset
-#% required: no
-#% multiple: yes
+#%option G_OPT_STRDS_INPUT
 #%end
 
 #%option
@@ -49,7 +43,7 @@
 #% answer: id
 #%end
 
-#%option G_OPT_DB_WHERE
+#%option G_OPT_T_WHERE
 #%end
 
 #%option G_OPT_R_OUTPUT

+ 3 - 9
temporal/tr.to.rast3/tr.to.rast3.py

@@ -16,18 +16,12 @@
 
 #%module
 #% description: Convert a space time raster dataset into a rast3d map
-#% keywords: dataset
-#% keywords: spacetime
-#% keywords: raster
+#% keywords: temporal
 #% keywords: raster3d
+#% keywords: convert
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time raster dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STRDS_INPUT
 #%end
 
 #%option G_OPT_R3_OUTPUT

+ 3 - 8
temporal/tr.univar/tr.univar.py

@@ -21,21 +21,16 @@
 #% keywords: statistics
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time raster dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STRDS_INPUT
 #%end
 
-#%option G_OPT_DB_WHERE
+#%option G_OPT_T_WHERE
 #%end
 
 #%option
 #% key: fs
 #% type: string
-#% description: The field separator character between the columns
+#% description: The field separator character between the output columns
 #% required: no
 #% answer: |
 #%end

+ 4 - 20
temporal/tr3.extract/tr3.extract.py

@@ -16,25 +16,14 @@
 
 #%module
 #% description: Extract a subset of a space time raster3d dataset
-#% keywords: spacetime raster3d dataset
-#% keywords: raster3d
+#% keywords: temporal
 #% keywords: extract
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time raster3d dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STR3DS_INPUT
 #%end
 
-#%option
-#% key: where
-#% type: string
-#% description: A where statement for selected listing without "WHERE" e.g: "start_time < '2001-01-01' AND end_time > '2001-01-01'"
-#% required: no
-#% multiple: no
+#%option G_OPT_T_WHERE
 #%end
 
 #%option
@@ -45,12 +34,7 @@
 #% multiple: no
 #%end
 
-#%option
-#% key: output
-#% type: string
-#% description: Name of the output space time raster3d dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STR3DS_OUTPUT
 #%end
 
 #%option

+ 3 - 13
temporal/tr3.list/tr3.list.py

@@ -22,12 +22,7 @@
 #% keywords: list
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time raster3d dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STR3DS_INPUT
 #%end
 
 #%option
@@ -50,12 +45,7 @@
 #% answer: name,mapset,start_time,end_time
 #%end
 
-#%option
-#% key: where
-#% type: string
-#% description: A where statement for selected listing e.g: "start_time < '2001-01-01' and end_time > '2001-01-01'"
-#% required: no
-#% multiple: no
+#%option G_OPT_T_WHERE
 #%end
 
 #%option
@@ -71,7 +61,7 @@
 #%option
 #% key: fs
 #% type: string
-#% description: The field separator character between the columns, default is tabular "\t"
+#% description: The field separator character between the output columns, default is tabular "\t"
 #% required: no
 #%end
 

+ 3 - 15
temporal/tv.list/tv.list.py

@@ -16,18 +16,11 @@
 
 #%module
 #% description: List registered maps of a space time vector dataset 
-#% keywords: dataset
-#% keywords: spacetime
-#% keywords: vector
+#% keywords: temporal
 #% keywords: list
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time vector dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STVDS_INPUT
 #%end
 
 #%option
@@ -50,12 +43,7 @@
 #% answer: id,name,layer,mapset,start_time,end_time
 #%end
 
-#%option
-#% key: where
-#% type: string
-#% description: A where statement for selected listing without "WHERE" e.g: "start_time < '2001-01-01' AND end_time > '2001-01-01'"
-#% required: no
-#% multiple: no
+#%option G_OPT_T_WHERE
 #%end
 
 #%option

+ 6 - 21
temporal/tv.observe.strds/tv.observe.strds.py

@@ -16,17 +16,11 @@
 
 #%module
 #% description: Observe specific locations in a space time raster dataset over a periode of time using vector points
-#% keywords: space time raster dataset
-#% keywords: space time vector dataset
+#% keywords: temporal
 #% keywords: sampling
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a vector map
-#% required: yes
-#% multiple: no
+#%option G_OPT_STVDS_INPUT
 #%end
 
 #%option
@@ -53,20 +47,11 @@
 #% multiple: no
 #%end
 
-#%option
-#% key: where
-#% type: string
-#% description: A where statement for attribute selection related to the input dataset without "WHERE" e.g: "cat < 200"
-#% required: no
-#% multiple: no
+#%option G_OPT_DB_WHERE
 #%end
 
-#%option
-#% key: tempwhere
-#% type: string
-#% description: A where statement for temporal selection related to the input dataset without "WHERE" e.g: "start_time < '2001-01-01' AND end_time > '2001-01-01'"
-#% required: no
-#% multiple: no
+#%option G_OPT_T_WHERE
+#% key: t_where
 #%end
 
 import grass.script as grass
@@ -83,7 +68,7 @@ def main():
     strds = options["strds"]
     where = options["where"]
     column = options["column"]
-    tempwhere = options["tempwhere"]
+    tempwhere = options["t_where"]
 
     if where == "" or where == " " or where == "\n":
         where = None

+ 8 - 34
temporal/tv.what.strds/tv.what.strds.py

@@ -16,25 +16,15 @@
 
 #%module
 #% description: Uploads raster map values at spatial and temporal positions of vector points to the tables. The maps are registered in space time datasets
-#% keywords: space time vector dataset
-#% keywords: space time raster dataset
+#% keywords: temporal
 #% keywords: sampling
 #%end
 
-#%option
-#% key: input
-#% type: string
-#% description: Name of a space time vector dataset
-#% required: yes
-#% multiple: no
+#%option G_OPT_STVDS_INPUT
 #%end
 
-#%option
+#%option  G_OPT_STRDS_INPUT
 #% key: strds
-#% type: string
-#% description: The space time raster dataset to use
-#% required: yes
-#% multiple: no
 #%end
 
 #%option
@@ -45,30 +35,14 @@
 #% multiple: no
 #%end
 
-#%option
-#% key: where
-#% type: string
-#% description: A where statement for attribute selection related to the input dataset without "WHERE" e.g: "cat < 200"
-#% required: no
-#% multiple: no
+#%option G_OPT_DB_WHERE
 #%end
 
-#%option
-#% key: tempwhere
-#% type: string
-#% description: A where statement for temporal selection related to the input dataset without "WHERE" e.g: "start_time < '2001-01-01' AND end_time > '2001-01-01'"
-#% required: no
-#% multiple: no
+#%option G_OPT_T_WHERE
+#% key: t_where
 #%end
 
-#%option
-#% key: sampling
-#% type: string
-#% description: The method to be used for temporal sampling
-#% required: no
-#% multiple: yes
-#% options: start,during,overlap,contain,equal
-#% answer: start
+#%option G_OPT_T_SAMPLE
 #%end
 
 
@@ -85,7 +59,7 @@ def main():
     strds = options["strds"]
     where = options["where"]
     column = options["column"]
-    tempwhere = options["tempwhere"]
+    tempwhere = options["t_where"]
     sampling = options["sampling"]
 
     if where == "" or where == " " or where == "\n":