cuspatial
cuspatial copied to clipboard
Polygon-polygon distance can be optimized to compute distances between corresponding ring
For 2 disjoint polygons, there can be only 2 cases: none of the rings of A and B includes each other; or A is within a hole of B. The PiP test can be modified to record the "engaging ring" for both polygons.
In the next step computing distances, only the corresponding ring needs to be considered. Currently, all rings are considered and therefore is redundant.
Originally posted by @isVoid in https://github.com/rapidsai/cuspatial/pull/1065#discussion_r1175633911