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]: point-polygon distance generate wrong result #1042

Closed
isVoid opened this issue Apr 6, 2023 · 0 comments · Fixed by #1043
Closed

[BUG]: point-polygon distance generate wrong result #1042

isVoid opened this issue Apr 6, 2023 · 0 comments · Fixed by #1043
Labels
bug Something isn't working Needs Triage Need team to review and classify

Comments

@isVoid
Copy link
Contributor

isVoid commented Apr 6, 2023

Version

23.04

On which installation method(s) does this occur?

Rapids-Compose

Describe the issue

Point polygon distance computes wrong result for some input.

Minimum reproducible example

In [30]: points = cuspatial.GeoSeries([
    ...:     MultiPoint([(0, 2)]), MultiPoint([(2, 3), (2, 1)])])

In [31]: polys = cuspatial.GeoSeries([Polygon([(2, 0), (0, 0), (1, 2), (2, 0)]), Polygon([(2, 0), (3, 2), (1, 2), (2, 0)])])

In [32]: cuspatial.pairwise_point_polygon_distance(points, polys)
Out[32]: 
0    0.000000
1    0.447214
dtype: float64


# Expected output:
# 0.894427190999916
# 0.0

Relevant log output

No response

Environment details

No response

Other/Misc.

No response

@isVoid isVoid added bug Something isn't working Needs Triage Need team to review and classify labels Apr 6, 2023
@github-project-automation github-project-automation bot moved this to Todo in cuSpatial Apr 6, 2023
@isVoid isVoid moved this from Todo to In Progress in cuSpatial Apr 6, 2023
@rapids-bot rapids-bot bot closed this as completed in #1043 Apr 7, 2023
rapids-bot bot pushed a commit that referenced this issue Apr 7, 2023
…functor (#1043)

This PR fixes #1042 . In `point_polygon_intersects`, the key comparator incorrectly uses the binary operator that's used for values.

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

Approvers:
  - H. Thomson Comer (https://github.com/thomcom)
  - Paul Taylor (https://github.com/trxcllnt)

URL: #1043
@github-project-automation github-project-automation bot moved this from In Progress to Done in cuSpatial Apr 7, 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 Needs Triage Need team to review and classify
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant