Skip to content
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]: pairwise_linestring_intersection returns a degenerate LineString #1091

Closed
thomcom opened this issue Apr 24, 2023 · 0 comments · Fixed by #1093
Closed

[BUG]: pairwise_linestring_intersection returns a degenerate LineString #1091

thomcom opened this issue Apr 24, 2023 · 0 comments · Fixed by #1093
Assignees
Labels
bug Something isn't working non-breaking Non-breaking change

Comments

@thomcom
Copy link
Contributor

thomcom commented Apr 24, 2023

Version

23.06

On which installation method(s) does this occur?

Rapids-Compose

Describe the issue

Instead of returning a point at the point of intersection, pairwise_linestring_intersection returns a degenerate linestring when the LineString is in the shape of a closed polygon:

Minimum reproducible example

# PLI Degenerate Linestring

line = cuspatial.GeoSeries([LineString([(-1, 0), (0, 0)])])
square = cuspatial.GeoSeries([LineString([(0, 0), (0, 1), (1, 1), (1, 0), (0, 0)])])
pli = cuspatial.core.binops.intersection.pairwise_linestring_intersection(
    line, square
)
pli


### Relevant log output

```shell
(<cudf.core.column.numerical.NumericalColumn object at 0x7fc0fd0e1640>
 [
   0,
   1
 ]
 dtype: int32,
 0    LINESTRING (0.00000 0.00000, 0.00000 0.00000)
 dtype: geometry,
   lhs_linestring_id lhs_segment_id rhs_linestring_id rhs_segment_id
 0               [0]            [0]               [0]            [3])


### Environment details

_No response_

### Other/Misc.

Instead of returning a `LineString` with the same start and end point, `pairwise_linestring_intersection` should return a `Point`.
@thomcom thomcom added bug Something isn't working non-breaking Non-breaking change labels Apr 24, 2023
@isVoid isVoid moved this from Todo to Review in cuSpatial Apr 25, 2023
rapids-bot bot pushed a commit that referenced this issue Apr 27, 2023
…nt touch at endpoints is miscomputed as a degenerate segment (#1093)

Fixes #1091

Authors:
  - Michael Wang (https://github.com/isVoid)

Approvers:
  - Mark Harris (https://github.com/harrism)

URL: #1093
@github-project-automation github-project-automation bot moved this from Review to Done in cuSpatial Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change
Projects
Status: Done
2 participants