PreparedGeometry.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/PreparedGeometry.java rev. 1.11 (JTS-1.10)
*
**********************************************************************/
#pragma once
#include <vector>
#include <memory>
#include <string>
#include <geos/export.h>
// Forward declarations
namespace geos {
namespace geom {
class Geometry;
class Coordinate;
class CoordinateSequence;
class IntersectionMatrix;
}
}
namespace geos {
namespace geom { // geos::geom
namespace prep { // geos::geom::prep
class GEOS_DLL PreparedGeometry {
public:
virtual
~PreparedGeometry() {}
virtual const geom::Geometry& getGeometry() const = 0;
virtual bool contains(const geom::Geometry* geom) const = 0;
virtual bool containsProperly(const geom::Geometry* geom) const = 0;
virtual bool coveredBy(const geom::Geometry* geom) const = 0;
virtual bool covers(const geom::Geometry* geom) const = 0;
virtual bool crosses(const geom::Geometry* geom) const = 0;
virtual bool disjoint(const geom::Geometry* geom) const = 0;
virtual bool intersects(const geom::Geometry* geom) const = 0;
virtual bool overlaps(const geom::Geometry* geom) const = 0;
virtual bool touches(const geom::Geometry* geom) const = 0;
virtual bool within(const geom::Geometry* geom) const = 0;
virtual std::unique_ptr<geom::CoordinateSequence> nearestPoints(const geom::Geometry* geom) const = 0;
virtual double distance(const geom::Geometry* geom) const = 0;
virtual bool isWithinDistance(const geom::Geometry* geom, double dist) const = 0;
virtual std::unique_ptr<IntersectionMatrix> relate(const geom::Geometry* geom) const = 0;
virtual bool relate(const geom::Geometry* geom, const std::string& pat) const = 0;
};
} // namespace geos::geom::prep
} // namespace geos::geom
} // namespace geos
geos::geom::CoordinateSequence
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:56
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::geom::IntersectionMatrix
Implementation of Dimensionally Extended Nine-Intersection Model (DE-9IM) matrix.
Definition IntersectionMatrix.h:51
geos::geom::prep::PreparedGeometry
An interface for classes which prepare Geometrys in order to optimize the performance of repeated cal...
Definition PreparedGeometry.h:58
geos::geom::prep::PreparedGeometry::intersects
virtual bool intersects(const geom::Geometry *geom) const =0
Tests whether the base Geometry intersects a given geometry.
geos::geom::prep::PreparedGeometry::contains
virtual bool contains(const geom::Geometry *geom) const =0
Tests whether the base Geometry contains a given geometry.
geos::geom::prep::PreparedGeometry::coveredBy
virtual bool coveredBy(const geom::Geometry *geom) const =0
Tests whether the base Geometry is covered by a given geometry.
geos::geom::prep::PreparedGeometry::overlaps
virtual bool overlaps(const geom::Geometry *geom) const =0
Tests whether the base Geometry overlaps a given geometry.
geos::geom::prep::PreparedGeometry::relate
virtual bool relate(const geom::Geometry *geom, const std::string &pat) const =0
Compares the prepared geometry to the given geometry and the provided DE9IM pattern,...
geos::geom::prep::PreparedGeometry::containsProperly
virtual bool containsProperly(const geom::Geometry *geom) const =0
Tests whether the base Geometry properly contains a given geometry.
geos::geom::prep::PreparedGeometry::isWithinDistance
virtual bool isWithinDistance(const geom::Geometry *geom, double dist) const =0
Tests whether the base Geometry is within a given distance from the given geometry.
geos::geom::prep::PreparedGeometry::disjoint
virtual bool disjoint(const geom::Geometry *geom) const =0
Tests whether the base Geometry is disjoint from a given geometry.
geos::geom::prep::PreparedGeometry::crosses
virtual bool crosses(const geom::Geometry *geom) const =0
Tests whether the base Geometry crosses a given geometry.
geos::geom::prep::PreparedGeometry::within
virtual bool within(const geom::Geometry *geom) const =0
Tests whether the base Geometry is within a given geometry.
geos::geom::prep::PreparedGeometry::covers
virtual bool covers(const geom::Geometry *geom) const =0
Tests whether the base Geometry covers a given geometry.
geos::geom::prep::PreparedGeometry::touches
virtual bool touches(const geom::Geometry *geom) const =0
Tests whether the base Geometry touches a given geometry.
geos::geom::prep::PreparedGeometry::nearestPoints
virtual std::unique_ptr< geom::CoordinateSequence > nearestPoints(const geom::Geometry *geom) const =0
Compute the nearest locations on the base Geometry and the given geometry.
geos::geom::prep::PreparedGeometry::distance
virtual double distance(const geom::Geometry *geom) const =0
Compute the minimum distance between the base Geometry and the given geometry.
geos::geom::prep::PreparedGeometry::relate
virtual std::unique_ptr< IntersectionMatrix > relate(const geom::Geometry *geom) const =0
Compares the prepared geometry to the given geometry and returns the DE9IM intersection matrix as a s...
geos::geom::prep::PreparedGeometry::getGeometry
virtual const geom::Geometry & getGeometry() const =0
Gets the original Geometry which has been prepared.
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
Basic namespace for all GEOS functionalities.
Definition geos.h:38