GEOS 3.11.1
PreparedPolygon.h
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#pragma once
22
23#include <geos/geom/prep/BasicPreparedGeometry.h> // for inheritance
24#include <geos/noding/SegmentString.h>
25#include <geos/operation/distance/IndexedFacetDistance.h>
26
27#include <memory>
28
29namespace geos {
30namespace noding {
32}
33namespace algorithm {
34namespace locate {
35class PointOnGeometryLocator;
36}
37}
38}
39
40namespace geos {
41namespace geom { // geos::geom
42namespace prep { // geos::geom::prep
43
52private:
53 bool isRectangle;
54 mutable std::unique_ptr<noding::FastSegmentSetIntersectionFinder> segIntFinder;
55 mutable std::unique_ptr<algorithm::locate::PointOnGeometryLocator> ptOnGeomLoc;
56 mutable noding::SegmentString::ConstVect segStrings;
57 mutable std::unique_ptr<operation::distance::IndexedFacetDistance> indexedDistance;
58
59protected:
60public:
62 ~PreparedPolygon() override;
63
64 noding::FastSegmentSetIntersectionFinder* getIntersectionFinder() const;
65 algorithm::locate::PointOnGeometryLocator* getPointLocator() const;
66 operation::distance::IndexedFacetDistance* getIndexedFacetDistance() const;
67
68 bool contains(const geom::Geometry* g) const override;
69 bool containsProperly(const geom::Geometry* g) const override;
70 bool covers(const geom::Geometry* g) const override;
71 bool intersects(const geom::Geometry* g) const override;
72 double distance(const geom::Geometry* g) const override;
73
74};
75
76} // namespace geos::geom::prep
77} // namespace geos::geom
78} // namespace geos
79
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
Definition: PointOnGeometryLocator.h:36
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
A base class for PreparedGeometry subclasses.
Definition: BasicPreparedGeometry.h:58
A prepared version of Polygon or MultiPolygon geometries.
Definition: PreparedPolygon.h:51
double distance(const geom::Geometry *g) const override
bool intersects(const geom::Geometry *g) const override
bool contains(const geom::Geometry *g) const override
bool covers(const geom::Geometry *g) const override
bool containsProperly(const geom::Geometry *g) const override
Finds if two sets of SegmentStrings intersect.
Definition: FastSegmentSetIntersectionFinder.h:50
Computes the distance between the facets (segments and vertices) of two Geometrys using a Branch-and-...
Definition: IndexedFacetDistance.h:46
Basic namespace for all GEOS functionalities.
Definition: geos.h:39