[GRASS-SVN] r49058 - grass/trunk/lib/python/temporal
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Nov 2 17:39:39 EDT 2011
Author: huhabla
Date: 2011-11-02 14:39:39 -0700 (Wed, 02 Nov 2011)
New Revision: 49058
Modified:
grass/trunk/lib/python/temporal/abstract_space_time_dataset.py
Log:
Handle point, interval and mixed temporal map types while temporal sampling
Modified: grass/trunk/lib/python/temporal/abstract_space_time_dataset.py
===================================================================
--- grass/trunk/lib/python/temporal/abstract_space_time_dataset.py 2011-11-02 21:33:02 UTC (rev 49057)
+++ grass/trunk/lib/python/temporal/abstract_space_time_dataset.py 2011-11-02 21:39:39 UTC (rev 49058)
@@ -436,10 +436,6 @@
core.error(_("The space time datasets must be of the same temporal type"))
return None
- if self.get_map_time() != "interval":
- core.error(_("The temporal map type of the dataset must be interval"))
- return None
-
if stds.get_map_time() != "interval":
core.error(_("The temporal map type of the sample dataset must be interval"))
return None
@@ -459,7 +455,7 @@
for sample in sample_maps:
start, end = sample.get_valid_time()
- where = "((start_time <= '%s' and end_time >= '%s') OR (start_time >= '%s' and end_time <= '%s') OR (start_time < '%s' and end_time >= '%s') OR (start_time <= '%s' and end_time > '%s'))" % (start, end, start, end, end, end, start, start)
+ where = "((start_time >= '%s' and start_time < '%s') OR (start_time <= '%s' and end_time >= '%s') OR (start_time >= '%s' and end_time <= '%s') OR (start_time < '%s' and end_time >= '%s') OR (start_time <= '%s' and end_time > '%s'))" % (start, end, start, end, start, end, end, end, start, start)
rows = self.get_registered_maps("id", where, "start_time", dbif)
if rows:
More information about the grass-commit
mailing list