GEOS
3.14.0dev
|
Implements a "hot pixel" as used in the Snap Rounding algorithm. More...
#include <HotPixel.h>
Public Member Functions | |
double | getWidth () const |
double | getScaleFactor () const |
template<typename CoordType > | |
HotPixel (const CoordType &pt, double scaleFact) | |
const geom::CoordinateXYZM & | getCoordinate () const |
bool | intersects (const geom::CoordinateXY &p0, const geom::CoordinateXY &p1) const |
bool | intersects (const geom::CoordinateXY &p) const |
bool | isNode () const |
void | setToNode () |
std::ostream & | operator<< (std::ostream &os) |
Implements a "hot pixel" as used in the Snap Rounding algorithm.
A hot pixel contains the interior of the tolerance square and the boundary minus the top and right segments.
The hot pixel operations are all computed in the integer domain to avoid rounding problems.
|
inline |
Creates a new hot pixel.
pt | the coordinate at the centre of the pixel. |
scaleFact | the scaleFactor determining the pixel size |
|
inline |
Gets the width of the hot pixel in the original coordinate system.
bool geos::noding::snapround::HotPixel::intersects | ( | const geom::CoordinateXY & | p | ) | const |
Tests whether a coordinate lies in (intersects) this hot pixel.
p | the coordinate to test |
bool geos::noding::snapround::HotPixel::intersects | ( | const geom::CoordinateXY & | p0, |
const geom::CoordinateXY & | p1 | ||
) | const |
Tests whether the line segment (p0-p1) intersects this hot pixel.
p0 | the first coordinate of the line segment to test |
p1 | the second coordinate of the line segment to test |