Orientation class

Functions to compute the orientation of basic geometric structures including point triplets (triangles) and rings. Orientation is a fundamental property of planar geometries (and more generally geometry on two-dimensional manifolds).

Orientation is notoriously subject to numerical precision errors in the case of collinear or nearly collinear points. JTS uses extended-precision arithmetic to increase the robustness of the computation.

@author Martin Davis

Constructors

Orientation()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

CLOCKWISE int
A value that indicates an orientation of clockwise, or a right turn.
final
COLLINEAR int
A value that indicates an orientation of collinear, or no turn (straight).
final
COUNTERCLOCKWISE int
A value that indicates an orientation of counterclockwise, or a left turn.
final
LEFT int
A value that indicates an orientation of counterclockwise, or a left turn.
final
A value that indicates an orientation of clockwise, or a right turn.
final
STRAIGHT int
A value that indicates an orientation of collinear, or no turn (straight).
final

Static Methods

index(Coordinate p1, Coordinate p2, Coordinate q) int
Returns the orientation index of the direction of the point q relative to a directed infinite line specified by p1-p2. The index indicates whether the point lies to the {@link #LEFT} or {@link #RIGHT} of the line, or lies on it {@link #COLLINEAR}. The index also indicates the orientation of the triangle formed by the three points ( {@link #COUNTERCLOCKWISE}, {@link #CLOCKWISE}, or {@link #STRAIGHT} )
isCCW(List<Coordinate> ring) bool
Computes whether a ring defined by an array of {@link Coordinate}s is oriented counter-clockwise.
isCCWArea(List<Coordinate> ring) bool
isCCWFromSeq(CoordinateSequence ring) bool
Computes whether a ring defined by an {@link CoordinateSequence} is oriented counter-clockwise.