Browse Source

Docs partly updated and polished.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48695 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 13 năm trước cách đây
mục cha
commit
7978896479

+ 113 - 38
lib/python/temporal/abstract_datasets.py

@@ -1,4 +1,4 @@
-"""!@package grass.script.tgis_abstract_datasets
+"""!@package grass.temporal
 
 @brief GRASS Python scripting module (temporal GIS functions)
 
@@ -29,7 +29,10 @@ class abstract_dataset(object):
     """This is the base class for all datasets (raster, vector, raster3d, strds, stvds, str3ds)"""
 
     def reset(self, ident):
-	"""Reset the internal structure and set the identifier"""
+	"""Reset the internal structure and set the identifier
+
+           @param ident: The identifier of the dataset
+        """
 	raise IOError("This method must be implemented in the subclasses")
 
     def get_type(self):
@@ -37,7 +40,10 @@ class abstract_dataset(object):
         raise IOError("This method must be implemented in the subclasses")
     
     def get_new_instance(self, ident):
-        """Return a new instance with the type of this class"""
+        """Return a new instance with the type of this class
+
+           @param ident: The identifier of the dataset
+        """
         raise IOError("This method must be implemented in the subclasses")
 
     def get_id(self):
@@ -121,6 +127,8 @@ class abstract_dataset(object):
     def update_all(self, dbif=None):
 	"""Update temporal dataset entry of database from the internal structure
 	   and include None varuables.
+
+           @param dbif: The database interface to be used
 	"""
 	self.base.update_all(dbif)
 	if self.is_time_absolute():
@@ -227,7 +235,10 @@ class abstract_map_dataset(abstract_dataset):
     """
       
     def get_new_stds_instance(self, ident):
-        """Return a new space time dataset instance in which maps are stored with the type of this class"""
+        """Return a new space time dataset instance in which maps are stored with the type of this class
+
+           @param ident: The identifier of the dataset
+        """
         raise IOError("This method must be implemented in the subclasses")
     
     def get_stds_register(self):
@@ -235,15 +246,20 @@ class abstract_map_dataset(abstract_dataset):
         raise IOError("This method must be implemented in the subclasses")
         
     def set_stds_register(self, name):
-        """Set the space time dataset register table name in which stds are listed in which this map is registered"""
+        """Set the space time dataset register table name.
+        
+           This table stores all space time datasets in which this map is registered.
+
+           @param ident: The name of the register table
+        """
         raise IOError("This method must be implemented in the subclasses")
         
     def set_absolute_time(self, start_time, end_time=None, timezone=None):
         """Set the absolute time interval with start time and end time
         
-           @start_time a datetime object specifying the start time of the map
-           @end_time a datetime object specifying the end time of the map
-           @timezone Thee timezone of the map
+           @param start_time: a datetime object specifying the start time of the map
+           @param end_time: a datetime object specifying the end time of the map
+           @param timezone: Thee timezone of the map
         
         """
         if start_time != None and not isinstance(start_time, datetime) :
@@ -268,9 +284,9 @@ class abstract_map_dataset(abstract_dataset):
     def update_absolute_time(self, start_time, end_time=None, timezone=None, dbif = None):
         """Update the absolute time
 
-           @start_time a datetime object specifying the start time of the map
-           @end_time a datetime object specifying the end time of the map
-           @timezone Thee timezone of the map
+           @param start_time: a datetime object specifying the start time of the map
+           @param end_time: a datetime object specifying the end time of the map
+           @param timezone: Thee timezone of the map
         """
         connect = False
 
@@ -289,8 +305,8 @@ class abstract_map_dataset(abstract_dataset):
     def set_relative_time(self, start_time, end_time=None):
         """Set the relative time interval 
         
-           @start_time A double value in days
-           @end_time A double value in days
+           @param start_time: A double value in days
+           @param end_time: A double value in days
 
         """
         if start_time != None and end_time != None:
@@ -309,10 +325,11 @@ class abstract_map_dataset(abstract_dataset):
         return True
 
     def update_relative_time(self, start_time, end_time=None, dbif = None):
-        """Set the relative time interval
-
-           @interval A double value in days
+        """Update the relative time interval
 
+           @param start_time: A double value in days
+           @param end_time: A double value in days
+           @param dbif: The database interface to be used
         """
         connect = False
 
@@ -329,7 +346,15 @@ class abstract_map_dataset(abstract_dataset):
             dbif.close()
 
     def set_spatial_extent(self, north, south, east, west, top=0, bottom=0):
-        """Set the spatial extent of the map"""
+        """Set the spatial extent of the map
+
+           @param north: The northern edge
+           @param south: The southern edge
+           @param east: The eastern edge
+           @param west: The western edge
+           @param top: The top edge
+           @param bottom: The bottom ege
+        """
         self.spatial_extent.set_spatial_extent(north, south, east, west, top, bottom)
         
     def delete(self, dbif=None):
@@ -338,6 +363,8 @@ class abstract_map_dataset(abstract_dataset):
             Remove dependent entries:
             * Remove the map entry in each space time dataset in which this map is registered
             * Remove the space time dataset register table
+            
+           @param dbif: The database interface to be used
         """
 
         connect = False
@@ -373,6 +400,8 @@ class abstract_map_dataset(abstract_dataset):
 
     def unregister(self, dbif=None):
 	""" Remove the map entry in each space time dataset in which this map is registered
+
+           @param dbif: The database interface to be used
         """
 
         core.verbose(_("Unregister %s dataset <%s> from space time datasets") % (self.get_type(), self.get_id()))
@@ -404,8 +433,10 @@ class abstract_map_dataset(abstract_dataset):
             
     def get_registered_datasets(self, dbif=None):
         """Return all space time dataset ids in which this map is registered as
-          sqlite3 rows with column "id" or None if this map is not registered in any
-          space time dataset.
+           dictionary like rows with column "id" or None if this map is not registered in any
+           space time dataset.
+
+           @param dbif: The database interface to be used
         """
         connect = False
 
@@ -436,7 +467,7 @@ class abstract_space_time_dataset(abstract_dataset):
     """Abstract space time dataset class
 
        This class represents a space time dataset. Convenient functions
-       to select, update, insert or delete objects of this type int the SQL
+       to select, update, insert or delete objects of this type in the SQL
        temporal database exists as well as functions to register or unregister
        raster maps.
 
@@ -447,12 +478,18 @@ class abstract_space_time_dataset(abstract_dataset):
     def __init__(self, ident):
 	self.reset(ident)
 
-    def get_new_instance(self, ident):
-        """Return a new instance with the type of this class"""
+    def get_new_instance(self, ident=None):
+        """Return a new instance with the type of this class
+
+           @param ident: The unique identifier of the new object
+        """
         raise IOError("This method must be implemented in the subclasses")
 
-    def get_new_map_instance(self, ident):
-        """Return a new instance of a map dataset which is associated with the type of this class"""
+    def get_new_map_instance(self, ident=None):
+        """Return a new instance of a map dataset which is associated with the type of this class
+
+           @param ident: The unique identifier of the new object
+        """
         raise IOError("This method must be implemented in the subclasses")
 
     def get_map_register(self):
@@ -460,11 +497,26 @@ class abstract_space_time_dataset(abstract_dataset):
         raise IOError("This method must be implemented in the subclasses")
 
     def set_map_register(self, name):
-        """Set the name of the map register table"""
+        """Set the name of the map register table
+
+        This table stores all map names which are registered in this space time dataset.
+
+           @param name: The name of the register table
+        """
         raise IOError("This method must be implemented in the subclasses")
 
     def set_initial_values(self, granularity, temporal_type, semantic_type, \
                            title=None, description=None):
