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)
40 class LineIntersector;
43 class NodedSegmentString;
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;
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);
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Implements a "hot pixel" as used in the Snap Rounding algorithm.
Definition: HotPixel.h:60
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
double round(double val)
Definition: math.h:36
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25