AbstractPreparedPolygonContains.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* 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.
*
*
**********************************************************************
*
* Last port: geom/prep/AbstractPreparedPolygonContains.java r388 (JTS-1.12)
*
**********************************************************************/
#pragma once
#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);
bool isSingleShell(const geom::Geometry& geom);
void findAndClassifyIntersections(const geom::Geometry* geom);
protected:
bool requireSomePointInInterior;
bool eval(const geom::Geometry* geom);
bool evalPointTestGeom(const geom::Geometry* geom, geom::Location outermostLoc);
virtual bool fullTopologicalPredicate(const geom::Geometry* geom) = 0;
public:
AbstractPreparedPolygonContains(const PreparedPolygon* const p_prepPoly)
: PreparedPolygonPredicate(p_prepPoly),
hasSegmentIntersection(false),
hasProperIntersection(false),
hasNonProperIntersection(false),
requireSomePointInInterior(true)
{ }
AbstractPreparedPolygonContains(const PreparedPolygon* const p_prepPoly, bool p_requireSomePointInInterior)
: PreparedPolygonPredicate(p_prepPoly),
hasSegmentIntersection(false),
hasProperIntersection(false),
hasNonProperIntersection(false),
requireSomePointInInterior(p_requireSomePointInInterior)
{ }
~AbstractPreparedPolygonContains() override
{ }
};
} // geos::geom::prep
} // geos::geom
} // geos
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::geom::prep::AbstractPreparedPolygonContains
A base class containing the logic for computes the contains and covers spatial relationship predicate...
Definition AbstractPreparedPolygonContains.h:64
geos::geom::prep::AbstractPreparedPolygonContains::eval
bool eval(const geom::Geometry *geom)
geos::geom::prep::AbstractPreparedPolygonContains::evalPointTestGeom
bool evalPointTestGeom(const geom::Geometry *geom, geom::Location outermostLoc)
geos::geom::prep::AbstractPreparedPolygonContains::fullTopologicalPredicate
virtual bool fullTopologicalPredicate(const geom::Geometry *geom)=0
geos::geom::prep::AbstractPreparedPolygonContains::requireSomePointInInterior
bool requireSomePointInInterior
Definition AbstractPreparedPolygonContains.h:89
geos::geom::prep::PreparedPolygonPredicate
A base class for predicate operations on PreparedPolygons.
Definition PreparedPolygonPredicate.h:57
geos::geom::prep::PreparedPolygon
A prepared version of Polygon or MultiPolygon geometries.
Definition PreparedPolygon.h:51
geos::geom::prep
Contains classes and interfaces implementing algorithms that optimize the performance of repeated cal...
Definition AbstractPreparedPolygonContains.h:30
geos::geom
Definition Angle.h:26
geos::geom::Location
Location
Constants representing the location of a point relative to a geometry.
Definition Location.h:32
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38