Class PointLocation
Functions for locating points within basic geometric structures such as lines and rings.
Inherited Members
Namespace: NetTopologySuite.Algorithm
Assembly: NetTopologySuite.dll
Syntax
public static class PointLocation
Methods
| Improve this Doc View SourceIsInRing(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.
Declaration
public static bool IsInRing(Coordinate p, Coordinate[] ring)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p | The point to check for ring inclusion |
Coordinate[] | ring | An array of coordinates representing the ring (which must have first point identical to last point) |
Returns
Type | Description |
---|---|
Boolean |
|
See Also
| Improve this Doc View SourceIsInRing(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.
Declaration
public static bool IsInRing(Coordinate p, CoordinateSequence ring)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p | The point to check for ring inclusion |
CoordinateSequence | ring | A |
Returns
Type | Description |
---|---|
Boolean |
|
IsOnLine(Coordinate, Coordinate[])
Tests whether a point lies on the line defined by a list of coordinates.
Declaration
public static bool IsOnLine(Coordinate p, Coordinate[] line)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p | The point to test |
Coordinate[] | line | The line coordinates |
Returns
Type | Description |
---|---|
Boolean |
|
IsOnLine(Coordinate, CoordinateSequence)
Tests whether a point lies on the line defined by a list of coordinates.
Declaration
public static bool IsOnLine(Coordinate p, CoordinateSequence line)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p | The point to test |
CoordinateSequence | line | The line coordinates |
Returns
Type | Description |
---|---|
Boolean |
|
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.
Declaration
public static Location LocateInRing(Coordinate p, Coordinate[] ring)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p | The point to check for ring inclusion |
Coordinate[] | ring | A |
Returns
Type | Description |
---|---|
Location | the Location of p relative to the ring |
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.
Declaration
public static Location LocateInRing(Coordinate p, CoordinateSequence ring)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p | The point to check for ring inclusion |
CoordinateSequence | ring | A |
Returns
Type | Description |
---|---|
Location |