GEOS  3.9.1
PreparedGeometry.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2006 Refractions Research Inc.
7  *
8  * This is free software; you can redistribute and/or modify it under
9  * the terms of the GNU Lesser General Public Licence as published
10  * by the Free Software Foundation.
11  * See the COPYING file for more information.
12  *
13  **********************************************************************
14  *
15  * Last port: geom/prep/PreparedGeometry.java rev. 1.11 (JTS-1.10)
16  *
17  **********************************************************************/
18 
19 #ifndef GEOS_GEOM_PREP_PREPAREDGEOMETRY_H
20 #define GEOS_GEOM_PREP_PREPAREDGEOMETRY_H
21 
22 #include <vector>
23 #include <memory>
24 #include <geos/export.h>
25 
26 // Forward declarations
27 namespace geos {
28  namespace geom {
29  class Geometry;
30  class Coordinate;
31  class CoordinateSequence;
32  }
33 }
34 
35 
36 namespace geos {
37 namespace geom { // geos::geom
38 namespace prep { // geos::geom::prep
39 
57 class GEOS_DLL PreparedGeometry {
58 public:
59  virtual
60  ~PreparedGeometry() {}
61 
67  virtual const geom::Geometry& getGeometry() const = 0;
68 
77  virtual bool contains(const geom::Geometry* geom) const = 0;
78 
118  virtual bool containsProperly(const geom::Geometry* geom) const = 0;
119 
128  virtual bool coveredBy(const geom::Geometry* geom) const = 0;
129 
138  virtual bool covers(const geom::Geometry* geom) const = 0;
139 
148  virtual bool crosses(const geom::Geometry* geom) const = 0;
149 
158  virtual bool disjoint(const geom::Geometry* geom) const = 0;
159 
168  virtual bool intersects(const geom::Geometry* geom) const = 0;
169 
178  virtual bool overlaps(const geom::Geometry* geom) const = 0;
179 
188  virtual bool touches(const geom::Geometry* geom) const = 0;
189 
198  virtual bool within(const geom::Geometry* geom) const = 0;
199 
208  virtual std::unique_ptr<geom::CoordinateSequence> nearestPoints(const geom::Geometry* geom) const = 0;
209 
218  virtual double distance(const geom::Geometry* geom) const = 0;
219 };
220 
221 
222 } // namespace geos::geom::prep
223 } // namespace geos::geom
224 } // namespace geos
225 
226 
227 #endif // ndef GEOS_GEOM_PREP_PREPAREDGEOMETRY_H
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
An interface for classes which prepare Geometrys in order to optimize the performance of repeated cal...
Definition: PreparedGeometry.h:57
virtual bool intersects(const geom::Geometry *geom) const =0
Tests whether the base Geometry intersects a given geometry.
virtual bool contains(const geom::Geometry *geom) const =0
Tests whether the base Geometry contains a given geometry.
virtual bool coveredBy(const geom::Geometry *geom) const =0
Tests whether the base Geometry is covered by a given geometry.
virtual bool overlaps(const geom::Geometry *geom) const =0
Tests whether the base Geometry overlaps a given geometry.
virtual bool containsProperly(const geom::Geometry *geom) const =0
Tests whether the base Geometry properly contains a given geometry.
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.
virtual bool disjoint(const geom::Geometry *geom) const =0
Tests whether the base Geometry is disjoint from a given geometry.
virtual bool crosses(const geom::Geometry *geom) const =0
Tests whether the base Geometry crosses a given geometry.
virtual bool within(const geom::Geometry *geom) const =0
Tests whether the base Geometry is within a given geometry.
virtual bool covers(const geom::Geometry *geom) const =0
Tests whether the base Geometry covers a given geometry.
virtual bool touches(const geom::Geometry *geom) const =0
Tests whether the base Geometry touches a given geometry.
virtual const geom::Geometry & getGeometry() const =0
Gets the original Geometry which has been prepared.
virtual double distance(const geom::Geometry *geom) const =0
Compute the minimum distance between the base Geometry and the given geometry.
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26