Computes the distance between the facets (segments and vertices) of two {@link Geometry}s using a Branch-and-Bound algorithm. The Branch-and-Bound algorithm operates over a traversal of R-trees built on the target and possibly also the query geometries.
This approach provides the following benefits:
- Performance is improved due to the effects of the R-tree index and the pruning due to the Branch-and-Bound approach
- The spatial index on the target geometry can be cached to allow reuse in an incremental query situation.
Using this technique can be much more performant than using {@link #getDistance(Geometry)} when one or both input geometries are large, or when evaluating many distance computations against a single geometry.
This class is not thread-safe.
@author Martin Davis