facetDistance method

double facetDistance(
  1. Geometry g
)

Computes the distance from the base geometry to the given geometry.

@param g the geometry to compute the distance to

@return the computed distance

Implementation

double facetDistance(Geometry g) {
  STRtree tree2 = FacetSequenceTreeBuilder.build(g);
  List<Object>? obj =
      cachedTree!.nearestNeighbourWithTree(tree2, FACET_SEQ_DIST);
  FacetSequence fs1 = obj![0] as FacetSequence;
  FacetSequence fs2 = obj[1] as FacetSequence;
  return fs1.distance(fs2);
}