-
Notifications
You must be signed in to change notification settings - Fork 158
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
[BUG]: Bad results returned from pairwise_linestring_intersection
on large self-equal LineStrings.
#1200
Comments
pairwise_linestring_intersection
on large LineStrings.pairwise_linestring_intersection
on large self-equal LineStrings.
Definitely sounds like a valid input. This pattern that the bug only emerge with large input makes me think if this is the same error as last time - misusing the thrust API where input and output must not overlap. |
Confirmed reproducible in C++. |
This was referenced Jun 29, 2023
rapids-bot bot
pushed a commit
that referenced
this issue
Jul 25, 2023
This PR is part-1 fix to \#1200. In `find_and_combine_segments` the N^2 algorithm depends on the fact that the API needs to be presorted with certain criteria. This Pr adds such sorting. Authors: - Michael Wang (https://github.com/isVoid) Approvers: - Mark Harris (https://github.com/harrism) - H. Thomson Comer (https://github.com/thomcom) URL: #1207
rapids-bot bot
pushed a commit
that referenced
this issue
Jul 28, 2023
EDIT: the thrust bug is a known issue. Tracked by NVIDIA/cccl#153 This PR fixes an issue in `remove_if`. Strangely, when calling `reduce_by_key` with iterator to integer, and when using `thrust::plus<index_t>()`, even if by definition the argument type of the plus operator is strongly typed with a higher bit width integer type, and I expected that the flags (`uint8_t`) were cast to the higher bit depth before addition, the overflow still happens. I have filed a thread in the thrust channel to discuss if this is a bug in thrust. Meanwhile, a quick WAR is to explicitly use a transform iterator to cast the uchar in to `index_t` before adding. This should give the correct result. Fixes #1200 Depend on #1207 Authors: - Michael Wang (https://github.com/isVoid) - H. Thomson Comer (https://github.com/thomcom) Approvers: - Mark Harris (https://github.com/harrism) - H. Thomson Comer (https://github.com/thomcom) URL: #1209
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
23.08
On which installation method(s) does this occur?
Rapids-Compose
Describe the issue
Hiya! I found a new issue with
pairwise_linestring_intersection
today working on the Watershed Demo Notebook for Release 23.06.When
pairwise_linestring_intersection
is called using the same linestring for the left and right hand sides, results are unpredictable and eventually fail as the linestring size increases. The API fails because the second element returned bypairwise_linestring_intersection
eventually creates an invalidGeoSeries
object with bad offsets.For the reproducer, I created a LineString comprised of diagonal segments of length$sqrt(2)$ originating at the origin and rising by 1 in x and y. The LineString then connects the highest point along the diagonal with a point directly beneath it $(x, 0)$ , and that returns to the origin making a closed LineString.
With this specific example, valid (though strange) results are returned up to a LineString of length 129. At 130 the API returns a broken GeoSeries for
geoms
. The results are strange because the firstn
of the segments get grouped into a single segment semi-randomly, say,((0, 0), (32, 32))
, and then the subsequent segments all are returned separately:((32, 32), (33, 33)), ((33, 33), (34, 34))
, etc.Is this a valid error? There are two constraints that maybe make this invalid:
I can see from the result returned here:
That types_buffer when the length of the LineString is 130 all come back as points, that is,
type = 0
. When the length of the LineString is 129, they are returned correctly astype = 2
.look_back_ids
are also corrupt at length 130 and apparently valid at length 129 in this case.Minimum reproducible example
Relevant log output
Environment details
No response
Other/Misc.
No response
The text was updated successfully, but these errors were encountered: