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

separate spatial_index function #364

Closed
wants to merge 3 commits into from
Closed

Conversation

Casyfill
Copy link
Contributor

@Casyfill Casyfill commented Aug 7, 2016

separate spatial_index function might be of use for "millions_to_hundreds" sjoint, where we split data into chunks and don't want to generate a rtree.Index for each chunk once again

"millions_to_hundreds" sjoint, where we split data into chunks and
don't want to generate a rtree.Index for each chunk once again
@coveralls
Copy link

coveralls commented Aug 7, 2016

Coverage Status

Coverage increased (+0.02%) to 87.019% when pulling 15c0000 on Casyfill:master into 46e50fe on geopandas:master.

@Casyfill
Copy link
Contributor Author

Casyfill commented Aug 7, 2016

maybe it is better to pass index as **kvargs?

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Can you add a test for this?

@@ -24,9 +45,9 @@ def sjoin(left_df, right_df, how='inner', op='intersects',
Suffix to apply to overlapping column names (left GeoDataFrame).
rsuffix : string, default 'right'
Suffix to apply to overlapping column names (right GeoDataFrame).
tree_idx : rtree.index for right GeoDataFrame, if None, will be created.
Copy link
Member

Choose a reason for hiding this comment

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

Can you put the explanation on a next line (see how it is done for the other kwargs). Typically it should have the form of (following the numpy docstring standard)

kwarg : type
    Explanation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do!

@jorisvandenbossche
Copy link
Member

@Casyfill Thanks for the contribution!

I am not that familiar with rtree indexes to judge this, so pinging @mdbartos @perrygeo @jwass who have worked on sjoin before

@Casyfill
Copy link
Contributor Author

Thanks! I will try to think over a test

@martinfleis
Copy link
Member

Closed by #789. Thank you @Casyfill for this work even though it was not merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants