Namespace NetTopologySuite.Operation.Distance
Provides classes for computing the distance between geometries
Classes
ConnectedElementLocationFilter
A ConnectedElementPointFilter extracts a single point from each connected element in a Geometry (e.g. a polygon, linestring or point) and returns them in a list. The elements of the list are GeometryLocations. Empty geometries do not provide a location item.
ConnectedElementPointFilter
Extracts a single point from each connected element in a Geometry (e.g. a polygon, linestring or point) and returns them in a list
DistanceOp
Computes the distance and
closest points between two Geometry
s.
The distance computation finds a pair of points in the input geometries
which have minimum distance between them. These points may
not be vertices of the geometries, but may lie in the interior of
a line segment. In this case the coordinate computed is a close
approximation to the exact point.
Empty geometry collection components are ignored.
The algorithms used are straightforward O(n^2) comparisons. This worst-case performance could be improved on by using Voronoi techniques.
FacetSequence
Represents a sequence of facets (points or line segments) of a Geometry specified by a subsequence of a CoordinateSequence.
FacetSequenceTreeBuilder
Utility class to build facet sequencs STRtrees-
GeometryLocation
Represents the location of a point on a Geometry. Maintains both the actual point location (which may not be exact, if the point is not a vertex) as well as information about the component and segment index where the point occurs. Locations inside area Geometrys will not have an associated segment index, so in this case the segment index will have the sentinel value of InsideArea.
IndexedFacetDistance
Computes the distance between the facets (segments and vertices) of two Geometrys using a Branch-and-Bound algorithm. The Branch-and-Bound algorithm operates over a traversal of R-trees built on the target and the query geometries.
This approach provides the following benefits:
- Performance is dramatically improved due to the use of the R-tree index and the pruning due to the Branch-and-Bound approach
- The spatial index on the target geometry is cached which allow reuse in an repeated query situation.