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

[FEA] Support GeoSeries.distance #759

Closed
3 tasks
Tracked by #767
isVoid opened this issue Oct 29, 2022 · 0 comments · Fixed by #1231
Closed
3 tasks
Tracked by #767

[FEA] Support GeoSeries.distance #759

isVoid opened this issue Oct 29, 2022 · 0 comments · Fixed by #1231
Assignees
Labels
feature request New feature or request
Milestone

Comments

@isVoid
Copy link
Contributor

isVoid commented Oct 29, 2022

Is your feature request related to a problem? Please describe.
GeoPandas.GeoSeries.distance computes row-wise (pair-wise) shortest distance between geometries of a row. This matches ST_Distance(geometric) requirement.

Describe the solution you'd like
With all type combination between distances, We need to group geoseries into 6 groups:

point-point
point-linestring
point-polygon
linestring-polygon
linestring-linestring
polygon-polygon

Dispatch each group to the pairwise_X_Y_distance function. Return the result by scattering the result to original index alignment.

Groupby is performed on a dataframe with the typecodes from the two operands as key, indices from the two operances as value.

Tasks

  1. feature request libcuspatial
    isVoid
  2. 0 of 2
    feature request libcuspatial
    isVoid
  3. Cython feature request
    isVoid
@isVoid isVoid added feature request New feature or request Needs Triage Need team to review and classify labels Oct 29, 2022
@isVoid isVoid added this to the ST_Distance milestone Oct 29, 2022
@jarmak-nv jarmak-nv removed the Needs Triage Need team to review and classify label Mar 1, 2023
@isVoid isVoid self-assigned this Mar 6, 2023
@isVoid isVoid mentioned this issue Jul 26, 2023
5 tasks
rapids-bot bot pushed a commit that referenced this issue Jul 31, 2023
closes #759
This PR adds `geoseries.distance`, computing distances between two geoseries.

Benchmarking distance API is a complicated task. Below I present the benchmark of a simplest case: distance between a pair of point geoseries. geopandas is also quite fast when computing simple point distances, througput peaks at 1e5 and gets surpassed by cuspatial for larger data sizes. Both geopandas and cuspatial sees performance drop when dealing with index alignments.

![image](https://github.com/rapidsai/cuspatial/assets/13521008/dc0772f4-2b35-41da-883c-39ba4e731f6a)


TODO:
- [x] Support distance to a single shapely object.
- [x] Benchmark against geopandas.

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

Approvers:
  - Mark Harris (https://github.com/harrism)
  - H. Thomson Comer (https://github.com/thomcom)

URL: #1231
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants