[geos-commits] r2059 - in trunk/source/headers/geos/geom: . prep

svn_geos at osgeo.org svn_geos at osgeo.org
Fri Dec 21 15:35:10 EST 2007


Author: benjubb
Date: 2007-12-21 15:35:10 -0500 (Fri, 21 Dec 2007)
New Revision: 2059

Added:
   trunk/source/headers/geos/geom/prep/
   trunk/source/headers/geos/geom/prep/AbstractPreparedPolygonContains.h
   trunk/source/headers/geos/geom/prep/BasicPreparedGeometry.h
   trunk/source/headers/geos/geom/prep/PreparedGeometry.h
   trunk/source/headers/geos/geom/prep/PreparedGeometryFactory.h
   trunk/source/headers/geos/geom/prep/PreparedLineString.h
   trunk/source/headers/geos/geom/prep/PreparedLineStringIntersects.h
   trunk/source/headers/geos/geom/prep/PreparedPoint.h
   trunk/source/headers/geos/geom/prep/PreparedPolygon.h
   trunk/source/headers/geos/geom/prep/PreparedPolygonContains.h
   trunk/source/headers/geos/geom/prep/PreparedPolygonContainsProperly.h
   trunk/source/headers/geos/geom/prep/PreparedPolygonCovers.h
   trunk/source/headers/geos/geom/prep/PreparedPolygonIntersects.h
   trunk/source/headers/geos/geom/prep/PreparedPolygonLineIntersection.h
   trunk/source/headers/geos/geom/prep/PreparedPolygonPredicate.h
Log:
Added from JTS 1.9 to support prepared geometry 

Added: trunk/source/headers/geos/geom/prep/AbstractPreparedPolygonContains.h
===================================================================
--- trunk/source/headers/geos/geom/prep/AbstractPreparedPolygonContains.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/AbstractPreparedPolygonContains.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,115 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
+#define GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
+
+#include <geos/geom/prep/PreparedPolygonPredicate.h> // inherited
+
+
+// forward declarations
+namespace geos {
+	namespace geom { 
+		class Geometry;
+
+		namespace prep { 
+			class PreparedPolygon;
+		}
+	}
+}
+
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+class AbstractPreparedPolygonContains : public PreparedPolygonPredicate 
+{
+private:
+	// information about geometric situation
+	bool hasSegmentIntersection;
+	bool hasProperIntersection;
+	bool hasNonProperIntersection;
+
+	bool isProperIntersectionImpliesNotContainedSituation( const geom::Geometry * testGeom);
+
+	/**
+	 * Tests whether a geometry consists of a single polygon with no holes.
+	 *  
+	 * @return true if the geometry is a single polygon with no holes
+	 */
+	bool isSingleShell( const geom::Geometry & geom);
+	
+	void findAndClassifyIntersections( const geom::Geometry * geom);
+
+protected:
+	/**
+	 * This flag controls a difference between contains and covers.
+	 * 
+	 * For contains the value is true.
+	 * For covers the value is false.
+	 */
+	bool requireSomePointInInterior;
+
+	/**
+	 * Evaluate the <tt>contains</tt> or <tt>covers</tt> relationship
+	 * for the given geometry.
+	 * 
+	 * @param geom the test geometry
+	 * @return true if the test geometry is contained
+	 */
+	bool eval( const geom::Geometry * geom);
+
+ 	/**
+ 	 * Computes the full topological predicate.
+	 * Used when short-circuit tests are not conclusive.
+	 * 
+	 * @param geom the test geometry
+	 * @return true if this prepared polygon has the relationship with the test geometry
+	 */
+	virtual bool fullTopologicalPredicate( const geom::Geometry * geom) =0;
+
+public:
+	AbstractPreparedPolygonContains( const PreparedPolygon * const prepPoly) 
+	:	PreparedPolygonPredicate( prepPoly),
+		hasSegmentIntersection( false),
+		hasProperIntersection( false),
+		hasNonProperIntersection( false),
+		requireSomePointInInterior(true)
+	{ }
+
+	AbstractPreparedPolygonContains( const PreparedPolygon * const prepPoly, bool requireSomePointInInterior) 
+	:	PreparedPolygonPredicate( prepPoly),
+		hasSegmentIntersection( false),
+		hasProperIntersection( false),
+		hasNonProperIntersection( false),
+		requireSomePointInInterior(requireSomePointInInterior)
+	{ }
+
+	virtual ~AbstractPreparedPolygonContains()
+	{ }
+
+};
+
+} // geos::geom::prep
+} // geos::geom
+} // geos
+
+#endif // GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
+/**********************************************************************
+ * $Log$
+ **********************************************************************/
+


Property changes on: trunk/source/headers/geos/geom/prep/AbstractPreparedPolygonContains.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/source/headers/geos/geom/prep/BasicPreparedGeometry.h
===================================================================
--- trunk/source/headers/geos/geom/prep/BasicPreparedGeometry.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/BasicPreparedGeometry.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,171 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_BASICPREPAREDGEOMETRY_H
+#define GEOS_GEOM_PREP_BASICPREPAREDGEOMETRY_H
+
+#include <geos/geom/prep/PreparedGeometry.h> // for inheritance
+//#include <geos/algorithm/PointLocator.h> 
+//#include <geos/geom/util/ComponentCoordinateExtracter.h> 
+#include <geos/geom/Coordinate.h> 
+//#include <geos/geom/Location.h>
+
+#include <vector>
+#include <string>
+
+namespace geos {
+	namespace geom {
+		class Geometry;
+		class Coordinate;
+	}
+}
+
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+/**
+ * A base class for {@link PreparedGeometry} subclasses.
+ * Contains default implementations for methods, which simply delegate
+ * to the equivalent {@link Geometry} methods.
+ * This class may be used as a "no-op" class for Geometry types
+ * which do not have a corresponding {@link PreparedGeometry} implementation.
+ * 
+ * @author Martin Davis
+ *
+ */
+class BasicPreparedGeometry: public PreparedGeometry 
+{
+private:
+	const geom::Geometry * baseGeom;
+	Coordinate::ConstVect representativePts;
+
+protected:
+	void setGeometry( const geom::Geometry * geom );
+	
+	/**
+	 * Determines whether a Geometry g interacts with 
+	 * this geometry by testing the geometry envelopes.
+	 *  
+	 * @param g a Geometry
+	 * @return true if the envelopes intersect
+	 */
+	bool envelopesIntersect(const geom::Geometry* g) const;
+
+	/**
+	 * Determines whether the envelope of 
+	 * this geometry covers the Geometry g.
+	 * 
+	 *  
+	 * @param g a Geometry
+	 * @return true if g is contained in this envelope
+	 */
+	bool envelopeCovers(const geom::Geometry* g) const;
+
+public:
+	BasicPreparedGeometry( const Geometry * geom);
+
+	~BasicPreparedGeometry( );
+
+	const geom::Geometry & getGeometry() const
+	{
+		return *baseGeom;
+	}
+
+	/**
+	 * Gets the list of representative points for this geometry.
+	 * One vertex is included for every component of the geometry
+	 * (i.e. including one for every ring of polygonal geometries) 
+	 * 
+	 * @return a List of Coordinate
+	 */
+	const Coordinate::ConstVect * getRepresentativePoints()  const
+	{
+		return &representativePts;
+	}
+
+	/**
+	 * Tests whether any representative of the target geometry 
+	 * intersects the test geometry.
+	 * This is useful in A/A, A/L, A/P, L/P, and P/P cases.
+	 * 
+	 * @param geom the test geometry
+	 * @param repPts the representative points of the target geometry
+	 * @return true if any component intersects the areal test geometry
+	 */
+	bool isAnyTargetComponentInTest(const geom::Geometry * testGeom) const;
+
+	/**
+	 * Default implementation.
+	 */
+	bool contains(const geom::Geometry * g) const;
+
+	/**
+	 * Default implementation.
+	 */
+	bool containsProperly(const geom::Geometry * g)	const;
+
+	/**
+	 * Default implementation.
+	 */
+	bool coveredBy(const geom::Geometry * g) const;
+
+	/**
+	 * Default implementation.
+	 */
+	bool covers(const geom::Geometry * g) const;
+
+	/**
+	 * Default implementation.
+	 */
+	bool crosses(const geom::Geometry * g) const;
+
+	bool disjoint(const geom::Geometry * g)	const;
+
+	/**
+	 * Default implementation.
+	 */
+	bool intersects(const geom::Geometry * g) const;
+
+	/**
+	 * Default implementation.
+	 */
+	bool overlaps(const geom::Geometry * g)	const;
+
+	/**
+	 * Default implementation.
+	 */
+	bool touches(const geom::Geometry * g) const;
+
+	/**
+	 * Default implementation.
+	 */
+	bool within(const geom::Geometry * g) const;
+
+	std::string toString();
+
+};
+
+} // namespace geos::geom::prep
+} // namespace geos::geom
+} // namespace geos
+
+#endif // GEOS_GEOM_PREP_BASICPREPAREDGEOMETRY_H
+/**********************************************************************
+ * $Log$
+ **********************************************************************/
+


