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

Add Union-style indexing to .points, .multipoints, .lines, and .polygons GeoSeries accessors #685

Merged

Conversation

thomcom
Copy link
Contributor

@thomcom thomcom commented Sep 21, 2022

Description

This PR uses the column._meta object to slice the sub-geometry accessors named in the title so that .x, .y, and .xy uses reflect any previous slicing that has occurred to the GeoSeries.

Fixes #683

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@github-actions github-actions bot added the Python Related to Python code label Sep 21, 2022
@thomcom thomcom added bug Something isn't working 3 - Ready for Review Ready for review by team non-breaking Non-breaking change and removed Python Related to Python code labels Sep 21, 2022
@thomcom thomcom marked this pull request as ready for review September 21, 2022 16:26
@thomcom thomcom requested a review from a team as a code owner September 21, 2022 16:26
@thomcom thomcom requested a review from cwharris September 21, 2022 16:26
Copy link
Contributor

@isVoid isVoid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

python/cuspatial/cuspatial/core/geoseries.py Outdated Show resolved Hide resolved
python/cuspatial/cuspatial/core/geoseries.py Outdated Show resolved Hide resolved
thomcom and others added 2 commits September 21, 2022 17:29
Co-authored-by: Michael Wang <isVoid@users.noreply.github.com>
Co-authored-by: Michael Wang <isVoid@users.noreply.github.com>
@github-actions github-actions bot added the Python Related to Python code label Sep 21, 2022
@thomcom
Copy link
Contributor Author

thomcom commented Sep 23, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 626ea58 into rapidsai:branch-22.10 Sep 23, 2022
rapids-bot bot pushed a commit that referenced this pull request Sep 30, 2022
This PR adds `docs/source/user_guide/index.ipynb`, a comprehensive description of the APIs available in cuspatial python and example code for each.

The APIs are separated in a table of contents by the logical structure we've settled on for their location in the API. The demonstrate uses the `cuspatial.` version of every API, none are accessed using their full python package address.

At the bottom I'm working on some examples of performing `contains` and `within`, DE-9IM operations that can be performed easily with `point-in-polygon`. Otherwise the document is complete.

Depends on #685 and #680

This contributes to or closes #599 by providing an example use case of all python APIs.

Authors:
  - H. Thomson Comer (https://github.com/thomcom)

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

URL: #666
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working non-breaking Non-breaking change Python Related to Python code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] .x and .y accessors do not reflect previous slicing.
2 participants