com.vividsolutions.jts.algorithm
Class HCoordinate
java.lang.Object
com.vividsolutions.jts.algorithm.HCoordinate
public class HCoordinate
extends java.lang.Object
Represents a homogeneous coordinate in a 2-D coordinate space.
In JTS
HCoordinate
s are used as a clean way
of computing intersections between line segments.
HCoordinate
public HCoordinate()
HCoordinate
public HCoordinate(double _x,
double _y)
HCoordinate
public HCoordinate(double _x,
double _y,
double _w)
intersection
public static Coordinate intersection(Coordinate p1,
Coordinate p2,
Coordinate q1,
Coordinate q2)
throws NotRepresentableException
Computes the (approximate) intersection point between two line segments
using homogeneous coordinates.
Note that this algorithm is
not numerically stable; i.e. it can produce intersection points which
lie outside the envelope of the line segments themselves. In order
to increase the precision of the calculation input points should be normalized
before passing them to this routine.