22#include <geos/algorithm/LineIntersector.h>
23#include <geos/algorithm/BoundaryNodeRule.h>
24#include <geos/noding/SegmentIntersector.h>
94class GEOS_DLL IsSimpleOp {
99 bool isClosedEndpointsInInterior =
true;
100 bool isFindAllLocations =
false;
101 bool isSimpleResult =
false;
102 std::vector<geom::CoordinateXY> nonSimplePts;
103 bool computed =
false;
132 static std::vector<std::unique_ptr<geos::geom::CoordinateSequence>>
135 static std::vector<std::unique_ptr<noding::SegmentString>>
136 createSegmentStrings(std::vector<std::unique_ptr<geos::geom::CoordinateSequence>>& seqs);
143 bool isClosedEndpointsInInterior;
144 bool isFindAll =
false;
146 std::vector<geom::CoordinateXY>& intersectionPts;
154 bool findIntersection(
157 const geom::CoordinateXY& p00,
const geom::CoordinateXY& p01,
158 const geom::CoordinateXY& p10,
const geom::CoordinateXY& p11);
169 bool isIntersectionEndpoint(
181 std::size_t intersectionVertexIndex(
186 NonSimpleIntersectionFinder(
187 bool p_isClosedEndpointsInInterior,
189 std::vector<geom::CoordinateXY>& p_intersectionPts)
190 : isClosedEndpointsInInterior(p_isClosedEndpointsInInterior)
191 , isFindAll(p_isFindAll)
192 , intersectionPts(p_intersectionPts)
200 bool hasIntersection()
const;
202 void processIntersections(
206 bool isDone()
const override;
234 , isClosedEndpointsInInterior(! p_boundaryNodeRule.isInBoundary(2))
235 , isFindAllLocations(false)
248 if (!
geom)
return false;
An interface for rules which determine whether node points which are in boundaries of lineal geometry...
Definition BoundaryNodeRule.h:52
An interface for rules which determine whether node points which are in boundaries of lineal geometry...
Definition BoundaryNodeRule.h:52
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition LineIntersector.h:53
Represents a collection of heterogeneous Geometry objects.
Definition GeometryCollection.h:51
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:197
Definition LineString.h:66
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition LinearRing.h:54
Models a collection of LineStrings.
Definition MultiLineString.h:49
Definition MultiPoint.h:50
Represents a linear polygon, which may include holes.
Definition Polygon.h:61
Represents a list of contiguous line segments, and supports noding the segments.
Definition BasicSegmentString.h:44
Processes possible intersections detected by a Noder.
Definition noding/SegmentIntersector.h:45
An interface for classes which represent a sequence of contiguous line segments.
Definition SegmentString.h:47
void setFindAllLocations(bool isFindAll)
IsSimpleOp(const geom::Geometry &geom)
Definition IsSimpleOp.h:222
geom::CoordinateXY getNonSimpleLocation()
static bool isSimple(const geom::Geometry &geom)
const std::vector< geom::CoordinateXY > & getNonSimpleLocations()
geom::CoordinateXY getNonSimpleLocation(const geom::Geometry &geom)
IsSimpleOp(const geom::Geometry &geom, const algorithm::BoundaryNodeRule &p_boundaryNodeRule)
Definition IsSimpleOp.h:232
Contains classes and interfaces implementing fundamental computational geometry algorithms.
Definition Angle.h:32
Classes to compute nodings for arrangements of line segments and line segment sequences.
Definition InvalidSegmentDetector.h:25
Provides classes for testing the validity of geometries.
Definition namespaces.h:289
Provides classes for implementing operations on geometries.
Definition namespaces.h:179
Basic namespace for all GEOS functionalities.
Definition geos.h:39