momepy.Tessellation

class momepy.Tessellation(gdf, unique_id, limit, shrink=0.4, segment=0.5)[source]

Generate morphological tessellation around given buildings or proximity bands around given street network.

Parameters
gdfGeoDataFrame

GeoDataFrame containing building footprints or street network

unique_idstr

name of the column with unique id

limitMultiPolygon or Polygon

MultiPolygon or Polygon defining the study area limiting tessellation (otherwise it could go to infinity).

shrinkfloat (default 0.4)

distance for negative buffer to generate space between adjacent polygons (if geometry type of gdf is (Multi)Polygon).

segmentfloat (default 0.5)

maximum distance between points after discretisation

Notes

queen_corners is currently experimental method only and can cause errors.

Examples

>>> tess = mm.Tessellation(buildings_df, 'uID', limit=mm.buffered_limit(buildings_df))
Inward offset...
Discretization...
Generating input point array...
100%|██████████| 144/144 [00:00<00:00, 376.15it/s]
Generating Voronoi diagram...
Generating GeoDataFrame...
Vertices to Polygons: 100%|██████████| 33059/33059 [00:01<00:00, 31532.72it/s]
Dissolving Voronoi polygons...
Preparing buffer zone for edge resolving...
Building R-tree...
100%|██████████| 42/42 [00:00<00:00, 752.54it/s]
Cutting...
>>> tess.tessellation.head()
    uID     geometry
0   1       POLYGON ((1603586.677274485 6464344.667944215,...
1   2       POLYGON ((1603048.399497852 6464176.180701573,...
2   3       POLYGON ((1603071.342637536 6464158.863329805,...
3   4       POLYGON ((1603055.834005827 6464093.614718676,...
4   5       POLYGON ((1603106.417554705 6464130.215958447,...
Attributes
tessellationGeoDataFrame

GeoDataFrame containing resulting tessellation

gdfGeoDataFrame

original GeoDataFrame

idSeries

Series containing used unique ID

limitMultiPolygon or Polygon

limit

shrinkfloat

used shrink value

segmentfloat

used segment value

sindexrtree spatial index

spatial index of tessellation

Methods

queen_corners(self, sensitivity)

Experimental: Fix unprecise corners.

__init__(self, gdf, unique_id, limit, shrink=0.4, segment=0.5)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(self, gdf, unique_id, limit[, …])

Initialize self.

queen_corners(self, sensitivity)

Experimental: Fix unprecise corners.