[GRASS-SVN] r48695 - grass/trunk/lib/python/temporal

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 9 17:47:47 EDT 2011


Author: huhabla
Date: 2011-10-09 14:47:47 -0700 (Sun, 09 Oct 2011)
New Revision: 48695

Modified:
   grass/trunk/lib/python/temporal/abstract_datasets.py
   grass/trunk/lib/python/temporal/base.py
   grass/trunk/lib/python/temporal/core.py
   grass/trunk/lib/python/temporal/metadata.py
   grass/trunk/lib/python/temporal/space_time_datasets.py
   grass/trunk/lib/python/temporal/spatial_extent.py
   grass/trunk/lib/python/temporal/temporal_extent.py
Log:
Docs partly updated and polished.


Modified: grass/trunk/lib/python/temporal/abstract_datasets.py
===================================================================
--- grass/trunk/lib/python/temporal/abstract_datasets.py	2011-10-09 21:35:07 UTC (rev 48694)
+++ grass/trunk/lib/python/temporal/abstract_datasets.py	2011-10-09 21:47:47 UTC (rev 48695)
@@ -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 @@
     """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 @@
         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 @@
     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 @@
     """
       
     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 @@
         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 @@
     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 @@
     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 @@
         return True
 
     def update_relative_time(self, start_time, end_time=None, dbif = None):
-        """Set the relative time interval
+        """Update the relative time interval
 
-           @interval A double value in days
-
+           @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 @@
             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 @@
             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 @@
 
     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 @@
             
     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 @@
     """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 @@
     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,12 +497,27 @@
         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()
             self.absolute_time.set_granularity(granularity)
@@ -496,7 +548,12 @@
         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 @@
 
         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 @@
 
         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 @@
 
         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 @@
 
         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 @@
         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 @@
             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 @@
             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 @@
     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 @@
 
            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 @@
                 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()

Modified: grass/trunk/lib/python/temporal/base.py
===================================================================
--- grass/trunk/lib/python/temporal/base.py	2011-10-09 21:35:07 UTC (rev 48694)
+++ grass/trunk/lib/python/temporal/base.py	2011-10-09 21:47:47 UTC (rev 48695)
@@ -1,4 +1,4 @@
-"""!@package grass.script.tgis_base
+"""!@package grass.temporal
 
 @brief GRASS Python scripting module (temporal GIS functions)
 
@@ -115,7 +115,7 @@
 	    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 @@
     	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 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 @@
         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 @@
 	    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 @@
 	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,7 +249,11 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 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 @@
 	#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 at 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 @@
 
     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 @@
 	    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 @@
 	    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 @@
 	    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 @@
 	    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 @@
         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):

Modified: grass/trunk/lib/python/temporal/core.py
===================================================================
--- grass/trunk/lib/python/temporal/core.py	2011-10-09 21:35:07 UTC (rev 48694)
+++ grass/trunk/lib/python/temporal/core.py	2011-10-09 21:47:47 UTC (rev 48695)
@@ -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 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()
 

Modified: grass/trunk/lib/python/temporal/metadata.py
===================================================================
--- grass/trunk/lib/python/temporal/metadata.py	2011-10-09 21:35:07 UTC (rev 48694)
+++ grass/trunk/lib/python/temporal/metadata.py	2011-10-09 21:47:47 UTC (rev 48695)
@@ -1,4 +1,4 @@
-"""!@package grass.script.tgis_metadata
+"""!@package grass.temporal
 
 @brief GRASS Python scripting module (temporal GIS functions)
 

Modified: grass/trunk/lib/python/temporal/space_time_datasets.py
===================================================================
--- grass/trunk/lib/python/temporal/space_time_datasets.py	2011-10-09 21:35:07 UTC (rev 48694)
+++ grass/trunk/lib/python/temporal/space_time_datasets.py	2011-10-09 21:47:47 UTC (rev 48695)
@@ -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 @@
        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 @@
     """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 @@
 
        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_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

Modified: grass/trunk/lib/python/temporal/spatial_extent.py
===================================================================
--- grass/trunk/lib/python/temporal/spatial_extent.py	2011-10-09 21:35:07 UTC (rev 48694)
+++ grass/trunk/lib/python/temporal/spatial_extent.py	2011-10-09 21:47:47 UTC (rev 48695)
@@ -1,4 +1,4 @@
-"""!@package grass.script.tgis_spatial_extent
+"""!@package grass.temporal
 
 @brief GRASS Python scripting module (temporal GIS functions)
 

Modified: grass/trunk/lib/python/temporal/temporal_extent.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_extent.py	2011-10-09 21:35:07 UTC (rev 48694)
+++ grass/trunk/lib/python/temporal/temporal_extent.py	2011-10-09 21:47:47 UTC (rev 48695)
@@ -1,4 +1,4 @@
-"""!@package grass.script.tgis_temporal_extent
+"""!@package grass.temporal
 
 @brief GRASS Python scripting module (temporal GIS functions)
 



More information about the grass-commit mailing list