momepy.
Blocks
Generate blocks based on buildings, tesselation and street network.
Dissolves tessellation cells based on street-network based polygons. Links resulting id to buildings and tesselation as attributes.
buildings
tesselation
GeoDataFrame containing morphological tessellation
GeoDataFrame containing street network
GeoDataFrame containing buildings
name of the unique blocks id column to be generated
name of the column with unique id. If there is none, it could be generated by momepy.unique_id(). This should be the same for cells and buildings, id’s should match.
momepy.unique_id()
if True, shows progress bars in loops and indication of steps
Examples
>>> blocks_generate = mm.Blocks(tessellation_df, streets_df, buildings_df, 'bID', 'uID') Buffering streets... Generating spatial index... Difference... Defining adjacency... Defining street-based blocks... Defining block ID... Generating centroids... Spatial join... Attribute join (tesselation)... Generating blocks... Multipart to singlepart... Attribute join (buildings)... Attribute join (tesselation)... >>> blocks_generate.blocks.head() bID geometry 0 1.0 POLYGON ((1603560.078648818 6464202.366899694,... 1 2.0 POLYGON ((1603457.225976106 6464299.454696888,... 2 3.0 POLYGON ((1603056.595487018 6464093.903488506,... 3 4.0 POLYGON ((1603260.943782872 6464141.327631323,... 4 5.0 POLYGON ((1603183.399594798 6463966.109982309,...
GeoDataFrame containing generated blocks
Series derived from buildings with block ID
Series derived from morphological tessellation with block ID
GeoDataFrame containing original tessellation
GeoDataFrame containing original edges
GeoDataFrame containing original buildings
name of the unique blocks id column
name of the column with unique id
__init__
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(tessellation, edges, buildings, …)
Initialize self.