[GRASS-SVN] r55051 - grass/trunk/lib/python/pygrass/raster

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 14 07:29:58 PST 2013


Author: zarch
Date: 2013-02-14 07:29:58 -0800 (Thu, 14 Feb 2013)
New Revision: 55051

Modified:
   grass/trunk/lib/python/pygrass/raster/abstract.py
Log:
Add full_name method to the raster abstract class to be consistent with the Vector classes, thank you to Stefano Cavallari

Modified: grass/trunk/lib/python/pygrass/raster/abstract.py
===================================================================
--- grass/trunk/lib/python/pygrass/raster/abstract.py	2013-02-14 15:29:48 UTC (rev 55050)
+++ grass/trunk/lib/python/pygrass/raster/abstract.py	2013-02-14 15:29:58 UTC (rev 55051)
@@ -62,7 +62,7 @@
             range: 56, 156
             proj: 99
             ...
-            
+
         """
         self.name = name
         self.mapset = mapset
@@ -335,6 +335,10 @@
             self.close()
         functions.remove(self.name, 'rast')
 
+    def fullname(self):
+        """Return the full name of a raster map: name at mapset"""
+        return "{name}@{mapset}".format(name=self.name, mapset=self.mapset)
+
     def name_mapset(self, name=None, mapset=None):
         """Return the full name of the Raster
 



More information about the grass-commit mailing list