-
Notifications
You must be signed in to change notification settings - Fork 154
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
Add multilinestring_segment_manager
for segment related methods in multilinestring ranges
#1134
Add multilinestring_segment_manager
for segment related methods in multilinestring ranges
#1134
Conversation
…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
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
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 |
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