GEOS  3.9.1dev
PreparedPolygon.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2020 Sandro Santilli <strk@kbt.io>
7  * Copyright (C) 2006 Refractions Research Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  *
15  **********************************************************************
16  *
17  * Last port: geom/prep/PreparedPolygon.java rev 1.7 (JTS-1.10)
18  *
19  **********************************************************************/
20 
21 #ifndef GEOS_GEOM_PREP_PREPAREDPOLYGON_H
22 #define GEOS_GEOM_PREP_PREPAREDPOLYGON_H
23 
24 #include <geos/geom/prep/BasicPreparedGeometry.h> // for inheritance
27 
28 #include <memory>
29 
30 namespace geos {
31 namespace noding {
33 }
34 namespace algorithm {
35 namespace locate {
36 class PointOnGeometryLocator;
37 }
38 }
39 }
40 
41 namespace geos {
42 namespace geom { // geos::geom
43 namespace prep { // geos::geom::prep
44 
53 private:
55  mutable std::unique_ptr<noding::FastSegmentSetIntersectionFinder> segIntFinder;
56  mutable std::unique_ptr<algorithm::locate::PointOnGeometryLocator> ptOnGeomLoc;
58  mutable std::unique_ptr<operation::distance::IndexedFacetDistance> indexedDistance;
59 
60 protected:
61 public:
62  PreparedPolygon(const geom::Geometry* geom);
63  ~PreparedPolygon() override;
64 
65  noding::FastSegmentSetIntersectionFinder* getIntersectionFinder() const;
66  algorithm::locate::PointOnGeometryLocator* getPointLocator() const;
67  operation::distance::IndexedFacetDistance* getIndexedFacetDistance() const;
68 
69  bool contains(const geom::Geometry* g) const override;
70  bool containsProperly(const geom::Geometry* g) const override;
71  bool covers(const geom::Geometry* g) const override;
72  bool intersects(const geom::Geometry* g) const override;
73  double distance(const geom::Geometry* g) const override;
74 
75 };
76 
77 } // namespace geos::geom::prep
78 } // namespace geos::geom
79 } // namespace geos
80 
81 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGON_H
Finds if two sets of SegmentStrings intersect.
std::unique_ptr< noding::FastSegmentSetIntersectionFinder > segIntFinder
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
std::unique_ptr< algorithm::locate::PointOnGeometryLocator > ptOnGeomLoc
Computes the distance between the facets (segments and vertices) of two Geometrys using a Branch-and-...
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
std::vector< const SegmentString * > ConstVect
Definition: SegmentString.h:48
std::unique_ptr< operation::distance::IndexedFacetDistance > indexedDistance
Basic namespace for all GEOS functionalities.
A base class for PreparedGeometry subclasses.
A prepared version of Polygon or MultiPolygon geometries.
noding::SegmentString::ConstVect segStrings