This approach provides the following benefits:
This class is thread-safe.
Distances will be computed to all facets of the input geometry. The facets of the geometry are the discrete segments and points contained in its components. In the case of Lineal and Puntal inputs, this is equivalent to computing the conventional distance. In the case of Polygonal inputs, this is equivalent to computing the distance to the polygon boundaries.
For geometries with many segments or points, this can be faster than using a simple distance algorithm.