Property changes on: trunk/source/headers/geos/geom/prep/BasicPreparedGeometry.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/source/headers/geos/geom/prep/PreparedGeometry.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedGeometry.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/PreparedGeometry.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,180 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_PREPAREDGEOMETRY_H
+#define GEOS_GEOM_PREP_PREPAREDGEOMETRY_H
+
+
+// Forward declarations
+namespace geos {
+	namespace geom { 
+		class Geometry;
+	}
+}
+
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+/**
+ * \class PreparedGeometry
+ *
+ * \brief
+ * An interface for classes which prepare {@link Geometry}s 
+ * in order to optimize the performance 
+ * of repeated calls to specific geometric operations.
+ * <p>
+ * A given implementation may provide optimized implementations
+ * for only some of the specified methods, 
+ * and delegate the remaining methods to the original {@link Geometry} operations.
+ * An implementation may also only optimize certain situations,
+ * and delegate others. 
+ * See the implementing classes for documentation about which methods and situations
+ * they optimize.
+ * 
+ * Last port: index/SpatialIndex.java (JTS-1.9) *
+ */
+class PreparedGeometry {
+public:
+	virtual ~PreparedGeometry() {};
+	
+	/**
+	 * Gets the original {@link Geometry} which has been prepared.
+	 * 
+	 * @return the base geometry
+	 */
+	virtual const geom::Geometry & getGeometry() const =0;
+
+	/**
+	 * Tests whether the base {@link Geometry} contains a given geometry.
+	 * 
+	 * @param geom the Geometry to test
+	 * @return true if this Geometry contains the given Geometry
+	 * 
+	 * @see Geometry#contains(Geometry)
+	 */
+	virtual bool contains(const geom::Geometry *geom) const =0;
+
+	/**
+	 * Tests whether the base {@link Geometry} contains a given geometry.
+	 * <p>
+	 * The <code>containsProperly</code> predicate has the following equivalent definitions:
+	 * <ul>
+	 * <li>Every point of the other geometry is a point of this geometry's interior.
+	 * <li>The DE-9IM Intersection Matrix for the two geometries matches 
+	 * <code>[T**FF*FF*]</code>
+	 * </ul>
+	 * The advantage to using this predicate is that it can be computed
+	 * efficiently, with no need to compute topology at individual points.
+	 * 
+	 * @param geom the Geometry to test
+	 * @return true if this Geometry containsProperly the given Geometry
+	 * 
+	 */
+	virtual bool containsProperly(const geom::Geometry *geom) const =0;
+
+	/**
+	 * Tests whether the base {@link Geometry} is covered by a given geometry.
+	 * 
+	 * @param geom the Geometry to test
+	 * @return true if this Geometry is covered by the given Geometry
+	 * 
+	 * @see Geometry#coveredBy(Geometry)
+	 */
+	virtual bool coveredBy(const geom::Geometry *geom) const =0;
+
+	/**
+	 * Tests whether the base {@link Geometry} covers a given geometry.
+	 * 
+	 * @param geom the Geometry to test
+	 * @return true if this Geometry covers the given Geometry
+	 * 
+	 * @see Geometry#covers(Geometry)
+	 */
+	virtual bool covers(const geom::Geometry *geom) const =0;
+
+	/**
+	 * Tests whether the base {@link Geometry} crosses a given geometry.
+	 * 
+	 * @param geom the Geometry to test
+	 * @return true if this Geometry crosses the given Geometry
+	 * 
+	 * @see Geometry#crosses(Geometry)
+	 */
+	virtual bool crosses(const geom::Geometry *geom) const =0;
+
+	/**
+	 * Tests whether the base {@link Geometry} is disjoint from a given geometry.
+	 * 
+	 * @param geom the Geometry to test
+	 * @return true if this Geometry is disjoint from the given Geometry
+	 * 
+	 * @see Geometry#disjoint(Geometry)
+	 */
+	virtual bool disjoint(const geom::Geometry *geom) const =0;
+
+	/**
+	 * Tests whether the base {@link Geometry} intersects a given geometry.
+	 * 
+	 * @param geom the Geometry to test
+	 * @return true if this Geometry intersects the given Geometry
+	 * 
+	 * @see Geometry#intersects(Geometry)
+	 */
+	virtual bool intersects(const geom::Geometry *geom) const =0;
+
+	/**
+	 * Tests whether the base {@link Geometry} overlaps a given geometry.
+	 * 
+	 * @param geom the Geometry to test
+	 * @return true if this Geometry overlaps the given Geometry
+	 * 
+	 * @see Geometry#overlaps(Geometry)
+	 */
+	virtual bool overlaps(const geom::Geometry *geom) const =0;
+
+	/**
+	 * Tests whether the base {@link Geometry} touches a given geometry.
+	 * 
+	 * @param geom the Geometry to test
+	 * @return true if this Geometry touches the given Geometry
+	 * 
+	 * @see Geometry#touches(Geometry)
+	 */
+	virtual bool touches(const geom::Geometry *geom) const =0;
+
+	/**
+	 * Tests whether the base {@link Geometry} is within a given geometry.
+	 * 
+	 * @param geom the Geometry to test
+	 * @return true if this Geometry is within the given Geometry
+	 * 
+	 * @see Geometry#within(Geometry)
+	 */
+	virtual bool within(const geom::Geometry *geom) const =0;
+};
+
+
+} // namespace geos::geom::prep
+} // namespace geos::geom
+} // namespace geos
+
+
+#endif // ndef GEOS_GEOM_PREP_PREPAREDGEOMETRY_H
+
+/**********************************************************************
+ * $Log$
+ **********************************************************************/


Property changes on: trunk/source/headers/geos/geom/prep/PreparedGeometry.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/source/headers/geos/geom/prep/PreparedGeometryFactory.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedGeometryFactory.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/PreparedGeometryFactory.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,86 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_PREPAREDGEOMETRYFACTORY_H
+#define GEOS_GEOM_PREP_PREPAREDGEOMETRYFACTORY_H
+
+namespace geos {
+	namespace geom {
+		class Geometry;
+
+		namespace prep {
+			class PreparedGeometry;
+		}
+	}
+}
+
+using namespace geos::geom;
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+
+/**
+ * A factory for creating {@link PreparedGeometry}s.
+ * It chooses an appropriate implementation of PreparedGeometry
+ * based on the geoemtric type of the input geometry.
+ * <p>
+ * In the future, the factory may accept hints that indicate
+ * special optimizations which can be performed.
+ * 
+ * 
+ * @author Martin Davis
+ *
+ */
+class PreparedGeometryFactory
+{
+private:
+protected:
+public:
+	/**
+	* Creates a new {@link PreparedGeometry} appropriate for the argument {@link Geometry}.
+	* 
+	* @param geom the geometry to prepare
+	* @return the prepared geometry
+	*/
+	static const PreparedGeometry * prepare( const geom::Geometry * geom) 
+	{
+		PreparedGeometryFactory pf;
+		return pf.create(geom); 
+	}
+
+	PreparedGeometryFactory() 
+	{ }
+
+	/**
+ 	* Creates a new {@link PreparedGeometry} appropriate for the argument {@link Geometry}.
+ 	* 
+	* @param geom the geometry to prepare
+	* @return the prepared geometry
+	*/
+	const PreparedGeometry * PreparedGeometryFactory::create( const geom::Geometry * geom) const;
+};
+
+} // namespace geos::geom::prep
+} // namespace geos::geom
+} // namespace geos
+
+#endif // GEOS_GEOM_PREP_PREPAREDGEOMETRYFACTORY_H
+/**********************************************************************
+ * $Log$
+ **********************************************************************/
+


Property changes on: trunk/source/headers/geos/geom/prep/PreparedGeometryFactory.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/source/headers/geos/geom/prep/PreparedLineString.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedLineString.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/PreparedLineString.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,65 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_PREPAREDLINESTRING_H
+#define GEOS_GEOM_PREP_PREPAREDLINESTRING_H
+
+#include <geos/geom/prep/BasicPreparedGeometry.h> // for inheritance
+
+namespace geos {
+	namespace noding {
+		class FastSegmentSetIntersectionFinder;
+	}
+}
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+/**
+ * A prepared version for {@link Lineal} geometries.
+ * 
+ * @author mbdavis
+ *
+ */
+class PreparedLineString : public BasicPreparedGeometry 
+{
+private:
+	noding::FastSegmentSetIntersectionFinder * segIntFinder;
+
+protected:
+public:
+	PreparedLineString(const Geometry * geom) 
+		: 
+		BasicPreparedGeometry( geom),
+		segIntFinder( NULL)
+	{ }
+
+	noding::FastSegmentSetIntersectionFinder * getIntersectionFinder();
+
+	bool intersects(const geom::Geometry * g) const;
+
+};
+
+} // namespace geos::geom::prep
+} // namespace geos::geom
+} // namespace geos
+
+#endif // GEOS_GEOM_PREP_PREPAREDLINESTRING_H
+/**********************************************************************
+ * $Log$
+ **********************************************************************/
+


Property changes on: trunk/source/headers/geos/geom/prep/PreparedLineString.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/source/headers/geos/geom/prep/PreparedLineStringIntersects.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedLineStringIntersects.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/PreparedLineStringIntersects.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,116 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_PREPAREDLINESTRINGINTERSECTS_H
+#define GEOS_GEOM_PREP_PREPAREDLINESTRINGINTERSECTS_H
+
+#include <geos/geom/prep/PreparedLineString.h>
+#include <geos/algorithm/PointLocator.h> 
+#include <geos/geom/util/ComponentCoordinateExtracter.h> 
+#include <geos/geom/Coordinate.h> 
+#include <geos/noding/SegmentStringUtil.h>
+
+using namespace geos::algorithm;
+using namespace geos::geom::util;
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+/**
+ * Computes the <tt>intersects</tt> spatial relationship predicate
+ * for a target {@link PreparedLineString} relative to other {@link Geometry} classes.
+ * Uses short-circuit tests and indexing to improve performance. 
+ * 
+ * @author Martin Davis
+ *
+ */
+class PreparedLineStringIntersects
+{
+private:
+protected:
+	PreparedLineString & prepLine;
+	//PreparedLineString * prepLine;
+
+	/**
+	 * Tests whether any representative point of the test Geometry intersects
+	 * the target geometry.
+	 * Only handles test geometries which are Puntal (dimension 0)
+	 * 
+	 * @param geom a Puntal geometry to test
+	 * @return true if any point of the argument intersects the prepared geometry
+	 */
+	bool isAnyTestPointInTarget(const geom::Geometry * testGeom) const;
+	//{
+	//	/**
+	//	 * This could be optimized by using the segment index on the lineal target.
+	//	 * However, it seems like the L/P case would be pretty rare in practice.
+	//	 */
+	//	PointLocator * locator = new PointLocator();
+
+	//	geom::Coordinate::ConstVect coords;
+	//	ComponentCoordinateExtracter::getCoordinates( *testGeom, coords);
+
+	//	for (size_t i=0, n=coords.size(); i<n; i++)
+	//	{
+	//		geom::Coordinate c = *(coords[i]);
+	//		if ( locator->intersects( c, &(prepLine->getGeometry()) ))
+	//			return true;
+	//	}
+	//	return false;
+	//}
+
+
+public:
+	/**
+	 * Computes the intersects predicate between a {@link PreparedLineString}
+	 * and a {@link Geometry}.
+	 * 
+	 * @param prep the prepared linestring
+	 * @param geom a test geometry
+	 * @return true if the linestring intersects the geometry
+	 */
+	static bool intersects(  PreparedLineString & prep, const geom::Geometry * geom ) 
+	{
+		PreparedLineStringIntersects * op = new PreparedLineStringIntersects( prep);
+		return op->intersects( geom);
+	}
+
+	PreparedLineStringIntersects(PreparedLineString & prep) 
+		: prepLine( prep)
+	{ }
+
+	/**
+	 * Tests whether this geometry intersects a given geometry.
+	 * 
+	 * @param geom the test geometry
+	 * @return true if the test geometry intersects
+	 */
+	bool intersects(const geom::Geometry * g) const;
+
+};
+
+
+
+} // namespace geos::geom::prep
+} // namespace geos::geom
+} // namespace geos
+
+#endif // GEOS_GEOM_PREP_PREPAREDLINESTRINGINTERSECTS_H
+/**********************************************************************
+ * $Log$
+ **********************************************************************/
+


Property changes on: trunk/source/headers/geos/geom/prep/PreparedLineStringIntersects.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/source/headers/geos/geom/prep/PreparedPoint.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPoint.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/PreparedPoint.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,59 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_PREPAREDPOINT_H
+#define GEOS_GEOM_PREP_PREPAREDPOINT_H
+
+#include <geos/geom/prep/BasicPreparedGeometry.h> // for inheritance
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+/**
+ * A prepared version for {@link Puntal} geometries.
+ * 
+ * @author Martin Davis
+ *
+ */
+class PreparedPoint: public BasicPreparedGeometry 
+{
+private:
+protected:
+public:
+	PreparedPoint(const Geometry * geom) 
+		: BasicPreparedGeometry( geom) 
+	{ }
+
+	/**
+	 * Tests whether this point intersects a {@link Geometry}.
+	 * <p>
+	 * The optimization here is that computing topology for the test geometry
+	 * is avoided.  This can be significant for large geometries.
+	 */
+	bool intersects(geom::Geometry* g);
+
+};
+
+} // namespace geos::geom::prep
+} // namespace geos::geom
+} // namespace geos
+
+#endif // GEOS_GEOM_PREP_PREPAREDPOINT_H
+/**********************************************************************
+ * $Log$
+ **********************************************************************/
+


Property changes on: trunk/source/headers/geos/geom/prep/PreparedPoint.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/source/headers/geos/geom/prep/PreparedPolygon.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygon.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygon.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,75 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGON_H
+#define GEOS_GEOM_PREP_PREPAREDPOLYGON_H
+
+#include <geos/geom/prep/BasicPreparedGeometry.h> // for inheritance
+#include <geos/noding/SegmentString.h> 
+
+namespace geos {
+	namespace noding {
+		class FastSegmentSetIntersectionFinder;
+	}
+	namespace algorithm {
+		namespace locate {
+			class PointOnGeometryLocator;
+		}
+	}
+}
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+/**
+ * A prepared version for {@link Polygonal} geometries.
+ * 
+ * @author mbdavis
+ *
+ */
+class PreparedPolygon : public BasicPreparedGeometry 
+{
+private:
+	bool isRectangle;
+	mutable noding::FastSegmentSetIntersectionFinder * segIntFinder;
+	mutable algorithm::locate::PointOnGeometryLocator * ptOnGeomLoc;
+	mutable noding::SegmentString::ConstVect segStrings;
+
+protected:
+public:
+	PreparedPolygon( const geom::Geometry * geom);
+	~PreparedPolygon( );
+  
+	noding::FastSegmentSetIntersectionFinder * getIntersectionFinder() const;
+	algorithm::locate::PointOnGeometryLocator * getPointLocator() const;
+	
+	bool contains( const geom::Geometry* g) const;
+	bool containsProperly( const geom::Geometry* g) const;
+	bool covers( const geom::Geometry* g) const;
+	bool intersects( const geom::Geometry* g) const;
+
+};
+
+} // namespace geos::geom::prep
+} // namespace geos::geom
+} // namespace geos
+
+#endif // GEOS_GEOM_PREP_PREPAREDPOLYGON_H
+/**********************************************************************
+ * $Log$
+ **********************************************************************/
+


