|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vividsolutions.jts.algorithm.CGAlgorithms
Specifies and implements various fundamental Computational Geometric algorithms.
Field Summary | |
static int |
CLOCKWISE
A value that indicates an orientation of clockwise, or a right turn. |
static int |
COLLINEAR
A value that indicates an orientation of collinear, or no turn (straight). |
static int |
COUNTERCLOCKWISE
A value that indicates an orientation of counterclockwise, or a left turn. |
static int |
LEFT
|
static int |
RIGHT
|
static int |
STRAIGHT
|
Constructor Summary | |
CGAlgorithms()
|
Method Summary | |
abstract int |
computeOrientation(Coordinate p1,
Coordinate p2,
Coordinate q)
Computes the orientation of a point q to the directed line segment p1-p2. |
static double |
distanceLineLine(Coordinate A,
Coordinate B,
Coordinate C,
Coordinate D)
Computes the distance from a line segment AB to a line segment CD Note: NON-ROBUST! |
static double |
distancePointLine(Coordinate p,
Coordinate A,
Coordinate B)
Computes the distance from a point p to a line segment AB Note: NON-ROBUST! |
static double |
distancePointLinePerpendicular(Coordinate p,
Coordinate A,
Coordinate B)
Computes the perpendicular distance from a point p to the (infinite) line containing the points AB |
abstract boolean |
isCCW(Coordinate[] ring)
Tests whether a ring (simple polygon) is oriented counter-clockwise. |
abstract boolean |
isOnLine(Coordinate p,
Coordinate[] linestring)
Test whether a point lies on the line segments defined by a list of coordinates. |
abstract boolean |
isPointInRing(Coordinate p,
Coordinate[] ring)
Test whether a point lies inside a ring. |
static double |
length(CoordinateSequence pts)
Computes the length of a linestring specified by a sequence of points. |
static double |
signedArea(Coordinate[] ring)
Returns the signed area for a ring. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int CLOCKWISE
public static final int RIGHT
public static final int COUNTERCLOCKWISE
public static final int LEFT
public static final int COLLINEAR
public static final int STRAIGHT
Constructor Detail |
public CGAlgorithms()
Method Detail |
public abstract boolean isPointInRing(Coordinate p, Coordinate[] ring)
public abstract boolean isOnLine(Coordinate p, Coordinate[] linestring)
public abstract boolean isCCW(Coordinate[] ring)
ring
- an array of coordinates forming a ring
true
if the ring is oriented counter-clockwisepublic abstract int computeOrientation(Coordinate p1, Coordinate p2, Coordinate q)
public static double distancePointLine(Coordinate p, Coordinate A, Coordinate B)
p
- the point to compute the distance forA
- one point of the lineB
- another point of the line (must be different to A)
public static double distancePointLinePerpendicular(Coordinate p, Coordinate A, Coordinate B)
p
- the point to compute the distance forA
- one point of the lineB
- another point of the line (must be different to A)
public static double distanceLineLine(Coordinate A, Coordinate B, Coordinate C, Coordinate D)
A
- a point of one lineB
- the second point of (must be different to A)C
- one point of the lineD
- another point of the line (must be different to A)public static double signedArea(Coordinate[] ring)
public static double length(CoordinateSequence pts)
pts
- the points specifying the linestring
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |