17#include <geos/algorithm/locate/IndexedPointInAreaLocator.h>
18#include <geos/geom/CoordinateSequence.h>
19#include <geos/geom/LinearRing.h>
20#include <geos/export.h>
26class PointOnGeometryLocator;
32class CoordinateSequence;
48class GEOS_DLL OverlayEdgeRing {
50 using CoordinateXY = geos::geom::CoordinateXY;
55 using PointOnGeometryLocator = algorithm::locate::PointOnGeometryLocator;
56 using IndexedPointInAreaLocator = algorithm::locate::IndexedPointInAreaLocator;
61 OverlayEdge* startEdge;
62 std::unique_ptr<LinearRing> ring;
64 mutable std::unique_ptr<IndexedPointInAreaLocator> locator;
65 OverlayEdgeRing* shell;
67 std::vector<OverlayEdgeRing*> holes;
70 void computeRingPts(OverlayEdge* start, CoordinateSequence& pts);
71 void computeRing(
const std::shared_ptr<CoordinateSequence> & ringPts,
const GeometryFactory* geometryFactory);
78 const CoordinateSequence& getCoordinates()
const;
79 PointOnGeometryLocator* getLocator()
const;
80 static void closeRing(CoordinateSequence& pts);
81 bool contains(
const OverlayEdgeRing& otherRing)
const;
82 bool isPointInOrOut(
const OverlayEdgeRing& otherRing)
const;
87 OverlayEdgeRing(OverlayEdge* start,
const GeometryFactory* geometryFactory);
89 std::unique_ptr<LinearRing> getRing();
90 const LinearRing* getRingPtr()
const;
92 const geom::Envelope& getEnvelope()
const;
105 void setShell(OverlayEdgeRing* p_shell);
112 bool hasShell()
const;
119 const OverlayEdgeRing* getShell()
const;
121 void addHole(OverlayEdgeRing* ring);
123 geom::Location locate(
const CoordinateXY& pt)
const;
125 const Coordinate& getCoordinate()
const;
131 std::unique_ptr<Polygon> toPolygon(
const GeometryFactory* factory);
133 OverlayEdge* getEdge();
153 OverlayEdgeRing* findEdgeRingContaining(
const std::vector<OverlayEdgeRing*>& erList)
const;
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:71
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition LinearRing.h:54
Represents a linear polygon, which may include holes.
Definition Polygon.h:61
Basic namespace for all GEOS functionalities.
Definition geos.h:38