public class PointLocation extends Object
| Constructor and Description |
|---|
PointLocation() |
| Modifier and Type | Method and 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 boolean |
isOnSegment(Coordinate p,
Coordinate p0,
Coordinate p1)
Tests whether a point lies on a line segment.
|
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 isOnSegment(Coordinate p, Coordinate p0, Coordinate p1)
p - the point to testp0 - a point of the line segmentp1 - a point of the line segmentpublic 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)locateInRing(Coordinate, Coordinate[])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 © 2024. All rights reserved.