21 #include <geos/export.h>
22 #include <geos/geom/CoordinateSequence.h>
23 #include <geos/geom/Envelope.h>
24 #include <geos/geom/LineSegment.h>
32 class CoordinateSequence;
99 std::size_t start, std::size_t end,
void* context);
105 const geom::Envelope& getEnvelope(
double expansionDistance)
const;
108 getStartIndex()
const
124 pts->getAt(index, ls.p0);
125 pts->getAt(index + 1, ls.
p1);
145 void computeOverlaps(
const MonotoneChain* mc,
double overlapTolerance,
161 void computeOverlaps(std::size_t start0, std::size_t end0,
const MonotoneChain& mc,
162 std::size_t start1, std::size_t end1,
163 double overlapTolerance,
166 bool overlaps(std::size_t start0, std::size_t end0,
167 const MonotoneChain& mc, std::size_t start1, std::size_t end1,
168 double overlapTolerance)
const {
169 if (overlapTolerance > 0.0) {
170 return overlaps(pts->getAt<geom::CoordinateXY>(start0),
171 pts->getAt<geom::CoordinateXY>(end0),
172 mc.pts->
getAt<geom::CoordinateXY>(start1),
173 mc.pts->
getAt<geom::CoordinateXY>(end1),
177 pts->getAt<geom::CoordinateXY>(end0),
178 mc.pts->
getAt<geom::CoordinateXY>(start1),
179 mc.pts->
getAt<geom::CoordinateXY>(end1));
182 static bool overlaps(
const geom::CoordinateXY& p1,
const geom::CoordinateXY& p2,
183 const geom::CoordinateXY& q1,
const geom::CoordinateXY& q2,
184 double overlapTolerance);
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:59
static bool intersects(const CoordinateXY &p1, const CoordinateXY &p2, const CoordinateXY &q)
Test the point q to see whether it intersects the Envelope defined by p1-p2.
Definition: LineSegment.h:61
Coordinate p1
Segment start.
Definition: LineSegment.h:66
The action for the internal iterator for performing overlap queries on a MonotoneChain.
Definition: MonotoneChainOverlapAction.h:42
Definition: MonotoneChainSelectAction.h:44
Monotone Chains are a way of partitioning the segments of a linestring to allow for fast searching of...
Definition: index/chain/MonotoneChain.h:85
MonotoneChain(const geom::CoordinateSequence &pts, std::size_t start, std::size_t end, void *context)
const geom::Envelope & getEnvelope() const
Returned envelope is owned by this class.
void getLineSegment(std::size_t index, geom::LineSegment &ls) const
Set given LineSegment with points of the segment starting at the given index.
Definition: index/chain/MonotoneChain.h:123
std::unique_ptr< geom::CoordinateSequence > getCoordinates() const
void select(const geom::Envelope &searchEnv, MonotoneChainSelectAction &mcs) const
const T & getAt(std::size_t i) const
Returns a read-only reference to Coordinate at position i.
Definition: CoordinateSequence.h:249
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25