Pārlūkot izejas kodu

temporal framework: Minor changes

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@67487 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 9 gadi atpakaļ
vecāks
revīzija
a394b5e6ec
1 mainītis faili ar 8 papildinājumiem un 2 dzēšanām
  1. 8 2
      lib/python/temporal/temporal_granularity.py

+ 8 - 2
lib/python/temporal/temporal_granularity.py

@@ -522,13 +522,17 @@ def compute_common_absolute_time_granularity(gran_list,
         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 @@ def compute_common_absolute_time_granularity(gran_list,
             '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 @@ def compute_common_absolute_time_granularity_simple(gran_list):
     """ 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