This repository was archived by the owner on Jul 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 161
Add multilinestring_segment_manager
for segment related methods in multilinestring ranges
#1134
Merged
rapids-bot
merged 30 commits into
rapidsai:branch-23.06
from
isVoid:fix/segment_iterator
Jun 1, 2023
Merged
Add multilinestring_segment_manager
for segment related methods in multilinestring ranges
#1134
rapids-bot
merged 30 commits into
rapidsai:branch-23.06
from
isVoid:fix/segment_iterator
Jun 1, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ti-geometry based
…y multigeometry test case.
segment_method
(tentative name) for segment related methods in geometry rangessegment_method
(tentative name) for segment related methods in geometry ranges. Refactors linestring_polygon_distance
to partially support inputs that has empty linestring or empty multipolygons
segment_method
(tentative name) for segment related methods in geometry ranges. Refactors linestring_polygon_distance
to partially support inputs that has empty linestring or empty multipolygonsmultilinestring_segment
for segment related methods in multilinestring ranges. Refactors linestring_polygon_distance
to partially support inputs that has empty linestring or empty multipolygons
multilinestring_segment
for segment related methods in multilinestring ranges. Refactors linestring_polygon_distance
to partially support inputs that has empty linestring or empty multipolygonsmultilinestring_segment
for segment related methods in multilinestring ranges
harrism
suggested changes
May 23, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice algorithmic improvement. Some doc suggestions, some questions.
cpp/include/cuspatial/detail/range/multilinestring_segment_range.cuh
Outdated
Show resolved
Hide resolved
cpp/include/cuspatial/detail/range/multilinestring_segment_range.cuh
Outdated
Show resolved
Hide resolved
cpp/include/cuspatial/detail/distance/linestring_polygon_distance.cuh
Outdated
Show resolved
Hide resolved
cpp/include/cuspatial/detail/distance/linestring_polygon_distance.cuh
Outdated
Show resolved
Hide resolved
…into fix/segment_iterator
…to fix/segment_iterator
multilinestring_segment
for segment related methods in multilinestring rangesmultilinestring_segment_manager
for segment related methods in multilinestring ranges
…into fix/segment_iterator
harrism
approved these changes
May 31, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the renamings. Looks good.
* segment iterators, call `segment_range()` function to create a non-owning object of this class. | ||
* | ||
* For detailed explanation on the implementation of the segment iterators, see documentation | ||
* of `multilinestring_segment_range`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does quoting documented symbol names prevent Doxygen from making them into clickable links?
/merge |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
improvement
Improvement / enhancement to an existing function
libcuspatial
Relates to the cuSpatial C++ library
non-breaking
Non-breaking change
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
closes #1055
This PR adds
multilinestring_segment_manager
owning class to track the lifetime of intermediate allocations that has to do with segment iterators. In additionmultilinestring_segment_range
is added as the non-owning class to the previous class to provide iterators to the segments. The syntax to use this object is like:Then a user can easily access the segments in the multilinestrings with:
Secondly, this PR includes tests that has empty geometry collections in the input, linestring_polygon_distance now correctly computes nans for these input pairs.
In addition,
CUSPATIAL_EXPECTS_VALID_MULTI*_SIZES
is relaxed. Valid polygon and ring sizes are only implicitly required but not checked via the size of the arrays since they are insufficient checks. Accordingly, some tests are also relaxed.Checklist