momepy: Urban Morphology Measuring Toolkit

Urban morphology is the area of urban studies that explores the physical form of cities in space and the way it changes in time in relation

The morphometric characters implemented in momepy allow to conduct a cross-scale analysis of urban form, spanning from the level of individual buildings and plots to the macroscopic metropolitan regions.Furthermore, momepy is designed to be more flexible than other toolkits as its functions are generally not restricted to specific morphological elements but to geometry types only and as such, can be used in various analytical models.
The six core modules of momepy, represent six categories of urban morphometric characters: dimension, shape, spatial distribution, intensity, connectivity (graph module), and diversity identified in the literature and ongoing research.These six modules together provide a wide range of algorithms measuring different aspects of urban form and are able to describe its complexity with a significant degree of precision.
Moreover, the elements module allows for generating morphological elements and provides a way of linking all relevant elements together using unique IDs based on their spatial proximity.This module provides a function to generate morphological tessellation of the built-up area (figure 1) based on the spatial configuration of building footprints using the Voronoi tessellation as implemented in SciPy (Virtanen et al., 2019), used within UMM as a proxy of a plot.This module also allows for generating tessellation-based urban blocks as a higher scale aggregation.
The application of morphological tessellation and PySAL's (Rey & Anselin, 2010) spatial weights as used within momepy enables the relational definition of location-based aggregation, allowing the consistent morphology-led definition of the vicinity of each element of the urban form (Fleischmann, Romice, & Porta, 2019).Additionally, the utils module helps, among others, to pre-process data, by cleaning either the topology of street networks or of ancillary structures from the building footprint data, both needed to eliminate possible error later in the analysis.
Internally, momepy is built on the GeoPandas Python package (Jordahl et al., 2019), using its GeoSeries and GeoDataFrame objects to store and handle large amounts of geospatial information.momepy uses PySAL under the hood, mostly to take care of spatial weights matrices capturing the adjacency of elements of urban form.The graph module uses the capabilities of networkX (Hagberg, Schult, & Swart, 2008) for the analysis of urban street networks.Basic Python knowledge is required to use momepy, but example Jupyter notebooks should provide enough information to allow using momepy with a standard GIS knowledge only.Momepy depends on Python geospatial libraries, so the recommended installation uses the community-led conda-forge channel of conda to ensure compatibility of all dependencies: conda install -c conda-forge momepy.Eventually, pip install momepy is possible considering all dependency requirements are met.momepy is currently being used to measure the specific aspects of urban form that contribute to its resilience (Feliciotti, Romice, & Porta, 2016), as part of The Urban Form Resilience Project, and to describe urban form using extensive number of morphometric characters (300+) aimed at recognition of homogenous areas as part of the doctoral research The Urban Atlas: Developing tools and frameworks for quantitative analysis of urban form through Geographical Information Systems and big data, both based at the University of Strathclyde, Glasgow.At the same time, momepy is being used as a tool for climate-induced risk assessment of Portuguese seashore streets, through a cooperation between the Universidade de Lisboa and the University of Strathclyde.

Figure 1 :
Figure 1: Figure 1: Morphological tessellation in the case of the exemplary bubenec dataset illustrates the principle of Voronoi tessellation applied on building polygons.Building data source: OpenStreetMap © OpenStreetMap contributors, CC BY-SA