Property changes on: trunk/source/headers/geos/geom/prep/PreparedPolygon.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/source/headers/geos/geom/prep/PreparedPolygonContains.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygonContains.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygonContains.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,95 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINS_H
+#define GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINS_H
+
+#include <geos/geom/prep/AbstractPreparedPolygonContains.h> // inherited
+
+// forward declarations
+namespace geos {
+	namespace geom { 
+		class Geometry;
+
+		namespace prep { 
+			class PreparedPolygon;
+		}
+	}
+}
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+class PreparedPolygonContains : public AbstractPreparedPolygonContains 
+{
+private:
+protected:
+	/**
+	* Computes the full topological <tt>contains</tt> predicate.
+	* Used when short-circuit tests are not conclusive.
+	* 
+	* @param geom the test geometry
+	* @return true if this prepared polygon contains the test geometry
+	*/
+	bool fullTopologicalPredicate( const geom::Geometry * geom);
+
+public:
+	/**
+	 * Computes the </tt>contains</tt> predicate between a {@link PreparedPolygon}
+	 * and a {@link Geometry}.
+	 * 
+	 * @param prep the prepared polygon
+	 * @param geom a test geometry
+	 * @return true if the polygon contains the geometry
+	 */
+	static bool contains( const PreparedPolygon * const prep, const geom::Geometry * geom)
+	{
+		PreparedPolygonContains polyInt( prep);
+		return polyInt.contains( geom);
+	}
+
+	/**
+	 * Creates an instance of this operation.
+	 * 
+	 * @param prepPoly the PreparedPolygon to evaluate
+	 */
+	PreparedPolygonContains( const PreparedPolygon * const prepPoly)
+	:	AbstractPreparedPolygonContains( prepPoly)
+	{ }
+		
+	/**
+	 * Tests whether this PreparedPolygon <tt>contains</tt> a given geometry.
+	 * 
+	 * @param geom the test geometry
+	 * @return true if the test geometry is contained
+	 */
+	bool contains( const geom::Geometry * geom)
+	{
+		return eval( geom);
+	}
+	
+};
+
+} // geos::geom::prep
+} // geos::geom
+} // geos
+
+#endif // GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINS_H
+/**********************************************************************
+ * $Log$
+ **********************************************************************/
+


Property changes on: trunk/source/headers/geos/geom/prep/PreparedPolygonContains.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/source/headers/geos/geom/prep/PreparedPolygonContainsProperly.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygonContainsProperly.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygonContainsProperly.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,85 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINSPROPERLY_H
+#define GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINSPROPERLY_H
+
+#include <geos/geom/prep/PreparedPolygonPredicate.h> // inherited
+
+namespace geos {
+	namespace geom { 
+		class Geometry;
+
+		namespace prep { 
+			class PreparedPolygon;
+		}
+	}
+}
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+class PreparedPolygonContainsProperly : public PreparedPolygonPredicate
+{
+private:
+protected:
+public:
+	/**
+	 * Computes the </tt>containsProperly</tt> predicate between a {@link PreparedPolygon}
+	 * and a {@link Geometry}.
+	 * 
+	 * @param prep the prepared polygon
+	 * @param geom a test geometry
+	 * @return true if the polygon properly contains the geometry
+	 */
+	static 
+	bool 
+	containsProperly( const PreparedPolygon * const prep, const geom::Geometry * geom)
+	{
+		PreparedPolygonContainsProperly polyInt( prep);
+		return polyInt.containsProperly( geom);
+	}
+
+	/**
+	 * Creates an instance of this operation.
+	 * 
+	 * @param prepPoly the PreparedPolygon to evaluate
+	 */
+	PreparedPolygonContainsProperly( const PreparedPolygon * const prep)
+	:	PreparedPolygonPredicate( prep)
+	{ }
+	
+	/**
+	 * Tests whether this PreparedPolygon containsProperly a given geometry.
+	 * 
+	 * @param geom the test geometry
+	 * @return true if the test geometry is contained properly
+	 */
+	bool 
+	containsProperly( const geom::Geometry * geom);
+
+};
+
+} // geos::geom::prep
+} // geos::geom
+} // geos
+
+#endif // GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINSPROPERLY_H
+/**********************************************************************
+ * $Log$
+ **********************************************************************/
+