+        """Set the initial values of the space time dataset
+
+           @param granularity: The temporal granularity of this dataset. This value
+                               should be computed by the space time dataset itself,
+                               based on the granularity of the registered maps
+           @param temporal_type: The temporal type of this space time dataset (absolute or relative)
+           @param semantic_type: The semantic type of this dataset
+           @param title: The title
+           @param description: The description of this dataset
+        """
 
         if temporal_type == "absolute":
             self.set_time_to_absolute()
@@ -496,7 +548,12 @@ class abstract_space_time_dataset(abstract_dataset):
         return granularity, temporal_type, semantic_type, title, description
 
     def get_temporal_relation_matrix(self, dbif=None):
-        """Return the temporal relation matrix of all registered maps as list
+        """Return the temporal relation matrix of all registered maps as listof lists
+
+           The temproal relation matrix includes the temporal relations between
+           all registered maps. The relations are strings stored in a list of lists.
+           
+           @param dbif: The database interface to be used
         """
 
         connect = False
@@ -508,7 +565,7 @@ class abstract_space_time_dataset(abstract_dataset):
 
         matrix = []
 
-        maps = self.get_registered_maps_as_objects(dbif=dbif, where=None, order="start_time")
+        maps = self.get_registered_maps_as_objects(where=None, order="start_time", dbif=dbif)
 
         # Create the temporal relation matrix
         # Add the map names first
@@ -528,10 +585,12 @@ class abstract_space_time_dataset(abstract_dataset):
 
         return matrix
 
-    def get_registered_maps_as_objects(self, dbif=None, where = None, order = None):
+    def get_registered_maps_as_objects(self, where = None, order = None, dbif=None):
         """Return all registered maps as ordered object list
 
-           Each row includes all columns specified in the datatype specific view
+           @param where: The SQL where statement to select a subset of the registered maps without "WHERE"
+           @param order: The SQL order statement to be used to order the objects in the list without "ORDER BY"
+           @param dbif: The database interface to be used
 
            In case nothing found None is returned
         """
@@ -545,7 +604,7 @@ class abstract_space_time_dataset(abstract_dataset):
 
         obj_list = []
         
-        rows = self.get_registered_maps(dbif, where, order)
+        rows = self.get_registered_maps(where, order, dbif)
 
         if rows:
             for row in rows:
@@ -558,11 +617,15 @@ class abstract_space_time_dataset(abstract_dataset):
 
         return obj_list
 
-    def get_registered_maps(self, dbif=None, where = None, order = None):
+    def get_registered_maps(self, where = None, order = None, dbif=None):
         """Return sqlite rows of all registered maps.
         
            Each row includes all columns specified in the datatype specific view
-        
+
+           @param where: The SQL where statement to select a subset of the registered maps without "WHERE"
+           @param order: The SQL order statement to be used to order the objects in the list without "ORDER BY"
+           @param dbif: The database interface to be used
+
            In case nothing found None is returned
         """
 
@@ -604,7 +667,10 @@ class abstract_space_time_dataset(abstract_dataset):
         return rows
 
     def delete(self, dbif=None):
-        """Delete a space time dataset from the database"""
+        """Delete a space time dataset from the temporal database
+
+           @param dbif: The database interface to be used
+        """
         # First we need to check if maps are registered in this dataset and
         # unregister them
 
@@ -618,7 +684,7 @@ class abstract_space_time_dataset(abstract_dataset):
             connect = True
 
         if self.get_map_register():
-            rows = self.get_registered_maps(dbif)
+            rows = self.get_registered_maps(None, None, dbif)
             # Unregister each registered map in the table
             if rows:
                 for row in rows:
@@ -643,13 +709,15 @@ class abstract_space_time_dataset(abstract_dataset):
             dbif.close()
             
     def register_map(self, map, dbif=None):
-        """Register a map in the space time dataset.
+        """ Register a map in the space time dataset.
 
             This method takes care of the registration of a map
             in a space time dataset.
 
             In case the map is already registered this function will break with a warning
             and return False
+
+           @param dbif: The database interface to be used
         """
         connect = False
 
@@ -849,8 +917,11 @@ class abstract_space_time_dataset(abstract_dataset):
     def unregister_map(self, map, dbif = None):
         """Unregister a map from the space time dataset.
 
-            This method takes care of the unregistration of a map
-            from a space time dataset.
+           This method takes care of the unregistration of a map
+           from a space time dataset.
+
+           @param map: The map object to unregister
+           @param dbif: The database interface to be used
         """
         connect = False
 
@@ -912,12 +983,14 @@ class abstract_space_time_dataset(abstract_dataset):
 
            The update of the temporal extent checks if the end time is set correctly.
            In case the registered maps have no valid end time (None) the maximum start time
-           will be used. If the end time is smaller than the maximum start time, it will
+           will be used. If the end time is earlier than the maximum start time, it will
            be replaced by the maximum start time.
 
            An other solution to automate this is to use the diactivated trigger
            in the SQL files. But this will result in a huge performance issue
            in case many maps are registred (>1000).
+           
+           @param dbif: The database interface to be used
         """
         core.verbose(_("Update metadata, spatial and temporal extent from all registered maps of <%s>") % (self.get_id()))
 
@@ -1067,5 +1140,7 @@ class abstract_space_time_dataset(abstract_dataset):
                 self.relative_time.set_map_time(None)
             self.relative_time.update_all(dbif)
 
+        # TODO: Compute the granularity of the dataset and update the database entry
+
         if connect == True:
             dbif.close()

+ 102 - 17
lib/python/temporal/base.py

@@ -1,4 +1,4 @@
-"""!@package grass.script.tgis_base
+"""!@package grass.temporal
 
 @brief GRASS Python scripting module (temporal GIS functions)
 
@@ -115,7 +115,7 @@ class dict_sql_serializer(object):
 	    if where:
 	        sql += where
 
-	# Create update statement
+	# Create update statement for all entries
 	if type =="UPDATE ALL":
 	    count = 0
 	    sql += 'UPDATE ' + table + ' SET '
@@ -140,13 +140,16 @@ class dict_sql_serializer(object):
     	return sql, tuple(args)
 
     def deserialize(self, row):
-	"""Convert the content of the dbmi row into the internal dictionary"""
+	"""Convert the content of the dbmi dictionary like row into the internal dictionary
+
+           @param row: The dixtionary like row to stoe in the internal dict
+        """
 	self.D = {}
 	for key in row.keys():
 	    self.D[key] = row[key]
 
     def clear(self):
-	"""Remove all the content of this class"""
+	"""Inititalize the internal storage"""
 	self.D = {}
 
     def print_self(self):
@@ -171,8 +174,27 @@ class dict_sql_serializer(object):
 ###############################################################################
 
 class sql_database_interface(dict_sql_serializer):
-    """This is the sql database interface"""
+    """This class represents the SQL database interface
+
+       Functions to insert, select and update the internal structure of this class
+       in the temporal database are implemented. The following DBMS are supported:
+       * sqlite via the sqlite3 standard library
+       * postgresql via psycopg2
+
+       This is the base class for raster, raster3d, vector and space time datasets
+       data management classes:
+       * Identification information (base)
+       * Spatial extent
+       * Temporal extent
+       * Metadata
+    """
     def __init__(self, table=None, ident=None, database=None):
+        """Constructor of this class
+
+           @param table: The name of the table
+           @param ident: The identifier (primary key) of this object in the database table
+           @param database: A specific string used in the dbmi connect method. This should be the path to the database , user name, ...
+        """
         dict_sql_serializer.__init__(self)
 
         self.table = table # Name of the table, set in the subclass
@@ -183,9 +205,14 @@ class sql_database_interface(dict_sql_serializer):
         self.ident = ident
 
     def get_table_name(self):
+        """Return the name of the table in which the internal data are inserted, updated or selected"""
         return self.table
 
     def connect(self):
+        """Connect to the DBMI to execute SQL statements
+
+           Supported backends are sqlite3 and postgresql
+        """
         #print "Connect to",  self.database
         if dbmi.__name__ == "sqlite3":
 	    self.connection = dbmi.connect(self.database, detect_types=dbmi.PARSE_DECLTYPES|dbmi.PARSE_COLNAMES)
@@ -198,6 +225,7 @@ class sql_database_interface(dict_sql_serializer):
 	    self.cursor = self.connection.cursor(cursor_factory=dbmi.extras.DictCursor)
 
     def close(self):
+        """Close the DBMI connection"""
         #print "Close connection to",  self.database
 	self.connection.commit()
         self.cursor.close()
@@ -206,6 +234,7 @@ class sql_database_interface(dict_sql_serializer):
 	return "DELETE FROM " + self.get_table_name() + " WHERE id = \'" + str(self.ident) + "\'"
 
     def delete(self, dbif=None):
+        """Delete the entry of this object from the temporal database"""
 	sql = self.get_delete_statement()
         #print sql
         
@@ -220,6 +249,10 @@ class sql_database_interface(dict_sql_serializer):
 	return "SELECT id FROM " + self.get_table_name() + " WHERE id = \'" + str(self.ident) + "\'"
 
     def is_in_db(self, dbif=None):
+        """Check if this object is present in the temporal database
+
+           @param dbif: The database interface to be used
+        """
 
 	sql = self.get_is_in_db_statement()
         #print sql
@@ -243,6 +276,11 @@ class sql_database_interface(dict_sql_serializer):
 	return self.serialize("SELECT", self.get_table_name(), "WHERE id = \'" + str(self.ident) + "\'")
 
     def select(self, dbif=None):
+        """Select the content from the temporal database and store it
+           in the internal dictionary structure
+
+           @param dbif: The database interface to be used
+        """
 	sql, args = self.get_select_statement()
 	#print sql
 	#print args
@@ -269,7 +307,7 @@ class sql_database_interface(dict_sql_serializer):
 	if len(row) > 0:
 	    self.deserialize(row)
 	else:
-	    raise IOError
+            core.fatal(_("Object <%s> not found in the temporal database") % self.get_id())
 
 	return True
 
@@ -277,6 +315,11 @@ class sql_database_interface(dict_sql_serializer):
 	return self.serialize("INSERT", self.get_table_name())
 
     def insert(self, dbif=None):
+        """Serialize the content of this object and store it in the temporal
+           database using the internal identifier
+
+           @param dbif: The database interface to be used
+        """
 	sql, args = self.get_insert_statement()
 	#print sql
 	#print args
@@ -292,6 +335,13 @@ class sql_database_interface(dict_sql_serializer):
 	return self.serialize("UPDATE", self.get_table_name(), "WHERE id = \'" + str(self.ident) + "\'")
 
     def update(self, dbif=None):
+        """Serialize the content of this object and update it in the temporal
+           database using the internal identifier
+
+           Only object entries which are exists (not None) are updated
+
+           @param dbif: The database interface to be used
+        """
 	if self.ident == None:
 	    raise IOError("Missing identifer");
 
@@ -310,6 +360,11 @@ class sql_database_interface(dict_sql_serializer):
 	return self.serialize("UPDATE ALL", self.get_table_name(), "WHERE id = \'" + str(self.ident) + "\'")
 
     def update_all(self, dbif=None):
+        """Serialize the content of this object, including None objects, and update it in the temporal
+           database using the internal identifier
+
+           @param dbif: The database interface to be used
+        """
 	if self.ident == None:
 	    raise IOError("Missing identifer");
 
@@ -327,7 +382,7 @@ class sql_database_interface(dict_sql_serializer):
 ###############################################################################
 
 class dataset_base(sql_database_interface):
-    """This is the base class for all maps and spacetime datasets storing basic information"""
+    """This is the base class for all maps and spacetime datasets storing basic identification information"""
     def __init__(self, table=None, ident=None, name=None, mapset=None, creator=None, ctime=None,\
 		    mtime=None, ttype=None, revision=1):
 
@@ -343,31 +398,49 @@ class dataset_base(sql_database_interface):
 	#self.set_revision(revision)
 
     def set_id(self, ident):
-	"""Convenient method to set the unique identifier (primary key)"""
+	"""Convenient method to set the unique identifier (primary key)
+
+           @param ident: The unique identififer should be a combination of the dataset name and the mapset name@mapset
+        """
 	self.ident = ident
 	self.D["id"] = ident
 
     def set_name(self, name):
-	"""Set the name of the map"""
+	"""Set the name of the dataset
+
+           @param name: The name of the dataset
+        """
 	self.D["name"] = name
 
     def set_mapset(self, mapset):
-	"""Set the mapset of the map"""
+	"""Set the mapset of the dataset
+
+           @param mapsets: The name of the mapset in whoch this dataset is stored
+        """
 	self.D["mapset"] = mapset
 
     def set_creator(self, creator):
-	"""Set the creator of the map"""
+	"""Set the creator of the dataset
+
+           @param creator: The name of the creator
+        """
 	self.D["creator"] = creator
 
     def set_ctime(self, ctime=None):
-	"""Set the creation time of the map, if nothing set the current time is used"""
+	"""Set the creation time of the dataset, if nothing set the current time is used
+
+           @param ctime: The current time of type datetime
+        """
 	if ctime == None:
             self.D["creation_time"] = datetime.now()
 	else:
             self.D["creation_time"] = ctime
 
     def set_ttype(self, ttype):
-	"""Set the temporal type of the map: absolute or relative, if nothing set absolute time will assumed"""
+	"""Set the temporal type of the dataset: absolute or relative, if nothing set absolute time will assumed
+
+           @param ttype: The temporal type of the dataset "absolute or relative"
+        """
 	if ttype == None or (ttype != "absolute" and ttype != "relative"):
 	    self.D["temporal_type"] = "absolute"
         else:
@@ -386,6 +459,7 @@ class dataset_base(sql_database_interface):
 
     def get_id(self):
 	"""Convenient method to get the unique identifier (primary key)
