pysal / momepy

Urban Morphology Measuring Toolkit
https://docs.momepy.org
BSD 3-Clause "New" or "Revised" License
464 stars 56 forks source link

Adding metrics at the block level #328

Open CWen001 opened 2 years ago

CWen001 commented 2 years ago

This feature request derives from #327.

Rationale: Currently, momepy calculates metrics mainly at the building, street, or tesselation level. The tool does provide the infrastructure to construct a block object using momepy.Blocks(...) by providing building, street, or tesselation. When users need morphologic information at the block level, the calculated metrics from the three levels can also be transferred to a block containing them by using table joins (IDs of blocks and their building, street, or tesselation's). Otherwise, if the block is not constructed by the three levels' data using momepy, a spatial join can be used to transfer the block information back to the three levels.

However, metrics at the block level are not yet implemented at momepy. To have a glimpse at some examples, a newly published paper describe in detail more than 30 morphological metrics at the block level (see 10.1016/j.landusepol.2021.105737 and especially its supplementary materials that explain all the formulas). Metrics of interests at the block level may contain: Building Area-Weighted Orientation Index, Spatial Compactness Ratio, Near-Road Building Density, Number of Road Intersection, Building Height Variation Coefficient, and many more.

Imagination: The requested feature, if possible, is expected to (1) calculate (native) block-level metrics for the blocks constructed by momepy (2) calculate (native) block-level metrics for the blocks defined by user-provided polygons (urban districts, grids, or hex) for further studies. (3) summarize the three above levels' metrics to the block level. This might be a convenience function, and also to differentiate the 'natively calculated' metrics for the block level from metrics 'transferred' by the three levels' metrics to the block level.

Notes: This feature request would provide help to urban planners who need to frequently analyze and compare urban blocks, and it might complete the morphological analysis at different levels ranging from buildings, tesselations, streets, and finally to blocks that are flexible to scale down to small districts or even to scale up to regions.

Thank you very much for your consideration. I understand very much this is an open-source project and the developer's time is invaluable. Please feel free to close if the feature request is out of scope or plan.

reference: He, Q., Larkham, P., & Wu, J. (2021). Evaluating historic preservation zoning using a landscape approach. Land Use Policy, 109, 105737.

martinfleis commented 2 years ago

I'd be happy to add them, it is certainly in the scope of momepy. Though I am not sure when I'll have time for that myself, it probably won't be anytime soon. That said, if someone wants to work on it, I am happy to provide the necessary guidance.