[GRASS-SVN] r56333 - grass/trunk/lib/python/pygrass/vector
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 20 09:42:49 PDT 2013
Author: zarch
Date: 2013-05-20 09:42:49 -0700 (Mon, 20 May 2013)
New Revision: 56333
Modified:
grass/trunk/lib/python/pygrass/vector/basic.py
Log:
Add a new method to the Bbox class that return a tuple with the bbox values.
Modified: grass/trunk/lib/python/pygrass/vector/basic.py
===================================================================
--- grass/trunk/lib/python/pygrass/vector/basic.py 2013-05-20 16:39:21 UTC (rev 56332)
+++ grass/trunk/lib/python/pygrass/vector/basic.py 2013-05-20 16:42:49 UTC (rev 56333)
@@ -129,7 +129,19 @@
('east', self.east), ('west', self.west),
('top', self.top), ('bottom', self.bottom)]
+ def nsewtb(self, is3d=False):
+ """Return a list
+ If is3d parameter is False return only:
+ north, south, east, west
+ """
+ if is3d:
+ return (self.north, self.south, self.east, self.west,
+ self.top, self.bottom)
+ else:
+ return (self.north, self.south, self.east, self.west)
+
+
class BoxList(object):
"""Instantiate a BoxList class to create a list of Bounding Box"""
def __init__(self, boxlist=None):
More information about the grass-commit
mailing list