[GRASS-SVN] r54913 - grass/trunk/lib/python/pygrass/vector

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 5 00:19:35 PST 2013


Author: zarch
Date: 2013-02-05 00:19:35 -0800 (Tue, 05 Feb 2013)
New Revision: 54913

Modified:
   grass/trunk/lib/python/pygrass/vector/basic.py
Log:
Add docstring to the Bbox contains

Modified: grass/trunk/lib/python/pygrass/vector/basic.py
===================================================================
--- grass/trunk/lib/python/pygrass/vector/basic.py	2013-02-05 08:19:26 UTC (rev 54912)
+++ grass/trunk/lib/python/pygrass/vector/basic.py	2013-02-05 08:19:35 UTC (rev 54913)
@@ -98,6 +98,14 @@
                                                  e=self.east, w=self.west)
 
     def contains(self, point):
+        """Return True if the object is contained by the BoundingBox. ::
+
+            >>> bbox = Bbox(north=10, south=0, west=0, east=10)
+            >>> bbox.contains(point)
+            True
+
+        ..
+        """
         return bool(libvect.Vect_point_in_box(point.x, point.y,
                                               point.z if point.z else 0,
                                               self.c_bbox))



More information about the grass-commit mailing list