Skip to content

Surface the chosen points in the C API (and threadsafe C API) for GEOSHausdorffDistance and GEOSHausdorffDistanceDensify #1327

@markt-latai

Description

@markt-latai

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:

  1. Add a PointPairs struct to the C API and a corresponding PointPairs* points argument to GEOSHausdorffDistance and GEOSHausdorffDistanceDensify. If that pointer is non-null, return the chosen points.
  2. (To maximize backwards compatibility) similar to (1), but add two new functions, GEOSHausdorffDistanceWithPoints and GEOSHausdorffDistanceDensifyWithPoints, which include (required non-null) pointer to the PointPairs structure.
  3. As (2), but instead of a PointPairs struct, GEOSHausdorffDistanceWithPoints and its counterpart densify function take four additional pointers to doubles: pt1_x, pt1_y, pt2_x, and pt2_y.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or feature improvement.Good First IssueNew developers consider for experience.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions