momepy API reference¶
elements¶
|
Generate blocks based on buildings, tesselation and street network. |
|
Define limit for |
|
Calculates natural continuity and hierarchy of street networks in given GeoDataFrame using COINS algorithm. |
|
Generate enclosures based on passed barriers. |
|
Snap each element (preferably building) to the closest street network segment, saves its id. |
|
Link polygons to network edges based on the proportion of overlap (if a cell intersects more than one edge) |
|
Snap each building to closest street network node on the closest network edge. |
|
Generates tessellation. |
dimension¶
|
Calculates area of each object in given GeoDataFrame. |
|
Calculates the average of a character within a set neighbourhood defined in |
|
Calculates area of holes within geometry - area of courtyards. |
|
Calculates the area covered by neighbours |
|
Calculates floor area of each object based on height and area. |
|
Calculates the length of the longest axis of object. |
|
Calculates perimeter of each object in given GeoDataFrame. |
|
Calculate the perimeter wall length the joined structure. |
|
Calculate the cummulative and/or mean length of segments. |
|
Calculates the street profile characters. |
|
Calculates volume of each object in given GeoDataFrame based on its height and area. |
|
Calculates the weighted character |
shape¶
|
Calculates mean distance centroid - corners and st. |
|
Calculates compactness index of each object in given GeoDataFrame. |
|
Calculates compactness-weighted axis of each object in given GeoDataFrame. |
|
Calculates Convexity index of each object in given GeoDataFrame. |
|
Calculates number of corners of each object in given GeoDataFrame. |
|
Calculates courtyard index of each object in given GeoDataFrame. |
|
Calculates elongation of object seen as elongation of its minimum bounding rectangle. |
|
Calculates equivalent rectangular index of each object in given GeoDataFrame. |
|
Calculates form factor of each object in given GeoDataFrame. |
|
Calculates fractal dimension of each object in given GeoDataFrame. |
|
Calculates linearity of each LineString object in given GeoDataFrame. |
|
Calculates rectangularity of each object in given GeoDataFrame. |
|
Calculates shape index of each object in given GeoDataFrame. |
|
Calculates compactness index of each object in given GeoDataFrame. |
|
Calculates squareness of each object in given GeoDataFrame. |
|
Calculates volume/facade ratio of each object in given GeoDataFrame. |
spatial distribution¶
|
Calculate the mean deviation of solar orientation of objects on adjacent cells from an object |
|
Calculate the level of building adjacency |
|
Calculate the difference between cell orientation and orientation of object |
|
Calculate the mean interbuilding distance |
|
Calculate the mean distance to adjacent buildings (based on |
Calculate the mean deviation of solar orientation of adjacent streets |
|
|
Calculate the number of neighbours captured by |
|
Calculate the orientation of object |
|
Calculate the length of shared walls of adjacent elements (typically buildings) |
|
Calculate shared walls ratio of adjacent elements (typically buildings) |
|
Calculate the difference between street orientation and orientation of object in degrees |
intensity¶
|
Calculate covered area ratio or floor area ratio of objects. |
|
Calculates the weighted number of blocks |
|
Calculate the number of elements within an aggregated structure. |
|
Calculate the number of courtyards within the joined structure. |
|
Calculate the gross density |
|
Calculate the density of nodes neighbours on street network defined in |
|
Calculates the number of objects reached within neighbours on street network |
graph¶
|
Calculates the shortest-path betweenness centrality for nodes. |
|
Calculates length of cul-de-sacs for subgraph around each node if radius is set, or for whole graph, if |
|
Calculates the closeness centrality for nodes. |
|
Calculates the squares clustering coefficient for nodes. |
|
Calculates cyclomatic complexity for subgraph around each node if radius is set, or for whole graph, if |
|
Calculates edge / node ratio for subgraph around each node if radius is set, or for whole graph, if |
|
Calculates connectivity gamma index for subgraph around each node if radius is set, or for whole graph, if |
|
Calculates mean node degree for subgraph around each node if radius is set, or for whole graph, if |
|
Calculates mean distance to neighbouring nodes. |
|
Calculates mean value of nodes attr for each edge. |
|
Calculates meshedness for subgraph around each node if radius is set, or for whole graph, if |
|
Calculates node degree for each node. |
|
Calculates the proportion of intersection types for subgraph around each node if radius is set, or for whole graph, if |
|
Calculates the straightness centrality for nodes. |
|
Calculates all subgraph-based characters. |
diversity¶
|
Calculates the Gini index of values within neighbours defined in |
|
Calculates the percentiles of values within neighbours defined in |
|
Calculates the range of values within neighbours defined in |
|
Calculates the Shannon index of values within neighbours defined in |
|
Calculates the Simpson's diversity index of values within neighbours defined in |
|
Calculates the Theil measure of inequality of values within neighbours defined in |
|
Calculates the number of unique values within neighbours defined in |
|
Calculates the Shannon's diversity index of data. |
|
Calculates the Simpson's diversity index of data. |
spatial weights¶
|
On demand distance-based spatial weights-like class. |
|
Generate spatial weights based on Queen or Rook contiguity of order k. |
preprocessing¶
|
Close gaps in LineString geometry where it should be contiguous. |
|
Check input data for |
|
Extends lines from gdf to itself or target within a set tolerance |
|
Clean topology of existing LineString geometry by removal of nodes of degree 2. |
|
Preprocesses building geometry to eliminate additional structures being single features. |
utilities¶
|
Convert LineString GeoDataFrame to networkx.MultiGraph or other Graph as per specification. |
|
Extract values within selected range |
|
Convert |
|
Add an attribute with unique ID to each row of GeoDataFrame. |