def contains(self, point): """Return True if the object is contained by the BoundingBox :param point: the point to analyze :type point: a Point object or a tuple with the coordinates >>> from grass.pygrass.vector.geometry import Point >>> poi = Point(5,5) >>> bbox = Bbox(north=10, south=0, west=0, east=10) >>> bbox.contains(poi) True """ return bool( libvect.Vect_point_in_box(point.x, point.y, point.z if point.z else 0, self.c_bbox))
def check_point_out_3d(self, x, y, z): """Wraps Vect_point_in_box() with assert and a message""" self.assertFalse( libvect.Vect_point_in_box(x, y, z, self.c_bbox), msg="Point should be outside the bbox", )