-
Notifications
You must be signed in to change notification settings - Fork 150
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 find_and_combine_segment
internal API
#818
Add find_and_combine_segment
internal API
#818
Conversation
…into feature/merge_segment_pr
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.
Looking good.
cpp/include/cuspatial/experimental/detail/find/find_and_combine_segment.cuh
Outdated
Show resolved
Hide resolved
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.
Also LGTM.
cpp/include/cuspatial/experimental/detail/find/find_and_combine_segment.cuh
Show resolved
Hide resolved
…into feature/merge_segment_pr
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 work!
} | ||
|
||
/// Return the geometric center of segment. | ||
vec_2d<T> CUSPATIAL_HOST_DEVICE center() const { return midpoint(first, second); } |
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.
Would midpoint() be a better name?
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.
Aha! I thought about this too, and I think center
is a more generic name for the geometric-center of the geometry. Think about deconditioning the floating point coordinates as inversely translating the object with the -center
vector, do op and translate back. You can apply this sequence regardless of type of geometry you are dealing with. A box/circle may also have a geometry center and adopt the same sequence, albeit the implementation of .center
is different. I imagine .center
to exist in part of some super class Geometry2D
that will cover everything from point
, segment
, linestring_ref
, polygon_ref
. .center
is virtual function that can be implemented by all inherited classes.
@gpucibot merge |
This PR adds header only API `pairwise_linestring_intersection`. Closes #765 . Depends on #813 #818 #819 #851 Authors: - Michael Wang (https://github.com/isVoid) Approvers: - Mark Harris (https://github.com/harrism) - H. Thomson Comer (https://github.com/thomcom) URL: #852
Description
This PR adds
find_and_combine_segement
API. For each set of segments, this API writes the first mergeable segment with the merged result and set the flags of the rest merged segments to1
.Closes #816
Checklist