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
| Edit this page 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 |
---|---|
bool |
|
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.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 |
---|---|
bool |
|
See Also
| Edit this page View SourceIsOnLine(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 |
---|---|
bool |
|
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 |
---|---|
bool |
|
IsOnSegment(Coordinate, Coordinate, Coordinate)
Tests whether a point lies on a line segment.
Declaration
public static bool IsOnSegment(Coordinate p, Coordinate p0, Coordinate p1)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p | The point to test |
Coordinate | p0 | A point of the line segment |
Coordinate | p1 | A point of the line segment |
Returns
Type | Description |
---|---|
bool |
|
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 |
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 |