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

Reproduce and fix error using nearest_edge with non-numeric or non-sequential index #49

Closed
tomalrussell opened this issue Jun 20, 2022 · 0 comments

Comments

@tomalrussell
Copy link
Owner

gdf.sindex.nearest is returning the index location (iloc) rather than the index (loc)

(as in https://geopandas.org/en/stable/docs/reference/api/geopandas.sindex.SpatialIndex.nearest.html)

it crashed during nearest_edge because my edges geodataframe had a non-numeric index. Now I know about it it's not an issue since I can just reset index. Though I could envisage people not catching it if they had a numeric non sequential index though!

Thanks @barneydobson for the note

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

No branches or pull requests

1 participant