瀏覽代碼

fix rast3d -> 3draster

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@63297 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 10 年之前
父節點
當前提交
2e5dc46218

+ 1 - 1
lib/gpde/test/test_arrays.c

@@ -857,7 +857,7 @@ int test_array_3d(void)
     N_free_array_3d(tmp);
     N_free_array_3d(tmp);
 
 
     sprintf(buff,
     sprintf(buff,
-	    "g.remove -f type=rast3d name=gpde_lib_test_volume_1,gpde_lib_test_volume_2");
+	    "g.remove -f type=3draster name=gpde_lib_test_volume_1,gpde_lib_test_volume_2");
     system(buff);
     system(buff);
 
 
     N_free_array_3d(data1);
     N_free_array_3d(data1);

+ 2 - 2
lib/python/gunittest/case.py

@@ -672,7 +672,7 @@ class TestCase(unittest.TestCase):
                                           sep='=', precision=precision,
                                           sep='=', precision=precision,
                                           reference=statistics, msg=msg)
                                           reference=statistics, msg=msg)
             finally:
             finally:
-                call_module('g.remove', flags='f', type='rast3d', name=diff)
+                call_module('g.remove', flags='f', type='3draster', name=diff)
         else:
         else:
             # general case
             # general case
             # TODO: we are using r.info min max and r.univar min max interchangably
             # TODO: we are using r.info min max and r.univar min max interchangably
@@ -698,7 +698,7 @@ class TestCase(unittest.TestCase):
             self.assertRaster3dFitsUnivar(raster=diff, reference=statistics,
             self.assertRaster3dFitsUnivar(raster=diff, reference=statistics,
                                           precision=precision, msg=msg)
                                           precision=precision, msg=msg)
         finally:
         finally:
-            call_module('g.remove', flags='f', type='rast3d', name=diff)
+            call_module('g.remove', flags='f', type='3draster', name=diff)
 
 
     # TODO: this works only in 2D
     # TODO: this works only in 2D
     # TODO: write tests
     # TODO: write tests

+ 1 - 1
lib/python/gunittest/testsuite/test_assertions_rast3d.py

@@ -29,7 +29,7 @@ class TestRaster3dMapAssertions(gunittest.TestCase):
     def tearDownClass(cls):
     def tearDownClass(cls):
         cls.del_temp_region()
         cls.del_temp_region()
         # TODO: input as list does not work, why?
         # TODO: input as list does not work, why?
-        cls.runModule('g.remove', flags='f', type='rast3d',
+        cls.runModule('g.remove', flags='f', type='3draster',
                       name=','.join([cls.constant_map, cls.rcd_increasing_map]))
                       name=','.join([cls.constant_map, cls.rcd_increasing_map]))
 
 
     def test_assertRaster3dFitsUnivar(self):
     def test_assertRaster3dFitsUnivar(self):

+ 2 - 2
lib/python/pygrass/gis/__init__.py

