Class PointLocator
Computes the topological relationship (Location) of a single point to a Geometry.
Inherited Members
Namespace: NetTopologySuite.Algorithm
Assembly: NetTopologySuite.dll
Syntax
public class PointLocator
Remarks
A IBoundaryNodeRule may be specified to control the evaluation of whether the point lies on the boundary or not The default rule is to use the SFS Boundary Determination Rule
Notes:
Instances of this class are not reentrant.
Constructors
| Improve this Doc View SourcePointLocator()
Initializes a new instance of the PointLocator class.
The default boundary rule is EndpointBoundaryRule.
Declaration
public PointLocator()
PointLocator(IBoundaryNodeRule)
Initializes a new instance of the PointLocator class using the provided
boundaryRule
.
Declaration
public PointLocator(IBoundaryNodeRule boundaryRule)
Parameters
Type | Name | Description |
---|---|---|
IBoundaryNodeRule | boundaryRule | The boundary rule to use. |
Methods
| Improve this Doc View SourceIntersects(Coordinate, Geometry)
Convenience method to test a point for intersection with a Geometry
Declaration
public bool Intersects(Coordinate p, Geometry geom)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p | The coordinate to test. |
Geometry | geom | The Geometry to test. |
Returns
Type | Description |
---|---|
Boolean |
|
Locate(Coordinate, Geometry)
Computes the topological relationship ({Location}) of a single point to a Geometry. It handles both single-element and multi-element Geometries. The algorithm for multi-part Geometries takes into account the boundaryDetermination rule.
Declaration
public Location Locate(Coordinate p, Geometry geom)
Parameters
Type | Name | Description |
---|---|---|
Coordinate | p | |
Geometry | geom |
Returns
Type | Description |
---|---|
Location | The Location of the point relative to the input Geometry. |