Property changes on: trunk/source/headers/geos/geom/prep/PreparedPolygonContainsProperly.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/source/headers/geos/geom/prep/PreparedPolygonCovers.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygonCovers.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygonCovers.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,95 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H
+#define GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H
+
+#include <geos/geom/prep/AbstractPreparedPolygonContains.h> // inherited
+
+// forward declarations
+namespace geos {
+	namespace geom { 
+		class Geometry;
+
+		namespace prep { 
+			class PreparedPolygon;
+		}
+	}
+}
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+class PreparedPolygonCovers : public AbstractPreparedPolygonContains 
+{
+private:
+protected:
+	/**
+	 * Computes the full topological <tt>covers</tt> predicate.
+	 * Used when short-circuit tests are not conclusive.
+	 * 
+	 * @param geom the test geometry
+	 * @return true if this prepared polygon contains the test geometry
+	 */
+	bool fullTopologicalPredicate( const geom::Geometry * geom);
+
+public:
+	/**
+	 * Computes the </tt>covers</tt> predicate between a {@link PreparedPolygon}
+	 * and a {@link Geometry}.
+	 * 
+	 * @param prep the prepared polygon
+	 * @param geom a test geometry
+	 * @return true if the polygon covers the geometry
+	 */
+	static bool covers(const PreparedPolygon * const prep, const geom::Geometry * geom)
+	{
+	    PreparedPolygonCovers polyInt(prep);
+		return polyInt.covers(geom);
+	}
+
+	/**
+	 * Creates an instance of this operation.
+	 * 
+	 * @param prepPoly the PreparedPolygon to evaluate
+	 */
+	PreparedPolygonCovers(const PreparedPolygon * const prep)
+	:	AbstractPreparedPolygonContains( prep, false) 
+	{ }
+		
+	/**
+	 * Tests whether this PreparedPolygon <tt>covers</tt> a given geometry.
+	 * 
+	 * @param geom the test geometry
+	 * @return true if the test geometry is contained
+	 */
+	bool covers( const Geometry * geom)
+	{
+		return eval( geom);
+	}
+	
+};
+
+} // geos::geom::prep
+} // geos::geom
+} // geos
+
+#endif // GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H
+/**********************************************************************
+ * $Log$
+ **********************************************************************/
+


Property changes on: trunk/source/headers/geos/geom/prep/PreparedPolygonCovers.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/source/headers/geos/geom/prep/PreparedPolygonIntersects.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygonIntersects.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygonIntersects.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,82 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONINTERSECTS_H
+#define GEOS_GEOM_PREP_PREPAREDPOLYGONINTERSECTS_H
+
+#include <geos/geom/prep/PreparedPolygonPredicate.h> // inherited
+
+namespace geos {
+	namespace geom { 
+		class Geometry;
+
+		namespace prep { 
+			class PreparedPolygon;
+		}
+	}
+}
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+class PreparedPolygonIntersects : public PreparedPolygonPredicate
+{
+private:
+protected:
+public:
+	/**
+	 * Computes the intersects predicate between a {@link PreparedPolygon}
+	 * and a {@link Geometry}.
+	 * 
+	 * @param prep the prepared polygon
+	 * @param geom a test geometry
+	 * @return true if the polygon intersects the geometry
+	 */
+	static bool intersects( const PreparedPolygon * const prep, const geom::Geometry * geom)
+	{
+		PreparedPolygonIntersects polyInt(prep);
+		return polyInt.intersects( geom);
+	}
+	
+	/**
+	 * Creates an instance of this operation.
+	 * 
+	 * @param prepPoly the PreparedPolygon to evaluate
+	 */
+	PreparedPolygonIntersects( const PreparedPolygon * const prep)
+	:	PreparedPolygonPredicate( prep)
+	{ }
+	
+	/**
+	 * Tests whether this PreparedPolygon intersects a given geometry.
+	 * 
+	 * @param geom the test geometry
+	 * @return true if the test geometry intersects
+	 */
+	bool intersects( const geom::Geometry * geom);
+
+};
+
+} // geos::geom::prep
+} // geos::geom
+} // geos
+
+#endif // GEOS_GEOM_PREP_PREPAREDPOLYGONINTERSECTS_H
+/**********************************************************************
+ * $Log$
+ **********************************************************************/
+


Property changes on: trunk/source/headers/geos/geom/prep/PreparedPolygonIntersects.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/source/headers/geos/geom/prep/PreparedPolygonLineIntersection.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygonLineIntersection.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygonLineIntersection.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,40 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONLINEINTERSECTION_H
+#define GEOS_GEOM_PREP_PREPAREDPOLYGONLINEINTERSECTION_H
+
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+class PreparedPolygonLineIntersection
+{
+private:
+protected:
+public:
+};
+
+} // geos::geom::prep
+} // geos::geom
+} // geos
+
+#endif // GEOS_GEOM_PREP_PREPAREDPOLYGONLINEINTERSECTION_H
+/**********************************************************************
+ * $Log$
+ **********************************************************************/
+


Property changes on: trunk/source/headers/geos/geom/prep/PreparedPolygonLineIntersection.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: trunk/source/headers/geos/geom/prep/PreparedPolygonPredicate.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygonPredicate.h	                        (rev 0)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygonPredicate.h	2007-12-21 20:35:10 UTC (rev 2059)
@@ -0,0 +1,125 @@
+/**********************************************************************
+ * $Id
+ *
+ * GEOS - Geometry Engine Open Source
+ * http://geos.refractions.net
+ *
+ * Copyright (C) 2006 Refractions Research Inc.
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Public Licence as published
+ * by the Free Software Foundation. 
+ * See the COPYING file for more information.
+ *
+ *
+ **********************************************************************/
+
+#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONPREDICATE_H
+#define GEOS_GEOM_PREP_PREPAREDPOLYGONPREDICATE_H
+
+#include <geos/geom/Coordinate.h>
+
+// forward declarations
+namespace geos {
+	namespace algorithm {
+		namespace locate {
+			class PointOnGeometryLocator;
+		}
+	}
+	namespace geom { 
+		class Geometry;
+
+		namespace prep { 
+			class PreparedPolygon;
+		}
+	}
+	namespace noding {
+		class FastSegmentSetIntersectionFinder;
+	}
+}
+
+
+namespace geos {
+namespace geom { // geos::geom
+namespace prep { // geos::geom::prep
+
+class PreparedPolygonPredicate 
+{
+private:
+protected:
+	const PreparedPolygon * const prepPoly;
+
+	/**
+	 * Tests whether all components of the test Geometry 
+	 * are contained in the target geometry.
+	 * Handles both linear and point components.
+	 * 
+	 * @param geom a geometry to test
+	 * @return true if all componenta of the argument are contained in the target geometry
+	 */
+	bool isAllTestComponentsInTargetArea( const geom::Geometry * testGeom);
+
+	/**
+	 * Tests whether all components of the test Geometry 
+	 * are contained in the interior of the target geometry.
+	 * Handles both linear and point components.
+	 * 
+	 * @param geom a geometry to test
+	 * @return true if all componenta of the argument are contained in the target geometry interior
+	 */
+	bool isAllTestComponentsInTargetInterior( const geom::Geometry * testGeom);
+
+	/**
+	 * Tests whether any component of the test Geometry intersects
+	 * the area of the target geometry.
+	 * Handles test geometries with both linear and point components.
+	 * 
+	 * @param geom a geometry to test
+	 * @return true if any component of the argument intersects the prepared geometry
+	 */
+	bool isAnyTestComponentInTargetArea( const geom::Geometry * testGeom);
+
+	/**
+	 * Tests whether any component of the test Geometry intersects
+	 * the interior of the target geometry.
+	 * Handles test geometries with both linear and point components.
+	 * 
+	 * @param geom a geometry to test
+	 * @return true if any component of the argument intersects the prepared area geometry interior
+	 */
+	bool isAnyTestComponentInTargetInterior( const geom::Geometry * testGeom);
+
+	/**
+	 * Tests whether any component of the target geometry 
+	 * intersects the area of the test geometry 
+	 * 
+	 * @param geom the test geometry
+	 * @param repPts the representative points of the target geometry
+	 * @return true if any component intersects the areal test geometry
+	 */
+	bool isAnyTargetComponentInTestArea( const geom::Geometry * testGeom, const geom::Coordinate::ConstVect * targetRepPts);
+
+public:
+	/**
+	 * Creates an instance of this operation.
+	 * 
+	 * @param prepPoly the PreparedPolygon to evaluate
+	 */
+	PreparedPolygonPredicate( const PreparedPolygon * const prepPoly)
+	:	prepPoly( prepPoly)
+	{ }
+
+	~PreparedPolygonPredicate()
+	{ }
+
+};
+
+} // namespace geos::geom::prep
+} // namespace geos::geom
+} // namespace geos
+
+#endif // GEOS_GEOM_PREP_PREPAREDPOLYGONPREDICATE_H
+/**********************************************************************
+ * $Log$
+ **********************************************************************/
+


Property changes on: trunk/source/headers/geos/geom/prep/PreparedPolygonPredicate.h
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native



More information about the geos-commits mailing list