@@ -16,7 +16,7 @@ from grass.pygrass.errors import GrassError
 
 
 
 
 ETYPE = {'rast': libgis.G_ELEMENT_RASTER,
 ETYPE = {'rast': libgis.G_ELEMENT_RASTER,
-         'rast3d': libgis.G_ELEMENT_RASTER3D,
+         '3draster': libgis.G_ELEMENT_RASTER3D,
          'vect': libgis.G_ELEMENT_VECTOR,
          'vect': libgis.G_ELEMENT_VECTOR,
          'oldvect': libgis.G_ELEMENT_OLDVECTOR,
          'oldvect': libgis.G_ELEMENT_OLDVECTOR,
          'asciivect': libgis.G_ELEMENT_ASCIIVECTOR,
          'asciivect': libgis.G_ELEMENT_ASCIIVECTOR,
@@ -315,7 +315,7 @@ class Mapset(object):
             * 'labels',
             * 'labels',
             * 'oldvect',
             * 'oldvect',
             * 'rast',
             * 'rast',
-            * 'rast3d',
+            * '3draster',
             * 'region',
             * 'region',
             * 'region3d',
             * 'region3d',
             * 'sites',
             * 'sites',

+ 3 - 3
lib/python/script/core.py

@@ -1086,7 +1086,7 @@ def list_strings(type, pattern=None, mapset=None, exclude=None, flag=''):
     Returns the output from running g.list, as a list of qualified
     Returns the output from running g.list, as a list of qualified
     names.
     names.
 
 
-    :param str type: element type (rast, vect, rast3d, region, ...)
+    :param str type: element type (rast, vect, 3draster, region, ...)
     :param str pattern: pattern string
     :param str pattern: pattern string
     :param str mapset: mapset name (if not given use search path)
     :param str mapset: mapset name (if not given use search path)
     :param str exclude: pattern string to exclude maps from the research
     :param str exclude: pattern string to exclude maps from the research
@@ -1117,7 +1117,7 @@ def list_pairs(type, pattern=None, mapset=None, exclude=None, flag=''):
     Returns the output from running g.list, as a list of
     Returns the output from running g.list, as a list of
     (name, mapset) pairs
     (name, mapset) pairs
 
 
-    :param str type: element type (rast, vect, rast3d, region, ...)
+    :param str type: element type (rast, vect, 3draster, region, ...)
     :param str pattern: pattern string
     :param str pattern: pattern string
     :param str mapset: mapset name (if not given use search path)
     :param str mapset: mapset name (if not given use search path)
     :param str exclude: pattern string to exclude maps from the research
     :param str exclude: pattern string to exclude maps from the research
@@ -1142,7 +1142,7 @@ def list_grouped(type, pattern=None, check_search_path=True, exclude=None,
     >>> list_grouped('vect', pattern='*roads*')['PERMANENT']
     >>> list_grouped('vect', pattern='*roads*')['PERMANENT']
     ['railroads', 'roadsmajor']
     ['railroads', 'roadsmajor']
 
 
-    :param str type: element type (rast, vect, rast3d, region, ...) or list of elements
+    :param str type: element type (rast, vect, 3draster, region, ...) or list of elements
     :param str pattern: pattern string
     :param str pattern: pattern string
     :param str check_search_path: True to add mapsets for the search path
     :param str check_search_path: True to add mapsets for the search path
                                   with no found elements
                                   with no found elements

+ 1 - 1
lib/python/script/raster3d.py

@@ -33,7 +33,7 @@ def raster3d_info(map):
     >>> mapcalc3d('volume = row() + col() + depth()')
     >>> mapcalc3d('volume = row() + col() + depth()')
     >>> raster3d_info('volume') # doctest: +ELLIPSIS
     >>> raster3d_info('volume') # doctest: +ELLIPSIS
     {'vertical_units': '"units"', 'tbres': 1.0, ... 'south': 185000.0}
     {'vertical_units': '"units"', 'tbres': 1.0, ... 'south': 185000.0}
-    >>> run_command('g.remove', flags='f', type='rast3d', name='volume')
+    >>> run_command('g.remove', flags='f', type='3draster', name='volume')
     0
     0
 
 
     :param str map: map name
     :param str map: map name

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

@@ -46,7 +46,7 @@ class AbstractMapDataset(AbstractDataset):
     @abstractmethod
     @abstractmethod
     def get_new_stds_instance(self, ident):
     def get_new_stds_instance(self, ident):
         """Return a new space time dataset instance that store maps with the
         """Return a new space time dataset instance that store maps with the
-           type of this map object (rast, rast3d or vect)
+           type of this map object (rast, 3draster or vect)
 
 
            :param ident The identifier of the space time dataset
            :param ident The identifier of the space time dataset
            :return: The new space time dataset instance
            :return: The new space time dataset instance

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

@@ -237,7 +237,7 @@ def extract_dataset(input, output, type, where, expression, base, nprocs=1,
                 gscript.run_command("g.remove", flags='f', type='rast',
                 gscript.run_command("g.remove", flags='f', type='rast',
                                     name=names, quiet=True)
                                     name=names, quiet=True)
             elif type == "raster3d":
             elif type == "raster3d":
-                gscript.run_command("g.remove", flags='f', type='rast3d',
+                gscript.run_command("g.remove", flags='f', type='3draster',
                                     name=names, quiet=True)
                                     name=names, quiet=True)
             elif type == "vector":
             elif type == "vector":
                 gscript.run_command("g.remove", flags='f', type='vect',
                 gscript.run_command("g.remove", flags='f', type='vect',

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

@@ -26,7 +26,7 @@ from space_time_datasets import *
 def dataset_factory(type, id):
 def dataset_factory(type, id):
     """A factory functions to create space time or map datasets
     """A factory functions to create space time or map datasets
 
 
-       :param type: the dataset type: rast or raster, rast3d,
+       :param type: the dataset type: rast or raster, 3draster,
                     vect or vector, strds, str3ds, stvds
                     vect or vector, strds, str3ds, stvds
        :param id: The id of the dataset ("name@mapset")
        :param id: The id of the dataset ("name@mapset")
     """
     """
@@ -38,7 +38,7 @@ def dataset_factory(type, id):
         sp = SpaceTimeVectorDataset(id)
         sp = SpaceTimeVectorDataset(id)
     elif type == "rast" or type == "raster":
     elif type == "rast" or type == "raster":
         sp = RasterDataset(id)
         sp = RasterDataset(id)
-    elif type == "rast3d":
+    elif type == "3draster":
         sp = Raster3DDataset(id)
         sp = Raster3DDataset(id)
     elif type == "vect" or type == "vector":
     elif type == "vect" or type == "vector":
         sp = VectorDataset(id)
         sp = VectorDataset(id)

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

@@ -34,7 +34,7 @@ def get_dataset_list(type, temporal_type, columns=None, where=None,
         the values are the rows from the SQL database query.
         the values are the rows from the SQL database query.
 
 
         :param type: The type of the datasets (strds, str3ds, stvds, rast,
         :param type: The type of the datasets (strds, str3ds, stvds, rast,
-                     rast3d, vect)
+                     3draster, vect)
         :param temporal_type: The temporal type of the datasets (absolute,
         :param temporal_type: The temporal type of the datasets (absolute,
                               relative)
                               relative)
         :param columns: A comma separated list of columns that will be selected
         :param columns: A comma separated list of columns that will be selected

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

@@ -331,7 +331,7 @@ def dataset_mapcalculator(inputs, output, type, expression, base, method,
                 gscript.run_command("g.remove", flags='f', type='rast',
                 gscript.run_command("g.remove", flags='f', type='rast',
                                     name=names, quiet=True)
                                     name=names, quiet=True)
             elif type == "raster3d":
             elif type == "raster3d":
-                gscript.run_command("g.remove", flags='f', type='rast3d',
+                gscript.run_command("g.remove", flags='f', type='3draster',
                                     name=names, quiet=True)
                                     name=names, quiet=True)
 
 
     dbif.close()
     dbif.close()

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

@@ -52,7 +52,7 @@ def open_old_stds(name, type, dbif=None):
 
 
     if type == "strds" or type == "rast" or type == "raster":
     if type == "strds" or type == "rast" or type == "raster":
         sp = dataset_factory("strds", id)
         sp = dataset_factory("strds", id)
-    elif type == "str3ds" or type == "rast3d" or type == "3draster":
+    elif type == "str3ds" or type == "3draster" or type == "3draster":
         sp = dataset_factory("str3ds", id)
         sp = dataset_factory("str3ds", id)
     elif type == "stvds" or type == "vect" or type == "vector":
     elif type == "stvds" or type == "vect" or type == "vector":
         sp = dataset_factory("stvds", id)
         sp = dataset_factory("stvds", id)
@@ -108,7 +108,7 @@ def check_new_stds(name, type, dbif=None, overwrite=False):
 
 
     if type == "strds" or type == "rast" or type == "raster":
     if type == "strds" or type == "rast" or type == "raster":
         sp = dataset_factory("strds", id)
         sp = dataset_factory("strds", id)
-    elif type == "str3ds" or type == "rast3d" or type == "3draster":
+    elif type == "str3ds" or type == "3draster" or type == "3draster":
         sp = dataset_factory("str3ds", id)
         sp = dataset_factory("str3ds", id)
     elif type == "stvds" or type == "vect" or type == "vector":
     elif type == "stvds" or type == "vect" or type == "vector":
         sp = dataset_factory("stvds", id)
         sp = dataset_factory("stvds", id)

+ 3 - 3
lib/python/temporal/register.py

@@ -35,7 +35,7 @@ def register_maps_in_space_time_dataset(
        It takes care of the correct update of the space time datasets from all
        It takes care of the correct update of the space time datasets from all
        registered maps.
        registered maps.
 
 
-       :param type: The type of the maps rast, rast3d or vect
+       :param type: The type of the maps rast, 3draster or vect
        :param name: The name of the space time dataset. Maps will be
        :param name: The name of the space time dataset. Maps will be
                     registered in the temporal database if the name was set
                     registered in the temporal database if the name was set
                     to None
                     to None
@@ -327,7 +327,7 @@ def register_maps_in_space_time_dataset(
         for dataset in datatsets_to_modify:
         for dataset in datatsets_to_modify:
             if type == "rast" or type == "raster":
             if type == "rast" or type == "raster":
                 ds = dataset_factory("strds", dataset)
                 ds = dataset_factory("strds", dataset)
-            elif type == "rast3d":
+            elif type == "3draster":
                 ds = dataset_factory("str3ds", dataset)
                 ds = dataset_factory("str3ds", dataset)
             elif type == "vect" or type == "vector":
             elif type == "vect" or type == "vector":
                 ds = dataset_factory("stvds", dataset)
                 ds = dataset_factory("stvds", dataset)
@@ -434,7 +434,7 @@ def register_map_object_list(type,  map_list, output_stds,
     """Register a list of AbstractMapDataset objects in the temporal database
     """Register a list of AbstractMapDataset objects in the temporal database
        and optional in a space time dataset.
        and optional in a space time dataset.
 
 
-       :param type: The type of the map layer (rast, rast3d, vect)
+       :param type: The type of the map layer (rast, 3draster, vect)
        :param map_list: List of AbstractMapDataset objects
        :param map_list: List of AbstractMapDataset objects
        :param output_stds: The output stds
        :param output_stds: The output stds
        :param delete_empty: Set True to delete empty map layer found in the map_list
        :param delete_empty: Set True to delete empty map layer found in the map_list

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

@@ -418,7 +418,7 @@ class Raster3DDataset(AbstractMapDataset):
             True
             True
             >>> r3map.is_time_relative()
             >>> r3map.is_time_relative()
             False
             False
-            >>> grass.run_command("g.remove", flags="f", type="rast3d", name=name, quiet=True)
+            >>> grass.run_command("g.remove", flags="f", type="3draster", name=name, quiet=True)
             0
             0
             >>> grass.del_temp_region()
             >>> grass.del_temp_region()
 
 

+ 3 - 3
lib/python/temporal/temporal_algebra.py

@@ -1063,7 +1063,7 @@ class TemporalAlgebraParser(object):
         """Remove maps of specific type
         """Remove maps of specific type
         
         
             :param namelist: List of map names to be removed
             :param namelist: List of map names to be removed
-            :param map_type: The type of the maps  (rast, rast3d or vect)
+            :param map_type: The type of the maps  (rast, 3draster or vect)
         """
         """
         max = 100
         max = 100
         chunklist = [namelist[i:i + max] for i in range(0, len(namelist), max)]
         chunklist = [namelist[i:i + max] for i in range(0, len(namelist), max)]
@@ -1074,7 +1074,7 @@ class TemporalAlgebraParser(object):
             if map_type == "raster":
             if map_type == "raster":
                 map_type = "rast"
                 map_type = "rast"
             if map_type == "raster3d":
             if map_type == "raster3d":
-                map_type = "rast3d"
+                map_type = "3draster"
             if map_type == "vector":
             if map_type == "vector":
                 map_type = "vect"
                 map_type = "vect"
 
 
@@ -2073,7 +2073,7 @@ class TemporalAlgebraParser(object):
                                 process_queue.put(m)
                                 process_queue.put(m)
                             elif map_i.get_type() == 'raster3d':
                             elif map_i.get_type() == 'raster3d':
                                 m = copy.deepcopy(self.m_copy)
                                 m = copy.deepcopy(self.m_copy)
-                                m.inputs["rast3d"].value = map_i.get_id(),  newident
+                                m.inputs["3draster"].value = map_i.get_id(),  newident
                                 m.flags["overwrite"].value = self.overwrite
                                 m.flags["overwrite"].value = self.overwrite
                                 process_queue.put(m)
                                 process_queue.put(m)
                             elif map_i.get_type() == 'vector':
                             elif map_i.get_type() == 'vector':

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

@@ -45,7 +45,7 @@ class TemporalRaster3DAlgebraParser(TemporalRasterBaseAlgebraParser):
         self.overwrite = overwrite
         self.overwrite = overwrite
         self.count = 0
         self.count = 0
         self.stdstype = "str3ds"
         self.stdstype = "str3ds"
-        self.maptype = "rast3d"
+        self.maptype = "3draster"
         self.mapclass = Raster3DDataset
         self.mapclass = Raster3DDataset
         self.basename = basename
         self.basename = basename
         self.expression = expression
         self.expression = expression

+ 1 - 1
lib/python/temporal/testsuite/unittests_temporal_raster3d_algebra.py

@@ -33,7 +33,7 @@ class TestTemporalRaster3dAlgebra(gunittest.TestCase):
         tgis.open_new_stds(name="A", type="str3ds", temporaltype="absolute",
         tgis.open_new_stds(name="A", type="str3ds", temporaltype="absolute",
                                          title="A", descr="A", semantic="field", overwrite=True)
                                          title="A", descr="A", semantic="field", overwrite=True)
 
 
-        tgis.register_maps_in_space_time_dataset(type="rast3d", name="A", maps="a1,a2,a3,a4",
+        tgis.register_maps_in_space_time_dataset(type="3draster", name="A", maps="a1,a2,a3,a4",
                                                  start="2001-01-01", increment="1 day", interval=True)
                                                  start="2001-01-01", increment="1 day", interval=True)
 
 
     def tearDown(self):
     def tearDown(self):