浏览代码

Bugfix: Correct relative time handling

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54619 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 12 年之前
父节点
当前提交
08074d21c2

+ 2 - 2
lib/python/temporal/mapcalc.py

@@ -246,8 +246,8 @@ def dataset_mapcalculator(inputs, output, type, expression, base, method,
                 start, end, tz = sample_map_list[i].get_absolute_time()
                 new_map.set_absolute_time(start, end, tz)
             else:
-                start, end = sample_map_list[i].get_relative_time()
-                new_map.set_relative_time(start, end)
+                start, end, unit = sample_map_list[i].get_relative_time()
+                new_map.set_relative_time(start, end, unit)
 
             map_list.append(new_map)
 

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

@@ -631,7 +631,7 @@ class VectorDataset(AbstractMapDataset):
     def has_grass_timestamp(self):
         """!Check if a grass file bsased time stamp exists for this map.
         """
-        if G_has_raster_timestamp(self.get_name(), self.get_layer(), 
+        if G_has_vector_timestamp(self.get_name(), self.get_layer(), 
                                   self.get_mapset()):
             return True
         else:

+ 2 - 2
temporal/t.rast.series/t.rast.series.py

@@ -108,7 +108,7 @@ def main():
             if sp.is_time_absolute():
                 start_time, end_time, tz = sp.get_absolute_time()
             else:
-                start_time, end_time = sp.get_relative_time()
+                start_time, end_time, unit = sp.get_relative_time()
 
             # Create the time range for the output map
             if output.find("@") >= 0:
@@ -123,7 +123,7 @@ def main():
             if sp.is_time_absolute():
                 map.set_absolute_time(start_time, end_time, tz)
             else:
-                map.set_relative_time(start_time, end_time)
+                map.set_relative_time(start_time, end_time, unit)
 
             # Register the map in the temporal database
             if map.is_in_db():