Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce multipoint_range interface; Refactors point_distance API to support multipoint to multipoint distance. #731

Merged
merged 20 commits into from
Oct 19, 2022

Conversation

isVoid
Copy link
Contributor

@isVoid isVoid commented Oct 5, 2022

Description

closes #704

Contributes to #703

This PR introduces Multipoint_range interface, and simplifies the API of point_distance. Also updates the point_distance to support multipoint-multipoint distance.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@isVoid isVoid added feature request New feature or request 2 - In Progress Currenty a work in progress breaking Breaking change labels Oct 5, 2022
@isVoid isVoid self-assigned this Oct 5, 2022
@github-actions github-actions bot added the libcuspatial Relates to the cuSpatial C++ library label Oct 5, 2022
@isVoid isVoid changed the title Introduce Multipoint_array interface; Refactors point_distance API to support multipoint to multipoint distance. Introduce multipoint_array interface; Refactors point_distance API to support multipoint to multipoint distance. Oct 5, 2022
@isVoid isVoid marked this pull request as ready for review October 5, 2022 23:05
@isVoid isVoid requested a review from a team as a code owner October 5, 2022 23:05
@isVoid isVoid added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currenty a work in progress labels Oct 5, 2022
@isVoid isVoid requested review from thomcom and harrism and removed request for zhangjianting and jrhemstad October 6, 2022 21:52
Copy link
Contributor

@thomcom thomcom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this interface, definitely in the direction of simplifying the way we deal with nested iterators.

cpp/tests/experimental/spatial/point_distance_test.cu Outdated Show resolved Hide resolved
cpp/tests/experimental/spatial/point_distance_test.cu Outdated Show resolved Hide resolved
Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. I have some questions / comments.

Comment on lines 35 to 38
std::optional<cudf::device_span<cudf::size_type const>> multipoints1_offset,
cudf::column_view const& points1_xy,
std::optional<cudf::device_span<cudf::size_type const>> multipoints2_offset,
cudf::column_view const& points2_xy,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be clearer to have the point columns before their optional multipoint offset parameters.

Suggested change
std::optional<cudf::device_span<cudf::size_type const>> multipoints1_offset,
cudf::column_view const& points1_xy,
std::optional<cudf::device_span<cudf::size_type const>> multipoints2_offset,
cudf::column_view const& points2_xy,
cudf::column_view const& points1_xy,
std::optional<cudf::device_span<cudf::size_type const>> multipoints1_offset,
cudf::column_view const& points2_xy,
std::optional<cudf::device_span<cudf::size_type const>> multipoints2_offset,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, I didn't realize there are multiple APIs that follow this style. I would say leave it alone then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I forgot to revert this suggestion before I merge. Will address in #734

cpp/include/cuspatial/experimental/point_distance.cuh Outdated Show resolved Hide resolved
cpp/tests/experimental/spatial/point_distance_test.cu Outdated Show resolved Hide resolved
@isVoid isVoid changed the title Introduce multipoint_array interface; Refactors point_distance API to support multipoint to multipoint distance. Introduce multipoint_range interface; Refactors point_distance API to support multipoint to multipoint distance. Oct 18, 2022
@isVoid isVoid requested a review from harrism October 18, 2022 17:42
@isVoid
Copy link
Contributor Author

isVoid commented Oct 19, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 930a2f3 into rapidsai:branch-22.12 Oct 19, 2022
isVoid added a commit to isVoid/cuspatial that referenced this pull request Oct 19, 2022
rapids-bot bot pushed a commit that referenced this pull request Oct 25, 2022
This PR adds python bindings to Point-point distance. Depend on #731 
Reverts change to comment: #731 (comment)

Close #578

Authors:
  - Michael Wang (https://github.com/isVoid)

Approvers:
  - Mark Harris (https://github.com/harrism)
  - H. Thomson Comer (https://github.com/thomcom)

URL: #734
rapids-bot bot pushed a commit that referenced this pull request Oct 28, 2022
…ing distance API (#747)

Follow up to #731 , this PR introduces a new range object named `multilinestring_range` and simplifies the point-linestring distance API. Closes #705 .

Authors:
  - Michael Wang (https://github.com/isVoid)

Approvers:
  - Mark Harris (https://github.com/harrism)
  - H. Thomson Comer (https://github.com/thomcom)

URL: #747
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team breaking Breaking change feature request New feature or request libcuspatial Relates to the cuSpatial C++ library
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Simplify header-only point_distance API, support multipoint
3 participants