17#include <geos/export.h>
18#include <geos/geom/Envelope.h>
19#include <geos/geom/Coordinate.h>
20#include <geos/algorithm/LineIntersector.h>
21#include <geos/noding/snapround/HotPixel.h>
22#include <geos/geom/PrecisionModel.h>
23#include <geos/util/IllegalArgumentException.h>
24#include <geos/io/WKTWriter.h>
25#include <geos/index/kdtree/KdTree.h>
26#include <geos/index/kdtree/KdNodeVisitor.h>
36#pragma warning(disable: 4251)
60class GEOS_DLL HotPixelIndex {
65 const geom::PrecisionModel* pm;
67 std::unique_ptr<geos::index::kdtree::KdTree> index;
68 std::deque<HotPixel> hotPixelQue;
71 template<
typename CoordType>
72 geom::CoordinateXYZM
round(
const CoordType& pt) {
73 geom::CoordinateXYZM p2(pt);
78 HotPixel* find(
const geom::Coordinate& pixelPt);
82 HotPixelIndex(
const geom::PrecisionModel* p_pm);
83 HotPixel* addRounded(
const geom::CoordinateXYZM& pt);
85 template<
typename CoordType>
86 HotPixel* add(
const CoordType& p) {
87 static_assert(std::is_base_of<geom::CoordinateXY, CoordType>(),
"Only valid for Coordinate types");
89 auto pRound =
round(p);
90 return addRounded(pRound);
93 void add(
const geom::CoordinateSequence* pts);
94 void add(
const std::vector<geom::Coordinate>& pts);
95 void addNodes(
const geom::CoordinateSequence* pts);
96 void addNodes(
const std::vector<geom::Coordinate>& pts);
103 void query(
const geom::CoordinateXY& p0,
const geom::CoordinateXY& p1,
104 index::kdtree::KdNodeVisitor& visitor);
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition LineIntersector.h:53
A visitor for items in an index.
Definition ItemVisitor.h:28
Implements a "hot pixel" as used in the Snap Rounding algorithm.
Definition HotPixel.h:60
Contains classes and interfaces implementing fundamental computational geometry algorithms.
Definition Angle.h:32
Provides classes for various kinds of spatial indexes.
Definition DiscreteFrechetDistance.h:50
Contains classes to implement the Snap Rounding algorithm for noding linestrings.
Definition namespaces.h:175
Classes to compute nodings for arrangements of line segments and line segment sequences.
Definition InvalidSegmentDetector.h:25
double round(double val)
Definition math.h:36
Basic namespace for all GEOS functionalities.
Definition geos.h:39