GEOS  3.9.0dev
PreparedPolygon.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  *
16  * Last port: geom/prep/PreparedPolygon.java rev 1.7 (JTS-1.10)
17  *
18  **********************************************************************/
19 
20 #ifndef GEOS_GEOM_PREP_PREPAREDPOLYGON_H
21 #define GEOS_GEOM_PREP_PREPAREDPOLYGON_H
22 
23 #include <geos/geom/prep/BasicPreparedGeometry.h> // for inheritance
24 #include <geos/noding/SegmentString.h>
25 
26 #include <memory>
27 
28 namespace geos {
29 namespace noding {
31 }
32 namespace algorithm {
33 namespace locate {
34 class PointOnGeometryLocator;
35 }
36 }
37 }
38 
39 namespace geos {
40 namespace geom { // geos::geom
41 namespace prep { // geos::geom::prep
42 
51 private:
52  bool isRectangle;
53  mutable std::unique_ptr<noding::FastSegmentSetIntersectionFinder> segIntFinder;
54  mutable std::unique_ptr<algorithm::locate::PointOnGeometryLocator> ptOnGeomLoc;
55  mutable noding::SegmentString::ConstVect segStrings;
56 
57 protected:
58 public:
59  PreparedPolygon(const geom::Geometry* geom);
60  ~PreparedPolygon() override;
61 
62  noding::FastSegmentSetIntersectionFinder* getIntersectionFinder() const;
63  algorithm::locate::PointOnGeometryLocator* getPointLocator() const;
64 
65  bool contains(const geom::Geometry* g) const override;
66  bool containsProperly(const geom::Geometry* g) const override;
67  bool covers(const geom::Geometry* g) const override;
68  bool intersects(const geom::Geometry* g) const override;
69 
70 };
71 
72 } // namespace geos::geom::prep
73 } // namespace geos::geom
74 } // namespace geos
75 
76 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGON_H
bool intersects(const geom::Geometry *g) const override
Finds if two sets of SegmentStrings intersect.
Definition: FastSegmentSetIntersectionFinder.h:51
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
Definition: PointOnGeometryLocator.h:37
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
bool covers(const geom::Geometry *g) const override
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26
A base class for PreparedGeometry subclasses.
Definition: BasicPreparedGeometry.h:59
A prepared version of Polygon or MultiPolygon geometries.
Definition: PreparedPolygon.h:50
bool containsProperly(const geom::Geometry *g) const override
bool contains(const geom::Geometry *g) const override