public class PointLocation
extends java.lang.Object
Constructor | Description |
---|---|
PointLocation() |
Modifier and Type | Method | Description |
---|---|---|
static boolean |
isInRing(Coordinate p,
Coordinate[] ring) |
Tests whether a point lies inside or on a ring.
|
static boolean |
isOnLine(Coordinate p,
Coordinate[] line) |
Tests whether a point lies on the line defined by a list of
coordinates.
|
static boolean |
isOnLine(Coordinate p,
CoordinateSequence line) |
Tests whether a point lies on the line defined by a
CoordinateSequence . |
static int |
locateInRing(Coordinate p,
Coordinate[] ring) |
Determines whether a point lies in the interior, on the boundary, or in the
exterior of a ring.
|
public static boolean isOnLine(Coordinate p, Coordinate[] line)
p
- the point to testline
- the line coordinatespublic static boolean isOnLine(Coordinate p, CoordinateSequence line)
CoordinateSequence
.p
- the point to testline
- the line coordinatespublic static boolean isInRing(Coordinate p, Coordinate[] ring)
This method does not first check the point against the envelope of the ring.
p
- point to check for ring inclusionring
- an array of coordinates representing the ring (which must have
first point identical to last point)locatePointInRing
public static int locateInRing(Coordinate p, Coordinate[] ring)
This method does not first check the point against the envelope of the ring.
p
- point to check for ring inclusionring
- an array of coordinates representing the ring (which must have
first point identical to last point)Location
of p relative to the ringCopyright © 2018. All rights reserved.