19 #ifndef GEOS_IDX_CHAIN_MONOTONECHAIN_H
20 #define GEOS_IDX_CHAIN_MONOTONECHAIN_H
22 #include <geos/export.h>
23 #include <geos/geom/Envelope.h>
31 class CoordinateSequence;
35 class MonotoneChainSelectAction;
36 class MonotoneChainOverlapAction;
84 class GEOS_DLL MonotoneChain {
97 MonotoneChain(
const geom::CoordinateSequence& pts,
98 std::size_t start, std::size_t end,
void* context);
100 ~MonotoneChain() =
default;
103 const geom::Envelope& getEnvelope()
const;
106 getStartIndex()
const
121 void getLineSegment(std::size_t index, geom::LineSegment& ls)
const;
128 std::unique_ptr<geom::CoordinateSequence> getCoordinates()
const;
134 void select(
const geom::Envelope& searchEnv,
135 MonotoneChainSelectAction& mcs);
137 void computeOverlaps(MonotoneChain* mc,
138 MonotoneChainOverlapAction* mco);
160 void computeSelect(
const geom::Envelope& searchEnv,
163 MonotoneChainSelectAction& mcs);
165 void computeOverlaps(std::size_t start0, std::size_t end0, MonotoneChain& mc,
166 std::size_t start1, std::size_t end1,
167 MonotoneChainOverlapAction& mco);
169 bool overlaps(
size_t start0,
size_t end0,
const MonotoneChain& mc,
size_t start1,
size_t end1);
172 const geom::CoordinateSequence& pts;
190 MonotoneChain(
const MonotoneChain& other) =
delete;
191 MonotoneChain& operator=(
const MonotoneChain& rhs) =
delete;
198 #endif // GEOS_IDX_CHAIN_MONOTONECHAIN_H