[geos-commits] r2056 - trunk/source/headers/geos/geom

svn_geos at osgeo.org svn_geos at osgeo.org
Fri Dec 21 15:31:08 EST 2007


Author: benjubb
Date: 2007-12-21 15:31:08 -0500 (Fri, 21 Dec 2007)
New Revision: 2056

Modified:
   trunk/source/headers/geos/geom/Envelope.h
Log:
Added a covers() predicate, from JTS 1.9, to support prepared geometry

Modified: trunk/source/headers/geos/geom/Envelope.h
===================================================================
--- trunk/source/headers/geos/geom/Envelope.h	2007-12-21 20:30:13 UTC (rev 2055)
+++ trunk/source/headers/geos/geom/Envelope.h	2007-12-21 20:31:08 UTC (rev 2056)
@@ -370,6 +370,39 @@
 
 	bool intersects(const Envelope& other) const;
 
+	/**
+	* Tests if the given point lies in or on the envelope.
+	*
+	*@param  x  the x-coordinate of the point which this <code>Envelope</code> is
+	*      being checked for containing
+	*@param  y  the y-coordinate of the point which this <code>Envelope</code> is
+	*      being checked for containing
+	*@return    <code>true</code> if <code>(x, y)</code> lies in the interior or
+	*      on the boundary of this <code>Envelope</code>.
+	*/
+	bool covers(double x, double y) const;
+
+	/**
+	* Tests if the given point lies in or on the envelope.
+	*
+	*@param  p  the point which this <code>Envelope</code> is
+	*      being checked for containing
+	*@return    <code>true</code> if the point lies in the interior or
+	*      on the boundary of this <code>Envelope</code>.
+	*/
+	bool covers(const Coordinate *p) const;
+
+	/**
+	* Tests if the <code>Envelope other</code>
+	* lies wholely inside this <code>Envelope</code> (inclusive of the boundary).
+	*
+	*@param  other the <code>Envelope</code> to check
+	*@return true if this <code>Envelope</code> covers the <code>other</code> 
+	*/
+	bool covers(const Envelope *other) const;
+	bool covers(const Envelope &other) const;
+
+
 	/** \brief
 	 * Returns <code>true</code> if the <code>Envelope other</code>
 	 * spatially equals this <code>Envelope</code>.



More information about the geos-commits mailing list