object RobustPredicates
Provides a set of numerically-sound geometric predicates.
- Alphabetic
- By Inheritance
- RobustPredicates
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- final val LEFTOF: Int(-1)
- final val ON: Int(0)
- final val RIGHTOF: Int(1)
-
def
circleCenter(ax: Double, ay: Double, bx: Double, by: Double, cx: Double, cy: Double): (Double, Coordinate, Boolean)
Given three points in 2d, represented as the Double pairs
(ax, ay)
,(bx, by)
, and(cx, cy)
, this function finds the center of the unique circle that contains the three points on its boundary.Given three points in 2d, represented as the Double pairs
(ax, ay)
,(bx, by)
, and(cx, cy)
, this function finds the center of the unique circle that contains the three points on its boundary. The return of this function is a triple containing the radius of the circle, the center of the circle, represented as a jts Coordinate, and a Boolean flag indicating if the radius and center are numerically reliable. This last value will be false if the points are too close to being collinear. - def det2(a11: Double, a12: Double, a21: Double, a22: Double): Double
- def det3(a11: Double, a12: Double, a13: Double, a21: Double, a22: Double, a23: Double, a31: Double, a32: Double, a33: Double): Double
-
def
inCircle(a: Coordinate, b: Coordinate, c: Coordinate, d: Coordinate): Boolean
Given four points in 2d, represented as jts Coordinates, this function determines if the unique circle having points
a
,b
, andc
on its boundary (isCCW(a, b, c)
must be true) contains pointd
in its interior.Given four points in 2d, represented as jts Coordinates, this function determines if the unique circle having points
a
,b
, andc
on its boundary (isCCW(a, b, c)
must be true) contains pointd
in its interior. The z-coordinates of the input points are ignored. - def inCircle(ax: Double, ay: Double, bx: Double, by: Double, cx: Double, cy: Double, dx: Double, dy: Double): Boolean
-
def
isCCW(a: Coordinate, b: Coordinate, c: Coordinate): Boolean
Given three points in 2d, represented as jts Coordinates, this function returns true if the three points, visted in the order
a
,b
, and thenc
, have a counterclockwise winding.Given three points in 2d, represented as jts Coordinates, this function returns true if the three points, visted in the order
a
,b
, and thenc
, have a counterclockwise winding. This function returns false if the winding of the points is clockwise, or if the points are collinear. The z-coordinates of the input points are ignored. -
def
isCCW(ax: Double, ay: Double, bx: Double, by: Double, cx: Double, cy: Double): Boolean
Given three points in 2d, represented as the Double pairs
(ax, ay)
,(bx, by)
, and(cx, cy)
, this function returns true if the three points, in the ordera
,b
, and thenc
, have a counterclockwise winding.Given three points in 2d, represented as the Double pairs
(ax, ay)
,(bx, by)
, and(cx, cy)
, this function returns true if the three points, in the ordera
,b
, and thenc
, have a counterclockwise winding. This function returns false if the winding of the points is clockwise, or if the points are collinear. -
def
isCollinear(a: Coordinate, b: Coordinate, c: Coordinate): Boolean
Given three points in 2d, represented as jts Coordinates, this function returns true if all three points lie on a single line, up to the limits of numerical precision.
Given three points in 2d, represented as jts Coordinates, this function returns true if all three points lie on a single line, up to the limits of numerical precision. The z-coordinates of the input points are ignored.
-
def
isCollinear(ax: Double, ay: Double, bx: Double, by: Double, cx: Double, cy: Double): Boolean
Given three points in 2d, represented as the Double pairs
(ax, ay)
,(bx, by)
, and(cx, cy)
, this function returns true if all three points lie on a single line, up to the limits of numerical precision. - def relativeTo(e0: Coordinate, e1: Coordinate, p: Coordinate): Int
-
def
relativeTo(e0x: Double, e0y: Double, e1x: Double, e1y: Double, px: Double, py: Double): Int
Given four points in 2d, represented as the Double pairs
(ax, ay)
,(bx, by)
,(cx, cy)
, and(dx, dy)
, this function determines if the unique circle having pointsa
,b
, andc
on its boundary (isCCW(a, b, c)
must be true) contains pointd
in its interior.