[geos-commits] r2418 - in trunk/source: geom/prep
headers/geos/geom/prep
svn_geos at osgeo.org
svn_geos at osgeo.org
Wed Apr 29 04:15:23 EDT 2009
Author: strk
Date: 2009-04-29 04:15:21 -0400 (Wed, 29 Apr 2009)
New Revision: 2418
Modified:
trunk/source/geom/prep/AbstractPreparedPolygonContains.cpp
trunk/source/geom/prep/BasicPreparedGeometry.cpp
trunk/source/geom/prep/PreparedGeometry.cpp
trunk/source/geom/prep/PreparedGeometryFactory.cpp
trunk/source/geom/prep/PreparedLineString.cpp
trunk/source/geom/prep/PreparedLineStringIntersects.cpp
trunk/source/geom/prep/PreparedPoint.cpp
trunk/source/geom/prep/PreparedPolygon.cpp
trunk/source/geom/prep/PreparedPolygonContains.cpp
trunk/source/geom/prep/PreparedPolygonContainsProperly.cpp
trunk/source/geom/prep/PreparedPolygonCovers.cpp
trunk/source/geom/prep/PreparedPolygonIntersects.cpp
trunk/source/geom/prep/PreparedPolygonPredicate.cpp
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/PreparedPolygonPredicate.h
Log:
Add port information for geom::prep package. Next stop: sync to JTS-1.10.
Modified: trunk/source/geom/prep/AbstractPreparedPolygonContains.cpp
===================================================================
--- trunk/source/geom/prep/AbstractPreparedPolygonContains.cpp 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/geom/prep/AbstractPreparedPolygonContains.cpp 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/AbstractPreparedPolygonContains.java rev. 1.6 (2007-12-12)
+ *
**********************************************************************/
#include <geos/geom/prep/AbstractPreparedPolygonContains.h>
@@ -112,7 +116,8 @@
// Do point-in-poly tests first, since they are cheaper and may result
// in a quick negative result.
//
- // If a point of any test components does not lie in target, result is false
+ // If a point of any test components does not lie in target,
+ // result is false
bool isAllInTargetArea = isAllTestComponentsInTargetArea( geom);
if ( !isAllInTargetArea )
return false;
Modified: trunk/source/geom/prep/BasicPreparedGeometry.cpp
===================================================================
--- trunk/source/geom/prep/BasicPreparedGeometry.cpp 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/geom/prep/BasicPreparedGeometry.cpp 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/BasicPreparedGeometry.java rev. 1.3 (2007-08-20)
+ *
**********************************************************************/
Modified: trunk/source/geom/prep/PreparedGeometry.cpp
===================================================================
--- trunk/source/geom/prep/PreparedGeometry.cpp 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/geom/prep/PreparedGeometry.cpp 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedGeometry.java rev. 1.11 (JTS-1.10)
+ *
**********************************************************************/
Modified: trunk/source/geom/prep/PreparedGeometryFactory.cpp
===================================================================
--- trunk/source/geom/prep/PreparedGeometryFactory.cpp 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/geom/prep/PreparedGeometryFactory.cpp 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedGeometryFactory.java rev. 1.4 (JTS-1.10)
+ *
**********************************************************************/
Modified: trunk/source/geom/prep/PreparedLineString.cpp
===================================================================
--- trunk/source/geom/prep/PreparedLineString.cpp 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/geom/prep/PreparedLineString.cpp 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedLineString.java rev 1.3 (JTS-1.10)
+ *
**********************************************************************/
Modified: trunk/source/geom/prep/PreparedLineStringIntersects.cpp
===================================================================
--- trunk/source/geom/prep/PreparedLineStringIntersects.cpp 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/geom/prep/PreparedLineStringIntersects.cpp 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedLineStringIntersects.java rev 1.2 (JTS-1.10)
+ *
**********************************************************************/
Modified: trunk/source/geom/prep/PreparedPoint.cpp
===================================================================
--- trunk/source/geom/prep/PreparedPoint.cpp 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/geom/prep/PreparedPoint.cpp 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPoint.java rev. 1.2 (JTS-1.10)
+ *
**********************************************************************/
Modified: trunk/source/geom/prep/PreparedPolygon.cpp
===================================================================
--- trunk/source/geom/prep/PreparedPolygon.cpp 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/geom/prep/PreparedPolygon.cpp 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPolygon.java rev 1.7 (JTS-1.10)
+ *
**********************************************************************/
#include <geos/geom/Polygon.h>
Modified: trunk/source/geom/prep/PreparedPolygonContains.cpp
===================================================================
--- trunk/source/geom/prep/PreparedPolygonContains.cpp 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/geom/prep/PreparedPolygonContains.cpp 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPolygonContains.java rev 1.5 (JTS-1.10)
+ *
**********************************************************************/
Modified: trunk/source/geom/prep/PreparedPolygonContainsProperly.cpp
===================================================================
--- trunk/source/geom/prep/PreparedPolygonContainsProperly.cpp 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/geom/prep/PreparedPolygonContainsProperly.cpp 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPolygonContainsProperly.java rev 1.4 (2007-12-12)
+ *
**********************************************************************/
@@ -43,7 +47,8 @@
{
// Do point-in-poly tests first, since they are cheaper and may result
// in a quick negative result.
- // If a point of any test components does not lie in target, result is false
+ // If a point of any test components does not lie in target,
+ // result is false
bool isAllInPrepGeomArea = isAllTestComponentsInTargetInterior( geom);
if ( !isAllInPrepGeomArea )
return false;
@@ -61,6 +66,11 @@
if (segsIntersect)
return false;
+ /**
+ * Given that no segments intersect, if any vertex of the target
+ * is contained in some test component.
+ * the test is NOT properly contained.
+ */
if ( geom->getGeometryTypeId() == geos::geom::GEOS_MULTIPOLYGON
|| geom->getGeometryTypeId() == geos::geom::GEOS_POLYGON )
{
Modified: trunk/source/geom/prep/PreparedPolygonCovers.cpp
===================================================================
--- trunk/source/geom/prep/PreparedPolygonCovers.cpp 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/geom/prep/PreparedPolygonCovers.cpp 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPolygonCovers.java rev 1.1 (2007-08-17)
+ *
**********************************************************************/
Modified: trunk/source/geom/prep/PreparedPolygonIntersects.cpp
===================================================================
--- trunk/source/geom/prep/PreparedPolygonIntersects.cpp 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/geom/prep/PreparedPolygonIntersects.cpp 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPolygonIntersects.java rev 1.5 (2007-08-17)
+ *
**********************************************************************/
Modified: trunk/source/geom/prep/PreparedPolygonPredicate.cpp
===================================================================
--- trunk/source/geom/prep/PreparedPolygonPredicate.cpp 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/geom/prep/PreparedPolygonPredicate.cpp 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPolygonPredicate.java rev. 1.2 (2007-08-16)
+ *
**********************************************************************/
#include <geos/geom/prep/PreparedPolygonPredicate.h>
Modified: trunk/source/headers/geos/geom/prep/AbstractPreparedPolygonContains.h
===================================================================
--- trunk/source/headers/geos/geom/prep/AbstractPreparedPolygonContains.h 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/headers/geos/geom/prep/AbstractPreparedPolygonContains.h 2009-04-29 08:15:21 UTC (rev 2418)
@@ -12,6 +12,10 @@
* See the COPYING file for more information.
*
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/AbstractPreparedPolygonContains.java rev. 1.6 (2007-12-12)
+ *
**********************************************************************/
#ifndef GEOS_GEOM_PREP_ABSTRACTPREPAREDPOLYGONCONTAINS_H
@@ -50,7 +54,8 @@
* this class is common to both predicates.
*
* It is not possible to short-circuit in all cases, in particular
- * in the case where line segments of the test geometry touches the polygon linework.
+ * in the case where line segments of the test geometry touches the polygon
+ * linework.
* In this case full topology must be computed.
* (However, if the test geometry consists of only points, this
* <i>can</i> be evaluated in an optimized fashion.
Modified: trunk/source/headers/geos/geom/prep/BasicPreparedGeometry.h
===================================================================
--- trunk/source/headers/geos/geom/prep/BasicPreparedGeometry.h 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/headers/geos/geom/prep/BasicPreparedGeometry.h 2009-04-29 08:15:21 UTC (rev 2418)
@@ -12,6 +12,10 @@
* See the COPYING file for more information.
*
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/BasicPreparedGeometry.java rev. 1.3 (2007-08-20)
+ *
**********************************************************************/
#ifndef GEOS_GEOM_PREP_BASICPREPAREDGEOMETRY_H
Modified: trunk/source/headers/geos/geom/prep/PreparedGeometry.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedGeometry.h 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/headers/geos/geom/prep/PreparedGeometry.h 2009-04-29 08:15:21 UTC (rev 2418)
@@ -11,6 +11,10 @@
* by the Free Software Foundation.
* See the COPYING file for more information.
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedGeometry.java rev. 1.11 (JTS-1.10)
+ *
**********************************************************************/
#ifndef GEOS_GEOM_PREP_PREPAREDGEOMETRY_H
@@ -67,20 +71,43 @@
*/
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.
+ /** \brief
+ * Tests whether the base {@link Geometry} properly contains
+ * a given geometry.
*
+ * The <code>containsProperly</code> predicate has the following
+ * equivalent definitions:
+ *
+ * - Every point of the other geometry is a point of this
+ * geometry's interior.
+ * - The DE-9IM Intersection Matrix for the two geometries matches
+ * <code>[T**FF*FF*]</code>
+ *
+ * In other words, if the test geometry has any interaction with
+ * the boundary of the target
+ * geometry the result of <tt>containsProperly</tt> is <tt>false</tt>.
+ * This is different semantics to the {@link Geometry::contains}
+ * predicate, * in which test geometries can intersect the target's
+ * boundary and still be contained.
+ *
+ * The advantage of using this predicate is that it can be computed
+ * efficiently, since it avoids the need to compute the full
+ * topological relationship of the input boundaries in cases where
+ * they intersect.
+ *
+ * An example use case is computing the intersections
+ * of a set of geometries with a large polygonal geometry.
+ * Since <tt>intersection</tt> is a fairly slow operation, it can
+ * be more efficient
+ * to use <tt>containsProperly</tt> to filter out test geometries
+ * which lie
+ * wholly inside the area. In these cases the intersection is
+ * known <i>a priori</i> to be exactly the original test geometry.
+ *
* @param geom the Geometry to test
- * @return true if this Geometry containsProperly the given Geometry
+ * @return true if this Geometry properly contains the given Geometry
+ *
+ * @see Geometry::contains
*
*/
virtual bool containsProperly(const geom::Geometry *geom) const =0;
Modified: trunk/source/headers/geos/geom/prep/PreparedGeometryFactory.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedGeometryFactory.h 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/headers/geos/geom/prep/PreparedGeometryFactory.h 2009-04-29 08:15:21 UTC (rev 2418)
@@ -12,6 +12,10 @@
* See the COPYING file for more information.
*
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedGeometryFactory.java rev. 1.4 (JTS-1.10)
+ *
**********************************************************************/
#ifndef GEOS_GEOM_PREP_PREPAREDGEOMETRYFACTORY_H
Modified: trunk/source/headers/geos/geom/prep/PreparedLineString.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedLineString.h 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/headers/geos/geom/prep/PreparedLineString.h 2009-04-29 08:15:21 UTC (rev 2418)
@@ -12,6 +12,10 @@
* See the COPYING file for more information.
*
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedLineString.java rev 1.3 (JTS-1.10)
+ *
**********************************************************************/
#ifndef GEOS_GEOM_PREP_PREPAREDLINESTRING_H
Modified: trunk/source/headers/geos/geom/prep/PreparedLineStringIntersects.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedLineStringIntersects.h 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/headers/geos/geom/prep/PreparedLineStringIntersects.h 2009-04-29 08:15:21 UTC (rev 2418)
@@ -12,6 +12,10 @@
* See the COPYING file for more information.
*
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedLineStringIntersects.java rev 1.2 (JTS-1.10)
+ *
**********************************************************************/
#ifndef GEOS_GEOM_PREP_PREPAREDLINESTRINGINTERSECTS_H
@@ -33,7 +37,8 @@
/**
* \brief
* Computes the <tt>intersects</tt> spatial relationship predicate
- * for a target {@link PreparedLineString} relative to other {@link Geometry} classes.
+ * for a target {@link PreparedLineString} relative to all other
+ * {@link Geometry} classes.
*
* Uses short-circuit tests and indexing to improve performance.
*
Modified: trunk/source/headers/geos/geom/prep/PreparedPoint.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPoint.h 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/headers/geos/geom/prep/PreparedPoint.h 2009-04-29 08:15:21 UTC (rev 2418)
@@ -12,6 +12,10 @@
* See the COPYING file for more information.
*
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPoint.java rev. 1.2 (JTS-1.10)
+ *
**********************************************************************/
#ifndef GEOS_GEOM_PREP_PREPAREDPOINT_H
@@ -41,9 +45,9 @@
/**
* 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.
+ *
+ * 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);
Modified: trunk/source/headers/geos/geom/prep/PreparedPolygon.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygon.h 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygon.h 2009-04-29 08:15:21 UTC (rev 2418)
@@ -12,6 +12,10 @@
* See the COPYING file for more information.
*
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPolygon.java rev 1.7 (JTS-1.10)
+ *
**********************************************************************/
#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGON_H
Modified: trunk/source/headers/geos/geom/prep/PreparedPolygonContains.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygonContains.h 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygonContains.h 2009-04-29 08:15:21 UTC (rev 2418)
@@ -12,6 +12,10 @@
* See the COPYING file for more information.
*
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPolygonContains.java rev 1.5 (JTS-1.10)
+ *
**********************************************************************/
#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINS_H
Modified: trunk/source/headers/geos/geom/prep/PreparedPolygonContainsProperly.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygonContainsProperly.h 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygonContainsProperly.h 2009-04-29 08:15:21 UTC (rev 2418)
@@ -12,6 +12,10 @@
* See the COPYING file for more information.
*
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPolygonContainsProperly.java rev 1.4 (2007-12-12)
+ *
**********************************************************************/
#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONCONTAINSPROPERLY_H
Modified: trunk/source/headers/geos/geom/prep/PreparedPolygonCovers.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygonCovers.h 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygonCovers.h 2009-04-29 08:15:21 UTC (rev 2418)
@@ -12,6 +12,10 @@
* See the COPYING file for more information.
*
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPolygonCovers.java rev 1.1 (2007-08-17)
+ *
**********************************************************************/
#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONCOVERS_H
Modified: trunk/source/headers/geos/geom/prep/PreparedPolygonIntersects.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygonIntersects.h 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygonIntersects.h 2009-04-29 08:15:21 UTC (rev 2418)
@@ -12,6 +12,10 @@
* See the COPYING file for more information.
*
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPolygonIntersects.java rev 1.5 (2007-08-17)
+ *
**********************************************************************/
#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONINTERSECTS_H
Modified: trunk/source/headers/geos/geom/prep/PreparedPolygonPredicate.h
===================================================================
--- trunk/source/headers/geos/geom/prep/PreparedPolygonPredicate.h 2009-04-27 19:47:20 UTC (rev 2417)
+++ trunk/source/headers/geos/geom/prep/PreparedPolygonPredicate.h 2009-04-29 08:15:21 UTC (rev 2418)
@@ -12,6 +12,10 @@
* See the COPYING file for more information.
*
*
+ **********************************************************************
+ *
+ * Last port: geom/prep/PreparedPolygonPredicate.java rev. 1.2 (2007-08-16)
+ *
**********************************************************************/
#ifndef GEOS_GEOM_PREP_PREPAREDPOLYGONPREDICATE_H
More information about the geos-commits
mailing list