-
Notifications
You must be signed in to change notification settings - Fork 61
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
Functional blocks #580
Functional blocks #580
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #580 +/- ##
=======================================
+ Coverage 97.4% 97.9% +0.5%
=======================================
Files 26 37 +11
Lines 4328 5491 +1163
=======================================
+ Hits 4214 5375 +1161
- Misses 114 116 +2
|
momepy/functional/_elements.py
Outdated
tessellation: GeoDataFrame, | ||
edges: GeoDataFrame, | ||
buildings: GeoDataFrame, | ||
id_name: str = "bID", |
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.
no need for that, rely on index
momepy/functional/_elements.py
Outdated
edges: GeoDataFrame, | ||
buildings: GeoDataFrame, | ||
id_name: str = "bID", | ||
): |
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.
missing output type
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.
We should also make a note that this assumes morphological tessellation and 1:1 relationship between buildings and cells. With enclosed tessellation, those cells that do not have buildings would cause a trouble here. No need to change anything, just adding a note to the docstring would do.
momepy/functional/_elements.py
Outdated
|
||
# assign block ids to buildings and tessellations | ||
centroids_w_bl_id2 = gpd.sjoin(buildings_c, blocks, how="left", predicate="within") | ||
# return blocks, centroids_w_bl_id2 |
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.
# return blocks, centroids_w_bl_id2 |
functional implementation of blocks, the code is pretty much the same as the OO version