+        
 	   @return None if not found
 	"""
 	if self.D.has_key("id"):
@@ -394,7 +468,7 @@ class dataset_base(sql_database_interface):
 	    return None
 
     def get_name(self):
-	"""Get the name of the map
+	"""Get the name of the dataset
 	   @return None if not found"""
 	if self.D.has_key("name"):
 	    return self.D["name"]
@@ -402,7 +476,7 @@ class dataset_base(sql_database_interface):
 	    return None
 
     def get_mapset(self):
-	"""Get the mapset of the map
+	"""Get the name of mapset of this dataset
 	   @return None if not found"""
 	if self.D.has_key("mapset"):
 	    return self.D["mapset"]
@@ -410,7 +484,7 @@ class dataset_base(sql_database_interface):
 	    return None
 
     def get_creator(self):
-	"""Get the creator of the map
+	"""Get the creator of the dataset
 	   @return None if not found"""
 	if self.D.has_key("creator"):
 	    return self.D["creator"]
@@ -418,7 +492,7 @@ class dataset_base(sql_database_interface):
 	    return None
 
     def get_ctime(self):
-	"""Get the creation time of the map, datatype is datetime
+	"""Get the creation time of the dataset, datatype is datetime
 	   @return None if not found"""
 	if self.D.has_key("creation_time"):
 	    return self.D["creation_time"]
@@ -515,6 +589,17 @@ class stds_base(dataset_base):
         else:
 	    return None
 
+    def print_info(self):
+        """Print information about this class in human readable style"""
+        dataset_base.print_info(self)
+        #      0123456789012345678901234567890
+        print " | Semantic type:.............. " + str(self.get_semantic_type())
+
+    def print_shell_info(self):
+        """Print information about this class in shell style"""
+        dataset_base.print_shell_info(self)
+        print "semantic_type=" + str(self.get_semantic_type())
+
 ###############################################################################
 
 class strds_base(stds_base):

+ 5 - 2
lib/python/temporal/core.py

@@ -1,4 +1,4 @@
-"""!@package grass.script.tgis_core
+"""!@package grass.temporal
 
 @brief GRASS Python scripting module (temporal GIS functions)
 
@@ -162,7 +162,10 @@ def increment_datetime(mydate, years=0, months=0, weeks=0, days=0, hours=0, minu
 
 def create_temporal_database():
     """This function creates the grass location database structure for raster, vector and raster3d maps
