|
JTS Topology Suite - v 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.noding.snapround.HotPixel
public class HotPixel
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.
Constructor Summary | |
---|---|
HotPixel(Coordinate pt,
double scaleFactor,
LineIntersector li)
Creates a new hot pixel. |
Method Summary | |
---|---|
boolean |
addSnappedNode(NodedSegmentString segStr,
int segIndex)
Adds a new node (equal to the snap pt) to the specified segment if the segment passes through the hot pixel |
Coordinate |
getCoordinate()
Gets the coordinate this hot pixel is based at. |
Envelope |
getSafeEnvelope()
Returns a "safe" envelope that is guaranteed to contain the hot pixel. |
boolean |
intersects(Coordinate p0,
Coordinate p1)
Tests whether the line segment (p0-p1) intersects this hot pixel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HotPixel(Coordinate pt, double scaleFactor, LineIntersector li)
pt
- the coordinate at the centre of the pixelscaleFactor
- the scaleFactor determining the pixel sizeli
- the intersector to use for testing intersection with line segmentsMethod Detail |
---|
public Coordinate getCoordinate()
public Envelope getSafeEnvelope()
public boolean intersects(Coordinate p0, Coordinate p1)
p0
- the first coordinate of the line segment to testp1
- the second coordinate of the line segment to test
public boolean addSnappedNode(NodedSegmentString segStr, int segIndex)
segStr
- segIndex
-
|
JTS Topology Suite - v 1.12 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |