-
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 Multi-Geometry support to point_linestring_distance
and build python bindings
#660
Merged
rapids-bot
merged 80 commits into
rapidsai:branch-22.10
from
isVoid:feature/python_multi_linestring_distance
Sep 13, 2022
Merged
Changes from all commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
de78310
Initial to atomics refactoring
isVoid 6011900
Initial refactoring geometry utilities
isVoid 9761eab
Add header only api
isVoid 2ed60eb
Add cudf column API
isVoid e3ec12d
cmake updates
isVoid a72ac10
inline atomics to avoid compiling RDC
isVoid 31b1e78
Rename to proper naming convention
isVoid f55af2f
make all atomics inline
isVoid e874f3b
Merge branch 'improvement/device_atomics_refactor' into feature/point…
isVoid e9b2ca8
Merge branch 'improvement/geometry_utilities' into feature/point_line…
isVoid f2277f0
Changes header only API to accept only single offset iterator
isVoid 7bc0914
Add header only API tests
isVoid a8ec5ff
Update cudf column API calls
isVoid 1fdfd59
Initial add utility method
isVoid 0274875
Add counting transform iterators
isVoid df286a0
Revert "Update cudf column API calls"
isVoid 688fbb5
Revert "Add cudf column API"
isVoid d0c0c4f
Merge branch 'branch-22.08' of https://github.com/rapidsai/cuspatial …
isVoid 1c4ad61
Update refactored helper locations
isVoid e4038a5
Add cudf column API
isVoid 5004bbe
Add equality test utility and fix header only tests
isVoid 986dbb2
minor docstring updates
isVoid 2feab4b
Add cudf column API documentation
isVoid 5e07194
Include point-linestring distance files in docs.
isVoid 4834aa2
Apply suggestions from code review
isVoid de0feb7
Address review comments
isVoid c897974
Merge branch 'feature/header_only_point_linestring_distance' of githu…
isVoid 6dc34e0
Merge branch 'branch-22.10' of https://github.com/rapidsai/cuspatial …
isVoid 624a97f
Fix broken builds
isVoid b65d9b2
Add missing thrust headers for `points_in_range`
isVoid c57cad6
Add missing thrust header
isVoid e2235b0
Use 256 tpb
isVoid 45787e8
Fix Thrust includes.
bdice f1da463
Merge pull request #2 from bdice/fix-thrust-includes-header_only_poin…
isVoid b5aca2d
Address potential OOB issue
isVoid b88a7bb
Merge branch 'feature/header_only_point_linestring_distance' of githu…
isVoid b3e7fd7
Implement correct grid-stride loop behavior and last-point guard cond…
isVoid bd1f62b
Initial rewriting the API to geoarrow format
isVoid cb27513
Initial refactoring of tests
isVoid e2d4f9c
Fix offset iterator
isVoid 6ac10a7
Remove constraint on output iterator
isVoid ecbfc2e
Address review comments
isVoid e006d94
Add multi-geometry capability and passing tests
isVoid 92b1a68
Rename c++ variables to geoarrow-spec std
isVoid 05b4f1a
Add more cpp tests for multi-geoms
isVoid 5448e68
create cython bindings for pairwise_point_linestring_distance
isVoid 67bb794
Merge branch 'branch-22.10' of https://github.com/rapidsai/cuspatial …
isVoid 12ad78d
add simple test case
isVoid 0aae6d3
add specified column accessors
isVoid ee0b34f
add utility to check single typed geoseries
isVoid 20c4f89
add point_linestring_distance python API
isVoid 95e76e0
experiment on multi geometry dispatcher
isVoid 55764a4
Merge branch 'branch-22.10' of https://github.com/rapidsai/cuspatial …
isVoid b3e6f90
Merge branch 'branch-22.10' of https://github.com/rapidsai/cuspatial …
isVoid 4d73c5a
fix certain imports for python api
isVoid 10d309b
Add column utility for single type geometries
isVoid be8c9eb
minor renames
isVoid 0df550c
include randomly generated input tests and raise tests
isVoid 954f9c9
factor out get_geometry_iterator
isVoid 0db51ae
rename detail functions
isVoid dfef5d9
add comments to kernel
isVoid 3f4b85a
add documentation
isVoid 08db4de
add notes section
isVoid 88d0a21
remove unsued code
isVoid c12464e
remove more unused code
isVoid fe85767
Apply suggestions from code review
isVoid 2183fa4
remove `cartesian_2d`
isVoid 7329c1b
style
isVoid adc0e43
Merge branch 'branch-22.10' of https://github.com/rapidsai/cuspatial …
isVoid d8f3a6a
Update python API docs
isVoid f42211d
rename dispatcher, add documentation
isVoid fddba19
Rename multi-geom dispatch file.
isVoid 8cbc55d
Add iterator functor docstring
isVoid 6c57187
Update docstring
isVoid 102cb0e
Apply suggestions from code review
isVoid 71f199d
docstring update
isVoid cb66b5a
make template parameter docstring clearer
isVoid 8307562
Apply suggestions from code review
isVoid c435e79
style
isVoid e255277
Merge branch 'feature/python_multi_linestring_distance' of github.com…
isVoid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
This is an entirely theoretical suggestion that relates to all the other multi arrays, particularly
MultiLinestring
andMultiPolygon
. It seems like, instead of using an iterator for thelinestring_part_offsets
, and another iterator for thelinestring_geometry_offsets
, that we should have an iterator for thelinestring_geometry_offsets
which also contains the iterator for theparts
. We need fewer arguments and the ability to iterate through "all linestrings and linestring parts" is encapsulated into a single iterator. A theoretical suggestion, I don't know how to do it, possible?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.
I believe you are just looking at a recursive templated iterator collection, there's some maximum level that c++ compiler allows the templates to be recursively nested within itself, but multilinestring should be well within that limit.
Does this make sense to you? https://godbolt.org/z/v95jn5G3e
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.
Yes, that's more or less exactly what I was thinking of. Do you think it works in the context of your 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.
This really is just my first attempt to take a stab at the idea. I'd like to have some more feedbacks before we decide on the iterator collection interface. So no, not planning to put this in this PR.
cc @harrism
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.
There could be other simpler solutions, like just a
MultiLinestringIteratorCollection
class for example: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.
This deviates a little bit from you original suggestion of having a custom iterator to represent a nested of iterator. I believe you meant to create a custom iterator that iterates over the multilinestring array, when you dereference this iterator, it returns a multilinestring - which in turn has its own iterator, and allows you to iterate into each linestring, segment and points etc. Besides, we should provide different level of iterators so that developer can pick their use-case defined parallel model as needed.
I don't have a working example, but something like:
But beware of the overheads you would run into when constructing these data structure per threads.