-    as well as for the space-time datasets strds, str3ds and stvds"""
+       as well as for the space-time datasets strds, str3ds and stvds
+
+       This functions must be called befor any spatio-temporal processing is started
+    """
     
     database = get_grass_location_db_path()
 

+ 1 - 1
lib/python/temporal/metadata.py

@@ -1,4 +1,4 @@
-"""!@package grass.script.tgis_metadata
+"""!@package grass.temporal
 
 @brief GRASS Python scripting module (temporal GIS functions)
 

+ 27 - 26
lib/python/temporal/space_time_datasets.py

@@ -1,4 +1,4 @@
-"""!@package grass.script.tgis_space_time_dataset
+"""!@package grass.temporal
 
 @brief GRASS Python scripting module (temporal GIS functions)
 
@@ -383,13 +383,13 @@ def register_maps_in_space_time_dataset(type, name, maps, start=None, increment=
        It takes care of the correct update of the space time datasets from all
        registered maps.
 
-       @type The type of the maps raster, raster3d or vector
-       @name The name of the space time dataset
-       @maps A comma separated list of map names
-       @start The start date and time of the first raster map, in case the map has no date (format absolute: "yyyy-mm-dd HH:MM:SS" or "yyyy-mm-dd", format relative 5.0)
-       @increment Time increment between maps for time stamp creation (format absolute: NNN seconds, minutes, hours, days, weeks, months, years; format relative: 1.0)
-       @dbif The database interface to use for sql queries
-       @interval If True, time intervals are created in case the start time and an increment is provided
+       @param type: The type of the maps raster, raster3d or vector
+       @param name: The name of the space time dataset
+       @param maps: A comma separated list of map names
+       @param start: The start date and time of the first raster map, in case the map has no date (format absolute: "yyyy-mm-dd HH:MM:SS" or "yyyy-mm-dd", format relative 5.0)
+       @param increment: Time increment between maps for time stamp creation (format absolute: NNN seconds, minutes, hours, days, weeks, months, years; format relative: 1.0)
+       @param dbif: The database interface to be used
+       @param interval: If True, time intervals are created in case the start time and an increment is provided
     """
 
     # We may need the mapset
@@ -485,9 +485,10 @@ def unregister_maps_from_space_time_datasets(type, name, maps, dbif = None):
     """Unregister maps from a single space time dataset or, in case no dataset name is provided,
        unregister from all datasets within the maps are registered.
 
-       @type The type of the maps raster, vector or raster3d
-       @name 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.
-       @maps Name(s) of existing map(s) to unregister
+       @param type: The type of the maps raster, vector or raster3d
+       @param name: 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.
+       @param maps: A comma separated list of map names
+       @param dbif: The database interface to be used
     """
     mapset =  core.gisenv()["MAPSET"]
 
@@ -570,13 +571,13 @@ def assign_valid_time_to_maps(type, maps, ttype, start, end=None, increment=None
 
        Valid end time and increment are mutual exclusive.
 
-       @type The type of the maps raster, raster3d or vector
-       @maps A comma separated list of map names
-       @start The start date and time of the first raster map (format absolute: "yyyy-mm-dd HH:MM:SS" or "yyyy-mm-dd", format relative 5.0)
-       @end The end date and time of the first raster map (format absolute: "yyyy-mm-dd HH:MM:SS" or "yyyy-mm-dd", format relative 5.0)
-       @increment Time increment between maps for time stamp creation (format absolute: NNN seconds, minutes, hours, days, weeks, months, years; format relative: 1.0)
-       @dbif The database interface to use for sql queries
-       @interval If True, time intervals are created in case the start time and an increment is provided
+       @param type: The type of the maps raster, raster3d or vector
+       @param maps: A comma separated list of map names
+       @param start: The start date and time of the first raster map (format absolute: "yyyy-mm-dd HH:MM:SS" or "yyyy-mm-dd", format relative 5.0)
+       @param end: The end date and time of the first raster map (format absolute: "yyyy-mm-dd HH:MM:SS" or "yyyy-mm-dd", format relative 5.0)
+       @param increment: Time increment between maps for time stamp creation (format absolute: NNN seconds, minutes, hours, days, weeks, months, years; format relative: 1.0)
+       @param dbif: The database interface to be used
+       @param interval: If True, time intervals are created in case the start time and an increment is provided
     """
 
     if end and increment:
@@ -659,14 +660,14 @@ def assign_valid_time_to_maps(type, maps, ttype, start, end=None, increment=None
 def assign_valid_time_to_map(ttype, map, start, end, increment=None, mult=1, dbif = None, interval=False):
     """Assign the valid time to a map dataset
 
-       @ttype The temporal type which should be assigned and which the time format is of
-       @map A map dataset object derived from abstract_map_dataset
-       @start The start date and time of the first raster map (format absolute: "yyyy-mm-dd HH:MM:SS" or "yyyy-mm-dd", format relative 5.0)
-       @end The end date and time of the first raster map (format absolute: "yyyy-mm-dd HH:MM:SS" or "yyyy-mm-dd", format relative 5.0)
-       @increment Time increment between maps for time stamp creation (format absolute: NNN seconds, minutes, hours, days, weeks, months, years; format relative: 1.0)
-       @multi A multiplier for the increment
-       @dbif The database interface to use for sql queries
-       @interval If True, time intervals are created in case the start time and an increment is provided
+       @param ttype: The temporal type which should be assigned and which the time format is of
+       @param map: A map dataset object derived from abstract_map_dataset
+       @param start: The start date and time of the first raster map (format absolute: "yyyy-mm-dd HH:MM:SS" or "yyyy-mm-dd", format relative 5.0)
+       @param end: The end date and time of the first raster map (format absolute: "yyyy-mm-dd HH:MM:SS" or "yyyy-mm-dd", format relative 5.0)
+       @param increment: Time increment between maps for time stamp creation (format absolute: NNN seconds, minutes, hours, days, weeks, months, years; format relative: 1.0)
+       @param multi: A multiplier for the increment
+       @param dbif: The database interface to use for sql queries
+       @param interval: If True, time intervals are created in case the start time and an increment is provided
     """
     
     connect = False

+ 1 - 1
lib/python/temporal/spatial_extent.py

@@ -1,4 +1,4 @@
-"""!@package grass.script.tgis_spatial_extent
+"""!@package grass.temporal
 
 @brief GRASS Python scripting module (temporal GIS functions)
 

+ 1 - 1
lib/python/temporal/temporal_extent.py

@@ -1,4 +1,4 @@
-"""!@package grass.script.tgis_temporal_extent
+"""!@package grass.temporal
 
 @brief GRASS Python scripting module (temporal GIS functions)