Update of the min_threshold_dist_from_shapefile function to support geopandas objects directly.#436
Update of the min_threshold_dist_from_shapefile function to support geopandas objects directly.#436PhilipeRLeal wants to merge 3 commits intopysal:mainfrom
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❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (33.3%) is below the target coverage (60.0%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #436 +/- ##
=====================================
Coverage 79.7% 79.7%
=====================================
Files 120 120
Lines 12710 12715 +5
=====================================
+ Hits 10128 10138 +10
+ Misses 2582 2577 -5
🚀 New features to boost your workflow:
|
martinfleis
left a comment
There was a problem hiding this comment.
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, |
|
Closing as outdated. Weights can be perfectly built from GeoPandas objects and the entire module is now considered legacy as its functionality has been replaced by |
Implications:
None