Table of Contents

Class EnvelopeDistance

Namespace
NetTopologySuite.Index.Strtree
Assembly
NetTopologySuite.dll

Utility functions for working with Envelopes.

public class EnvelopeDistance
Inheritance
EnvelopeDistance
Inherited Members

Constructors

EnvelopeDistance()

public EnvelopeDistance()

Methods

MaximumDistance(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.
public static double MaximumDistance(Envelope env1, Envelope env2)

Parameters

env1 Envelope

An envelope

env2 Envelope

An envelope

Returns

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.
public static double MinMaxDistance(Envelope a, Envelope b)

Parameters

a Envelope

An envelope

b Envelope

An envelope

Returns

double

The min-max-distance between the envelopes