Blocks(tessellation, edges, buildings, id_name, unique_id)¶
Generate blocks based on buildings, tesselation and street network
Captures bID to buildings and tesselation as attributes.
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 unique_id(). This should be the same for cells and buildings, id’s should match.
>>> 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__(self, tessellation, edges, buildings, id_name, unique_id)¶
Initialize self. See help(type(self)) for accurate signature.