ソースを参照

Compute temporal gaps for point and mixed time

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48847 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 13 年 前
コミット
94caef734a
1 ファイル変更7 行追加11 行削除
  1. 7 11
      lib/python/temporal/abstract_space_time_dataset.py

+ 7 - 11
lib/python/temporal/abstract_space_time_dataset.py

@@ -233,25 +233,21 @@ class abstract_space_time_dataset(abstract_dataset):
 
         return tcount
 
-    def count_gaps(self, maps, is_interval = False):
-        """Count the number of gaps between temporal neighbours. The maps must have intervals as valid time
+    def count_gaps(self, maps):
+        """Count the number of gaps between temporal neighbours
         
            @param maps: A sorted (start_time) list of abstract_dataset objects
-           @param is_interval: Set true if the maps have vaild interval time (relative or absolute)
            @return The numbers of gaps between temporal neighbours
         """
 
         gaps = 0
 
         # Check for gaps
-        if is_interval:    
-            for i in range(len(maps)):
-                if i < len(maps) - 1:
-                    relation = maps[i + 1].temporal_relation(maps[i])
-                    if relation == "after":
-                        gaps += 1
-        else:
-            gaps = None # Gaps only possible in temporal consistent datasets (only intervals)
+        for i in range(len(maps)):
+            if i < len(maps) - 1:
+                relation = maps[i + 1].temporal_relation(maps[i])
+                if relation == "after":
+                    gaps += 1
 
         return gaps