示例#1
0
    def rename(self, newname):
        """Method to rename the Vector map

        :param newname: the new name for the Vector map
        :type newname: str
        """
        if self.exist():
            if not self.is_open():
                functions.rename(self.name, newname, 'vect')
            else:
                raise GrassError("The map is open, not able to renamed it.")
        self._name = newname
示例#2
0
文件: abstract.py 项目: caomw/grass
    def rename(self, newname):
        """Method to rename the Vector map

        :param newname: the new name for the Vector map
        :type newname: str
        """
        if self.exist():
            if not self.is_open():
                functions.rename(self.name, newname, 'vect')
            else:
                raise GrassError("The map is open, not able to renamed it.")
        self._name = newname
示例#3
0
 def rename(self, newname):
     """Rename the map"""
     if self.exist():
         functions.rename(self.name, newname, 'rast')
     self._name = newname
示例#4
0
文件: abstract.py 项目: caomw/grass
 def rename(self, newname):
     """Rename the map"""
     if self.exist():
         functions.rename(self.name, newname, 'rast')
     self._name = newname