19 #ifndef GEOS_NODING_SNAPROUND_SIMPLESNAPROUNDER_H
20 #define GEOS_NODING_SNAPROUND_SIMPLESNAPROUNDER_H
22 #include <geos/export.h>
26 #include <geos/inline.h>
28 #include <geos/noding/Noder.h>
29 #include <geos/algorithm/LineIntersector.h>
30 #include <geos/geom/Coordinate.h>
31 #include <geos/geom/PrecisionModel.h>
39 class LineIntersector;
43 class NodedSegmentString;
73 class GEOS_DLL SimpleSnapRounder:
public Noder {
77 SimpleSnapRounder(
const geom::PrecisionModel& newPm);
79 std::vector<SegmentString*>* getNodedSubstrings()
const override;
81 void computeNodes(std::vector<SegmentString*>* inputSegmentStrings)
override;
83 void add(
const SegmentString* segStr);
92 void computeVertexSnaps(
const std::vector<SegmentString*>& edges);
96 const geom::PrecisionModel& pm;
97 algorithm::LineIntersector li;
99 std::vector<SegmentString*>* nodedSegStrings;
101 void checkCorrectness(std::vector<SegmentString*>& inputSegmentStrings);
103 void snapRound(std::vector<SegmentString*>* segStrings,
104 algorithm::LineIntersector& li);
117 void findInteriorIntersections(std::vector<SegmentString*>& segStrings,
118 algorithm::LineIntersector& li, std::vector<geom::Coordinate>& ret);
126 void computeSnaps(
const std::vector<SegmentString*>& segStrings,
127 std::vector<geom::Coordinate>& snapPts);
129 void computeSnaps(NodedSegmentString* ss, std::vector<geom::Coordinate>& snapPts);
136 void computeVertexSnaps(NodedSegmentString* e0, NodedSegmentString* e1);
139 SimpleSnapRounder(
const SimpleSnapRounder& other) =
delete;
140 SimpleSnapRounder& operator=(
const SimpleSnapRounder& rhs) =
delete;
147 #endif // GEOS_NODING_SNAPROUND_SIMPLESNAPROUNDER_H