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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 5 09:00:54 PST 2016


Author: huhabla
Date: 2016-01-05 09:00:54 -0800 (Tue, 05 Jan 2016)
New Revision: 67487

Modified:
   grass/trunk/lib/python/temporal/temporal_granularity.py
Log:
temporal framework: Minor changes


Modified: grass/trunk/lib/python/temporal/temporal_granularity.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_granularity.py	2016-01-05 04:19:03 UTC (rev 67486)
+++ grass/trunk/lib/python/temporal/temporal_granularity.py	2016-01-05 17:00:54 UTC (rev 67487)
@@ -522,13 +522,17 @@
         considering the start times of the related space time datasets in the
         common granularity computation.
 
+        The list of start dates is optional. If you use this function to compute a common
+        granularity between space time datasets, then you should provide their start times
+        to avoid wrong synchronization.
+
         :param gran_list: List of granularities
         :param start_date_list: List of the start times of related space time datasets
         :return: The common granularity
 
         .. code-block:: python
 
-            from datetime import datetime
+            >>> from datetime import datetime
             >>> import grass.temporal as tgis
             >>> tgis.init()
             >>> grans = ["20 second", "10 minutes", "2 hours"]
@@ -653,6 +657,9 @@
             '1 month'
 
             >>> grans = ["120 months", "360 months", "4 years"]
+            >>> dates = [datetime(2001,1,1,0,0,0),
+            ...          datetime(2001,1,1,0,0,0),
+            ...          datetime(2001,1,1,0,0,0),]
             >>> tgis.compute_common_absolute_time_granularity(grans, dates)
             '12 months'
 
@@ -740,7 +747,6 @@
     """ Compute the greatest common granule from a list of absolute time granules
 
         :param gran_list: List of granularities
-        :param start_date_list:
         :return: The common granularity
 
         .. code-block:: python



More information about the grass-commit mailing list