-
Notifications
You must be signed in to change notification settings - Fork 557
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
docs: Clarification of STRTree documentation #618
Comments
@kannes we're not flexible right now about what gets stored, but we do store the geometry object as well as all its attributes. You can add attributes to a geometry object after it has been created because these geometry objects store their attributes in a
There is some related discussion in #615. |
Thanks, I will update this |
Done! [edit: removed screwed up git mess] A graphical representation of the example geometries and query geometry would be great to further show how it returns geometries whose extents intersect. Not sure if I should suggest using deepcopy to avoid mutating the original objects. |
@kannes, should this issue be closed? |
Oh yes, thank you! |
@kannes note that the snippet above with setting an attribute on the geometry object (#618 (comment)) will no longer work in the upcoming Shapely 2.0 release. But there is now an alternative for this, i.e. |
@jorisvandenbossche I think this should be mentioned in the changelogs for the upcoming alpha release for 1.8, right? |
The STRtree changes are mentioned here: |
That's great news, thanks! |
I would like to (slightly) improve the documentation for the STRTree.
http://shapely.readthedocs.io/en/stable/manual.html#str-packed-r-tree says
The example then shows two queries that return Geometry objects.
I was hoping I could use STRTree just like the rtree module: passing index numbers to be able to match geometries to (Fiona) features but that seems not to be the case. STRTree simply takes a list of Geometry objects and on a query, returns the intersecting Geometry objects it knows about. There is no order or indices. Is that correct?
If so, I would just add one sentences about what the query method returns. For class descriptions (e.g. Point) the attributes are presented in prose, but if this should get a new
.. method::
entry, just say so. :)The text was updated successfully, but these errors were encountered: