geos
geos copied to clipboard
Surface the chosen points in the C API (and threadsafe C API) for `GEOSHausdorffDistance` and `GEOSHausdorffDistanceDensify`
The discrete Hausdorff distance class in include/geos/algorithm/distance/DiscreteHausdorffDistance.h when used to compute the Hausdorff distance populates a point pair distance and includes the ability to retrieve the pair of points used to compute the Hausdorff distance metric with getCoordinates, but this function is not surfaced through the C API.
This issue requests surfacing of that functionality. Some suggested avenues:
- Add a
PointPairsstruct to the C API and a correspondingPointPairs* pointsargument toGEOSHausdorffDistanceandGEOSHausdorffDistanceDensify. If that pointer is non-null, return the chosen points. - (To maximize backwards compatibility) similar to (1), but add two new functions,
GEOSHausdorffDistanceWithPointsandGEOSHausdorffDistanceDensifyWithPoints, which include (required non-null) pointer to thePointPairsstructure. - As (2), but instead of a
PointPairsstruct,GEOSHausdorffDistanceWithPointsand its counterpart densify function take four additional pointers to doubles:pt1_x,pt1_y,pt2_x, andpt2_y.
I'd lean towards option 3.