cuspatial icon indicating copy to clipboard operation
cuspatial copied to clipboard

[DISCUSSION] `ST_DISTANCE` Method Namings

Open isVoid opened this issue 3 years ago • 2 comments

Orginally ported from https://github.com/rapidsai/cuspatial/pull/558#discussion_r906307896

Considering the st_distance covers many geometry combinations, there needs to be a way to make each distance primitive easy to find by users.

File Organizations

All distances files should live under distance folder. Name of the file should include the name of geometries in the operation, ranking from low dimension to high dimension. For example, methods computing distances between point and linestring distance should be placed in point_linestring_distance.cuh.

Method namings

The method should be prepended with the parallel model, which could be either pairwise or all_pairs. Followed by the type of the distance operator. In order to support reflected operation between geometries, there can be an extra argument "reflected" for control. For example, pairwise_point_linestring_distance vectorizes computation between an array of point and an equal length array of linestrings.

isVoid avatar Jul 28 '22 18:07 isVoid

Should mention the rule for when testing the same geometry, e.g. point-to-point distance. Is it named pairwise_point_to_point_distance or pairwise_point_distance?

Should we consider making the distance metric a parameter of these methods? Then the current "haversine" distance would go away, and a haversine metric would be a parameter to pairwise_point_distance. directed_hausdorff_distance would become all_pairs_point_distance with a directed_hausdorff metric parameter.

Ultimately the types of the first and second geometries could be parameters of a higher level distance() API which dispatches to these lower-level APIs.

harrism avatar Jul 28 '22 21:07 harrism

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

github-actions[bot] avatar Sep 23 '22 12:09 github-actions[bot]

I think the discussion is settled. Closing.

isVoid avatar Apr 07 '23 21:04 isVoid