com.vividsolutions.jts.noding.snapround

Class HotPixel


public class HotPixel
extends java.lang.Object

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.

Version:
1.7

Constructor Summary

HotPixel(Coordinate pt, double scaleFactor, LineIntersector li)

Method Summary

Coordinate
getCoordinate()
Envelope
getSafeEnvelope()
Returns a "safe" envelope that is guaranteed to contain the hot pixel
boolean
intersects(Coordinate p0, Coordinate p1)
boolean
intersectsScaled(Coordinate p0, Coordinate p1)

Constructor Details

HotPixel

public HotPixel(Coordinate pt,
                double scaleFactor,
                LineIntersector li)

Method Details

getCoordinate

public Coordinate getCoordinate()

getSafeEnvelope

public Envelope getSafeEnvelope()
Returns a "safe" envelope that is guaranteed to contain the hot pixel
Returns:

intersects

public boolean intersects(Coordinate p0,
                          Coordinate p1)

intersectsScaled

public boolean intersectsScaled(Coordinate p0,
                                Coordinate p1)