[GRASS-SVN] r48884 - grass/trunk/lib/python/temporal

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 20 15:24:10 EDT 2011


Author: huhabla
Date: 2011-10-20 12:24:10 -0700 (Thu, 20 Oct 2011)
New Revision: 48884

Modified:
   grass/trunk/lib/python/temporal/space_time_datasets_tools.py
Log:
Fixing bugs


Modified: grass/trunk/lib/python/temporal/space_time_datasets_tools.py
===================================================================
--- grass/trunk/lib/python/temporal/space_time_datasets_tools.py	2011-10-20 18:36:13 UTC (rev 48883)
+++ grass/trunk/lib/python/temporal/space_time_datasets_tools.py	2011-10-20 19:24:10 UTC (rev 48884)
@@ -227,7 +227,12 @@
         else:
             id = name
 
-        sp = dataset_factory(type, id)
+        if type == "rast":
+            sp = dataset_factory("strds", id)
+        if type == "rast3d":
+            sp = dataset_factory("str3ds", id)
+        if type == "vect":
+            sp = dataset_factory("stvds", id)
 
         if sp.is_in_db(dbif) == False:
             dbif.close()
@@ -267,13 +272,7 @@
         else:
             mapid = mapname
             
-        # Create a new instance with the map type
-        if type == "rast":
-            map = raster_dataset(mapid)
-        if type == "rast3d":
-            map = raster3d_dataset(mapid)
-        if type == "vect":
-            map = vector_dataset(mapid)
+        map = dataset_factory(type, mapid)
 
         # Unregister map if in database
         if map.is_in_db(dbif) == True:



More information about the grass-commit mailing list