[GRASS-SVN] r53085 - in grass/trunk: lib/python/temporal temporal/t.unregister
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Sep 4 10:04:05 PDT 2012
Author: huhabla
Date: 2012-09-04 10:04:04 -0700 (Tue, 04 Sep 2012)
New Revision: 53085
Modified:
grass/trunk/lib/python/temporal/space_time_datasets_tools.py
grass/trunk/temporal/t.unregister/t.unregister.py
Log:
Bugfix in t.sample and t.unregister.
Modified: grass/trunk/lib/python/temporal/space_time_datasets_tools.py
===================================================================
--- grass/trunk/lib/python/temporal/space_time_datasets_tools.py 2012-09-04 16:14:56 UTC (rev 53084)
+++ grass/trunk/lib/python/temporal/space_time_datasets_tools.py 2012-09-04 17:04:04 UTC (rev 53085)
@@ -223,19 +223,20 @@
# Safe the datasets that must be updated
datasets = map.get_registered_datasets(dbif)
- for dataset in datasets:
- datatsets_to_modify[dataset["id"]] = dataset["id"]
-
- if name and map.get_temporal_type() != sp.get_temporal_type():
- dbif.close()
- if map.get_layer():
- core.fatal(_("Unable to register %s map <%s> with layer. "
- "The temporal types are different.") %
- (map.get_type(), map.get_map_id(), map.get_layer()))
- else:
- core.fatal(_("Unable to register %s map <%s>. "
- "The temporal types are different.") %
- (map.get_type(), map.get_map_id()))
+ if datasets:
+ for dataset in datasets:
+ datatsets_to_modify[dataset["id"]] = dataset["id"]
+
+ if name and map.get_temporal_type() != sp.get_temporal_type():
+ dbif.close()
+ if map.get_layer():
+ core.fatal(_("Unable to register %s map <%s> with layer. "
+ "The temporal types are different.") %
+ (map.get_type(), map.get_map_id(), map.get_layer()))
+ else:
+ core.fatal(_("Unable to register %s map <%s>. "
+ "The temporal types are different.") %
+ (map.get_type(), map.get_map_id()))
# Load the data from the grass file database
map.load()
@@ -664,6 +665,7 @@
string += "%s%s" % ("end_time", separator)
string += "%s%s" % ("interval_length", separator)
string += "%s" % ("distance_from_begin")
+ print string
first_time, dummy = mapmatrizes[0][0]["granule"].get_valid_time()
Modified: grass/trunk/temporal/t.unregister/t.unregister.py
===================================================================
--- grass/trunk/temporal/t.unregister/t.unregister.py 2012-09-04 16:14:56 UTC (rev 53084)
+++ grass/trunk/temporal/t.unregister/t.unregister.py 2012-09-04 17:04:04 UTC (rev 53085)
@@ -94,7 +94,7 @@
dummy = tgis.RasterDataset(None)
# Map names as comma separated string
- if maps is not None:
+ if maps is not None and maps != "":
if maps.find(",") == -1:
maplist = [maps, ]
else:
More information about the grass-commit
mailing list