Class PointLocation
- Namespace
- NetTopologySuite.Algorithm
- Assembly
- NetTopologySuite.dll
Functions for locating points within basic geometric structures such as lines and rings.
public static class PointLocation
- Inheritance
-
PointLocation
- Inherited Members
Methods
IsInRing(Coordinate, CoordinateSequence)
Tests whether a point lies inside or on a ring. The ring may be oriented in either direction. A point lying exactly on the ring boundary is considered to be inside the ring.
This method does not first check the point against the envelope of the ring.public static bool IsInRing(Coordinate p, CoordinateSequence ring)
Parameters
pCoordinateThe point to check for ring inclusion
ringCoordinateSequenceA
CoordinateSequencerepresenting the ring (which must have first point identical to last point)
Returns
- bool
trueif p is inside ring
IsInRing(Coordinate, Coordinate[])
Tests whether a point lies inside or on a ring. The ring may be oriented in either direction. A point lying exactly on the ring boundary is considered to be inside the ring.
This method does not first check the point against the envelope of the ring.public static bool IsInRing(Coordinate p, Coordinate[] ring)
Parameters
pCoordinateThe point to check for ring inclusion
ringCoordinate[]An array of coordinates representing the ring (which must have first point identical to last point)
Returns
- bool
trueif p is inside ring
- See Also
IsOnLine(Coordinate, CoordinateSequence)
Tests whether a point lies on the line defined by a list of coordinates.
public static bool IsOnLine(Coordinate p, CoordinateSequence line)
Parameters
pCoordinateThe point to test
lineCoordinateSequenceThe line coordinates
Returns
- bool
trueif the point is a vertex of the line or lies in the interior of a line segment in the line
IsOnLine(Coordinate, Coordinate[])
Tests whether a point lies on the line defined by a list of coordinates.
public static bool IsOnLine(Coordinate p, Coordinate[] line)
Parameters
pCoordinateThe point to test
lineCoordinate[]The line coordinates
Returns
- bool
trueif the point is a vertex of the line or lies in the interior of a line segment in the line
LocateInRing(Coordinate, CoordinateSequence)
Determines whether a point lies in the interior, on the boundary, or in the exterior of a ring.The ring may be oriented in either direction.
This method does not first check the point against the envelope of the ring.public static Location LocateInRing(Coordinate p, CoordinateSequence ring)
Parameters
pCoordinateThe point to check for ring inclusion
ringCoordinateSequenceA
CoordinateSequencerepresenting the ring (which must have first point identical to last point)
Returns
LocateInRing(Coordinate, Coordinate[])
Determines whether a point lies in the interior, on the boundary, or in the exterior of a ring.The ring may be oriented in either direction.
This method does not first check the point against the envelope of the ring.public static Location LocateInRing(Coordinate p, Coordinate[] ring)
Parameters
pCoordinateThe point to check for ring inclusion
ringCoordinate[]A
CoordinateSequencerepresenting the ring (which must have first point identical to last point)