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

Use of cuspatial in examples is outdated #325

Closed
hcho3 opened this issue Jan 24, 2024 · 1 comment · Fixed by #329
Closed

Use of cuspatial in examples is outdated #325

hcho3 opened this issue Jan 24, 2024 · 1 comment · Fixed by #329
Assignees
Labels
bug Something isn't working

Comments

@hcho3
Copy link
Contributor

hcho3 commented Jan 24, 2024

The use of the Haversine distance from cuSpatial is no longer up to date in examples rapids-ec2-mnmg and rapids-autoscaling-multi-tenant-kubernetes.

cuspatial.haversine_distance(
        df["pickup_longitude"],
        df["pickup_latitude"],
        df["dropoff_longitude"],
        df["dropoff_latitude"],
    )

should be updated to

    pickup = cuspatial.GeoSeries.from_points_xy(
        part[["pickup_longitude", "pickup_latitude"]].interleave_columns()
    )
    dropoff = cuspatial.GeoSeries.from_points_xy(
        part[["dropoff_longitude", "dropoff_latitude"]].interleave_columns()
    )
    res = cuspatial.haversine_distance(pickup, dropoff)
    res.index = part.index
    return res

to use the latest API.

@jacobtomlinson
Copy link
Member

Fixed by #336 and #329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants