21#include <geos/export.h>
23#include <geos/geom/Coordinate.h>
24#include <geos/util/IllegalArgumentException.h>
25#include <geos/util/math.h>
31#pragma warning(disable: 4251)
60class GEOS_DLL HotPixel {
64 static constexpr double TOLERANCE = 0.5;
66 static constexpr int UPPER_RIGHT = 0;
67 static constexpr int UPPER_LEFT = 1;
68 static constexpr int LOWER_LEFT = 2;
69 static constexpr int LOWER_RIGHT = 3;
72 geom::CoordinateXYZM originalPt;
82 double scaleRound(
double val)
const
88 double scale(
double val)
const
90 return val * scaleFactor;
96 bool intersectsScaled(
double p0x,
double p0y,
double p1x,
double p1y)
const;
99 HotPixel(
const HotPixel& other) =
delete;
100 HotPixel& operator=(
const HotPixel& rhs) =
delete;
107 double getWidth()
const {
return 1.0 / scaleFactor; };
109 double getScaleFactor()
const {
return scaleFactor; };
116 template<
typename CoordType>
119 , scaleFactor(scaleFact)
124 if(scaleFactor <= 0.0) {
127 if(scaleFactor != 1.0) {
128 hpx = scaleRound(pt.x);
129 hpy = scaleRound(pt.y);
138 const geom::CoordinateXYZM& getCoordinate()
const;
148 const geom::CoordinateXY& p1)
const;
158 bool isNode()
const {
return hpIsNode; };
159 void setToNode() { hpIsNode =
true; };
161 std::ostream& operator<< (std::ostream& os);
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition LineIntersector.h:53
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:59
Represents a list of contiguous line segments, and supports noding the segments.
Definition NodedSegmentString.h:58
bool intersects(const geom::CoordinateXY &p) const
HotPixel(const CoordType &pt, double scaleFact)
Definition HotPixel.h:117
double getWidth() const
Definition HotPixel.h:107
bool intersects(const geom::CoordinateXY &p0, const geom::CoordinateXY &p1) const
Indicates one or more illegal arguments.
Definition IllegalArgumentException.h:33
Contains classes and interfaces implementing fundamental computational geometry algorithms.
Definition Angle.h:32
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