Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Add segment Iterators, test multi*_range and miscellaneous lazy iterator additions#1026

Merged
rapids-bot[bot] merged 21 commits intorapidsai:branch-23.04from
isVoid:feature/segment_iterators
Apr 5, 2023
Merged

Add segment Iterators, test multi*_range and miscellaneous lazy iterator additions#1026
rapids-bot[bot] merged 21 commits intorapidsai:branch-23.04from
isVoid:feature/segment_iterators

Conversation

@isVoid
Copy link
Copy Markdown
Contributor

@isVoid isVoid commented Mar 31, 2023

Description

closes #1025

This PR adds RAI segment iterators to multilinestring_range and multipolygon_range.

Caveats: this iterator currently will fail if the range contains empty geometries (such as an empty linestring or an empty polygon).

Usage example:

multilinestring_range:
geometry: {0, 1, 2}
part: {0, 3, 6}
coordinates: {{0, 0}, {1, 1}, {2, 2}, {10, 10}, {11, 11}, {12, 12}}

range.segment_begin()[0] == {0, 0}, {1, 1}
range.segment_begin()[1] == {1, 1}, {2, 2}
range.segment_begin()[2] == {10, 10}, {11, 11}
range.segment_begin()[3] == {11, 11}, {12, 12}

range.num_segments() == 4

This PR also adds a few helper methods that will be used in pairwise_linestring_polygon_distance API. All of them are tested. Contributes to #991

Checklist

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

@github-actions github-actions bot added cmake Related to CMake code or build configuration libcuspatial Relates to the cuSpatial C++ library labels Mar 31, 2023
@isVoid isVoid changed the title [skip-ci] Add Segment Iterators, Test Multi*_range and Miscllaneous addition to ranges [skip-ci] Add Segment Iterators, Test Multi*_range and Miscllaneous lazy iterator additions Mar 31, 2023
@isVoid isVoid changed the title [skip-ci] Add Segment Iterators, Test Multi*_range and Miscllaneous lazy iterator additions Add Segment Iterators, Test Multi*_range and Miscllaneous lazy iterator additions Apr 1, 2023
@isVoid isVoid added the 3 - Ready for Review Ready for review by team label Apr 1, 2023
@isVoid isVoid self-assigned this Apr 1, 2023
@isVoid isVoid added feature request New feature or request non-breaking Non-breaking change labels Apr 1, 2023
@isVoid isVoid marked this pull request as ready for review April 1, 2023 00:16
@isVoid isVoid requested review from a team as code owners April 1, 2023 00:16
@isVoid isVoid removed the request for review from robertmaynard April 3, 2023 21:41
@harrism harrism changed the title Add Segment Iterators, Test Multi*_range and Miscllaneous lazy iterator additions Add segment Iterators, test multi*_range and miscellaneous lazy iterator additions Apr 4, 2023
@isVoid isVoid requested a review from harrism April 4, 2023 17:33
@isVoid
Copy link
Copy Markdown
Contributor Author

isVoid commented Apr 5, 2023

/merge

@rapids-bot rapids-bot bot merged commit c5d8240 into rapidsai:branch-23.04 Apr 5, 2023
rapids-bot bot pushed a commit that referenced this pull request Apr 6, 2023
This PR adds `linestring-polygon` distance API. This API divides up the work into two parts: point-in-polygon test and a load-balanced all-pairs segment-segment distance compute kernel.

Closes #1027 
Depends on #1026 
Contributes to #757

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

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

URL: #1011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3 - Ready for Review Ready for review by team cmake Related to CMake code or build configuration feature request New feature or request libcuspatial Relates to the cuSpatial C++ library non-breaking Non-breaking change

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

[FEA]: Random Access Segment Iterators for Ranges

3 participants