Class EnvelopeDistance
Utility functions for working with Envelopes.
Inherited Members
Namespace: NetTopologySuite.Index.Strtree
Assembly: NetTopologySuite.dll
Syntax
public class EnvelopeDistance
Methods
| Improve this Doc View SourceMaximumDistance(Envelope, Envelope)
Computes the maximum distance between the points defining two envelopes. This is the distance between the two corners which are farthest apart.
Note that this is NOT the MinMax distance, which is a tighter bound on the distance between the points in the envelopes.
Declaration
public static double MaximumDistance(Envelope env1, Envelope env2)
Parameters
Type | Name | Description |
---|---|---|
Envelope | env1 | An envelope |
Envelope | env2 | An envelope |
Returns
Type | Description |
---|---|
Double | The maximum distance between the points defining the envelopes |
MinMaxDistance(Envelope, Envelope)
Computes the Min-Max Distance between two Envelopes. It is equal to the minimum of the maximum distances between all pairs of edge segments from the two envelopes. This is the tight upper bound on the distance between geometric items bounded by the envelopes.
Theoretically this bound can be used in the R-tree nearest-neighbour branch-and-bound search instead of MaximumDistance(Envelope, Envelope). However, little performance improvement is observed in practice.
Declaration
public static double MinMaxDistance(Envelope a, Envelope b)
Parameters
Type | Name | Description |
---|---|---|
Envelope | a | An envelope |
Envelope | b | An envelope |
Returns
Type | Description |
---|---|
Double | The min-max-distance between the envelopes |