GEOS  3.8.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 namespace geos {
27 namespace noding {
28 class FastSegmentSetIntersectionFinder;
29 }
30 namespace algorithm {
31 namespace locate {
32 class PointOnGeometryLocator;
33 }
34 }
35 }
36 
37 namespace geos {
38 namespace geom { // geos::geom
39 namespace prep { // geos::geom::prep
40 
49 private:
50  bool isRectangle;
51  mutable noding::FastSegmentSetIntersectionFinder* segIntFinder;
52  mutable algorithm::locate::PointOnGeometryLocator* ptOnGeomLoc;
53  mutable noding::SegmentString::ConstVect segStrings;
54 
55 protected:
56 public:
57  PreparedPolygon(const geom::Geometry* geom);
58  ~PreparedPolygon() override;
59 
60  noding::FastSegmentSetIntersectionFinder* getIntersectionFinder() const;
61  algorithm::locate::PointOnGeometryLocator* getPointLocator() const;
62 
63  bool contains(const geom::Geometry* g) const override;
64  bool containsProperly(const geom::Geometry* g) const override;
65  bool covers(const geom::Geometry* g) const override;
66  bool intersects(const geom::Geometry* g) const override;
67 
68 };
69 
70 } // namespace geos::geom::prep
71 } // namespace geos::geom
72 } // namespace geos
73 
74 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGON_H
bool intersects(const geom::Geometry *g) const override
Finds if two sets of SegmentStrings intersect.
Definition: FastSegmentSetIntersectionFinder.h:50
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:25
A base class for PreparedGeometry subclasses.
Definition: BasicPreparedGeometry.h:59
A prepared version of Polygon or MultiPolygon geometries.
Definition: PreparedPolygon.h:48
bool containsProperly(const geom::Geometry *g) const override
bool contains(const geom::Geometry *g) const override