[GRASS-SVN] r54619 - in grass/trunk: lib/python/temporal temporal/t.rast.series
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jan 13 13:05:04 PST 2013
Author: huhabla
Date: 2013-01-13 13:05:03 -0800 (Sun, 13 Jan 2013)
New Revision: 54619
Modified:
grass/trunk/lib/python/temporal/mapcalc.py
grass/trunk/lib/python/temporal/space_time_datasets.py
grass/trunk/temporal/t.rast.series/t.rast.series.py
Log:
Bugfix: Correct relative time handling
Modified: grass/trunk/lib/python/temporal/mapcalc.py
===================================================================
--- grass/trunk/lib/python/temporal/mapcalc.py 2013-01-13 18:02:39 UTC (rev 54618)
+++ grass/trunk/lib/python/temporal/mapcalc.py 2013-01-13 21:05:03 UTC (rev 54619)
@@ -246,8 +246,8 @@
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)
Modified: grass/trunk/lib/python/temporal/space_time_datasets.py
===================================================================
--- grass/trunk/lib/python/temporal/space_time_datasets.py 2013-01-13 18:02:39 UTC (rev 54618)
+++ grass/trunk/lib/python/temporal/space_time_datasets.py 2013-01-13 21:05:03 UTC (rev 54619)
@@ -631,7 +631,7 @@
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:
Modified: grass/trunk/temporal/t.rast.series/t.rast.series.py
===================================================================
--- grass/trunk/temporal/t.rast.series/t.rast.series.py 2013-01-13 18:02:39 UTC (rev 54618)
+++ grass/trunk/temporal/t.rast.series/t.rast.series.py 2013-01-13 21:05:03 UTC (rev 54619)
@@ -108,7 +108,7 @@
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 @@
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():
More information about the grass-commit
mailing list