-
Notifications
You must be signed in to change notification settings - Fork 78
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
Update of the min_threshold_dist_from_shapefile function to support geopandas objects directly. #436
base: main
Are you sure you want to change the base?
Conversation
The get_points_array_from_gdf function was updated so to support its applicability to a geopandas GeoDataFrame or a geopandas.GeoSeries object directly.
Update util.py
Codecov Report
@@ Coverage Diff @@
## master #436 +/- ##
======================================
Coverage 79.7% 79.7%
======================================
Files 120 120
Lines 12710 12715 +5
======================================
+ Hits 10128 10138 +10
+ Misses 2582 2577 -5
|
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 have very mixed feelings here.
The change in this PR is perfectly fine code-wise (just see the note in the code).
But API-wise, this is a bit messy but that is more for a general discussion among libpysal team. *from_shapefile
should be a different thing than *from_dataframe
. In the ideal case, we wouldn't need any *from_shapefile
or *from_dataframe
. We should assume that the input is GeoDataFrame and leave the file IO to geopandas.
There is a lot of legacy code in libpysal that should be cleaned and refactored based on geopandas and pygeos. Short term, we may just merge this assuming that these functions will eventually be deprecated anyway. But I would surely not go in the direction of shapefile==GeoDataFrame within our API.
Co-authored-by: Martin Fleischmann <[email protected]>
Dear @martinfleis, thank's for the feedback. Your suggestion was completely right, and it has beeen accepted in this new commit. SIncerely, |
Implications:
None