cuspatial
cuspatial copied to clipboard
Add Point Linestring Distance
This PR adds point to linestring distance.
Contributes to #231
This PR has been labeled inactive-30d
due to no recent activity in the past 30 days. Please close this PR if it is no longer required. Otherwise, please respond with a comment indicating any updates. This PR will be labeled inactive-90d
if there is no activity in the next 60 days.
Probably should retarget to 22.10?
Will review in the morning.
points_in_range.cuh
hausdorff_test.cu
was missing thrust headers and stopped CI. Curious why it was passing compilation before...
rerun tests
(Seems like the rest of the CI is blocked by the fixes included in this PR)
The last test failure was results from the incorrect grid-stride loop guard condition. The last point of the last linestring point array should not be accessed since each iteration handles one line-segment. Thus the guard condition should be:
idx < std::distance(linestring_points_first, thrust::prev(linestring_points_last));
The skip condition in the loop is also missing a check on OB iterator. And should skip iteration to next grid-stride instead of just returning. (The length of each linestring does not correlate with grid-stride).
if (offsets_iter != linestring_offsets_last and *offsets_iter - 1 == idx) { continue; }
@thomcom I believe I have added the geoarrow point array format and offset array format support per your review above. The good news is I almost didn't have to touch the kernel at all. To your question:
I'm interested to find out in this if it works without modification.
The answer is positive.
One last thing that's missing from making this fully geoarrow compliant is supporting multi-linestring and multi-point. Since that's a pretty big change to the code, after a second thought, I'm planning to submit it as a separate PR.
Other than this I believe there's an open question for docstrings. If you agree, can we punt the question to later PR and proceed with this one?
@gpucibot merge
Thanks to all reviewers, a draft follow up PR is up as promised: https://github.com/rapidsai/cuspatial/pull/660