-
-
Notifications
You must be signed in to change notification settings - Fork 954
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
DOC: add a guide on spatial indexing #3498
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @martinfleis ; overall this looks great. I added some text suggestions to consider.
Is there a way to avoid the Out[33]: <Axes: >
in the rendered code outputs? (looking at readthedocs output here)
I spent some time playing with it while writing this with no solution. The only one we could opt for is switching RST for ipynb and let nbsphinx parse it. Then it will consider the whole cell as one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is quite a nice explanation of how sindex can be leveraged, I guess the real test comes when users try it but it's a solid foundation.
Note that for many operations where a spatial index provides significant | ||
performance benefits, GeoPandas already uses it automatically (like :meth:`~GeoDataFrame.sjoin`, | ||
:meth:`~GeoDataFrame.overlay`, or :meth:`~GeoDataFrame.clip`). However, more advanced use cases may require | ||
a direct interaction with the index. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could mention the many-to-many case up front as an example of a situation where direct interaction makes sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I follow what you meant...
What the title says. Adding it to Advanced guide as basic stuff can be done without interacting with the sindex ever via sjoin and friends.