Blocks(tessellation, edges, buildings, …)
Blocks
Generate blocks based on buildings, tesselation and street network.
buffered_limit(gdf[, buffer])
buffered_limit
Define limit for momepy.Tessellation as a buffer around buildings.
momepy.Tessellation
enclosures(primary_barriers[, limit, …])
enclosures
Generate enclosures based on passed barriers.
get_network_id(left, right, network_id[, …])
get_network_id
Snap each element (preferably building) to the closest street network segment, saves its id.
get_network_ratio(df, edges[, initial_buffer])
get_network_ratio
Link polygons to network edges based on the proportion of overlap (if a cell intersects more than one edge)
get_node_id(objects, nodes, edges, node_id)
get_node_id
Snap each building to closest street network node on the closest network edge.
Tessellation(gdf, unique_id[, limit, …])
Tessellation
Generates tessellation.
Area(gdf)
Area
Calculates area of each object in given GeoDataFrame.
AverageCharacter(gdf, values, …[, rng, …])
AverageCharacter
Calculates the average of a character within a set neighbourhood defined in spatial_weights
spatial_weights
CourtyardArea(gdf[, areas])
CourtyardArea
Calculates area of holes within geometry - area of courtyards.
CoveredArea(gdf, spatial_weights, unique_id)
CoveredArea
Calculates the area covered by neighbours
FloorArea(gdf, heights[, areas])
FloorArea
Calculates floor area of each object based on height and area.
LongestAxisLength(gdf)
LongestAxisLength
Calculates the length of the longest axis of object.
Perimeter(gdf)
Perimeter
Calculates perimeter of each object in given GeoDataFrame.
PerimeterWall(gdf[, spatial_weights, verbose])
PerimeterWall
Calculate the perimeter wall length the joined structure.
SegmentsLength(gdf[, spatial_weights, mean, …])
SegmentsLength
Calculate the cummulative and/or mean length of segments.
StreetProfile(left, right[, heights, …])
StreetProfile
Calculates the street profile characters.
Volume(gdf, heights[, areas])
Volume
Calculates volume of each object in given GeoDataFrame based on its height and area.
WeightedCharacter(gdf, values, …[, areas, …])
WeightedCharacter
Calculates the weighted character
CentroidCorners(gdf[, verbose])
CentroidCorners
Calculates mean distance centroid - corners and st.
CircularCompactness(gdf[, areas])
CircularCompactness
Calculates compactness index of each object in given GeoDataFrame.
CompactnessWeightedAxis(gdf[, areas, …])
CompactnessWeightedAxis
Calculates compactness-weighted axis of each object in given GeoDataFrame.
Convexity(gdf[, areas])
Convexity
Calculates Convexity index of each object in given GeoDataFrame.
Corners(gdf[, verbose])
Corners
Calculates number of corners of each object in given GeoDataFrame.
CourtyardIndex(gdf, courtyard_areas[, areas])
CourtyardIndex
Calculates courtyard index of each object in given GeoDataFrame.
Elongation(gdf)
Elongation
Calculates elongation of object seen as elongation of its minimum bounding rectangle.
EquivalentRectangularIndex(gdf[, areas, …])
EquivalentRectangularIndex
Calculates equivalent rectangular index of each object in given GeoDataFrame.
FormFactor(gdf, volumes[, areas])
FormFactor
Calculates form factor of each object in given GeoDataFrame.
FractalDimension(gdf[, areas, perimeters])
FractalDimension
Calculates fractal dimension of each object in given GeoDataFrame.
Linearity(gdf[, verbose])
Linearity
Calculates linearity of each LineString object in given GeoDataFrame.
Rectangularity(gdf[, areas])
Rectangularity
Calculates rectangularity of each object in given GeoDataFrame.
ShapeIndex(gdf, longest_axis[, areas])
ShapeIndex
Calculates shape index of each object in given GeoDataFrame.
SquareCompactness(gdf[, areas, perimeters])
SquareCompactness
Squareness(gdf[, verbose])
Squareness
Calculates squareness of each object in given GeoDataFrame.
VolumeFacadeRatio(gdf, heights[, volumes, …])
VolumeFacadeRatio
Calculates volume/facade ratio of each object in given GeoDataFrame.
Alignment(gdf, spatial_weights, unique_id, …)
Alignment
Calculate the mean deviation of solar orientation of objects on adjacent cells from an object
BuildingAdjacency(gdf, …[, …])
BuildingAdjacency
Calculate the level of building adjacency
CellAlignment(left, right, …)
CellAlignment
Calculate the difference between cell orientation and orientation of object
MeanInterbuildingDistance(gdf, …[, …])
MeanInterbuildingDistance
Calculate the mean interbuilding distance
NeighborDistance(gdf, spatial_weights, unique_id)
NeighborDistance
Calculate the mean distance to adjacent buildings (based on spatial_weights)
NeighboringStreetOrientationDeviation(gdf)
NeighboringStreetOrientationDeviation
Calculate the mean deviation of solar orientation of adjacent streets
Neighbors(gdf, spatial_weights, unique_id[, …])
Neighbors
Calculate the number of neighbours captured by spatial_weights
Orientation(gdf[, verbose])
Orientation
Calculate the orientation of object
SharedWalls(gdf)
SharedWalls
Calculate the length of shared walls of adjacent elements (typically buildings)
SharedWallsRatio(gdf[, perimeters])
SharedWallsRatio
Calculate shared walls ratio of adjacent elements (typically buildings)
StreetAlignment(left, right, orientations[, …])
StreetAlignment
Calculate the difference between street orientation and orientation of object in degrees
AreaRatio(left, right, left_areas, right_areas)
AreaRatio
Calculate covered area ratio or floor area ratio of objects.
BlocksCount(gdf, block_id, spatial_weights, …)
BlocksCount
Calculates the weighted number of blocks
Count(left, right, left_id, right_id[, weighted])
Count
Calculate the number of elements within an aggregated structure.
Courtyards(gdf[, block_id, spatial_weights, …])
Courtyards
Calculate the number of courtyards within the joined structure.
Density(gdf, values, spatial_weights, unique_id)
Density
Calculate the gross density
NodeDensity(left, right, spatial_weights[, …])
NodeDensity
Calculate the density of nodes neighbours on street network defined in spatial_weights.
Reached(left, right, left_id, right_id[, …])
Reached
Calculates the number of objects reached within neighbours on street network
betweenness_centrality(graph[, name, mode, …])
betweenness_centrality
Calculates the shortest-path betweenness centrality for nodes.
cds_length(graph[, radius, mode, name, …])
cds_length
Calculates length of cul-de-sacs for subgraph around each node if radius is set, or for whole graph, if radius=None.
radius=None
closeness_centrality(graph[, name, weight, …])
closeness_centrality
Calculates the closeness centrality for nodes.
clustering(graph[, name])
clustering
Calculates the squares clustering coefficient for nodes.
cyclomatic(graph[, radius, name, distance, …])
cyclomatic
Calculates cyclomatic complexity for subgraph around each node if radius is set, or for whole graph, if radius=None.
edge_node_ratio(graph[, radius, name, …])
edge_node_ratio
Calculates edge / node ratio for subgraph around each node if radius is set, or for whole graph, if radius=None.
gamma(graph[, radius, name, distance, verbose])
gamma
Calculates connectivity gamma index for subgraph around each node if radius is set, or for whole graph, if radius=None.
mean_node_degree(graph[, radius, name, …])
mean_node_degree
Calculates mean node degree for subgraph around each node if radius is set, or for whole graph, if radius=None.
mean_node_dist(graph[, name, length, verbose])
mean_node_dist
Calculates mean distance to neighbouring nodes.
mean_nodes(G, attr)
mean_nodes
Calculates mean value of nodes attr for each edge.
meshedness(graph[, radius, name, distance, …])
meshedness
Calculates meshedness for subgraph around each node if radius is set, or for whole graph, if radius=None.
node_degree(graph[, name])
node_degree
Calculates node degree for each node.
proportion(graph[, radius, three, four, …])
proportion
Calculates the proportion of intersection types for subgraph around each node if radius is set, or for whole graph, if radius=None.
straightness_centrality(graph[, weight, …])
straightness_centrality
Calculates the straightness centrality for nodes.
subgraph(graph[, radius, distance, …])
subgraph
Calculates all subgraph-based characters.
Gini(gdf, values, spatial_weights, unique_id)
Gini
Calculates the Gini index of values within neighbours defined in spatial_weights.
Percentiles(gdf, values, spatial_weights, …)
Percentiles
Calculates the percentiles of values within neighbours defined in spatial_weights.
Range(gdf, values, spatial_weights, unique_id)
Range
Calculates the range of values within neighbours defined in spatial_weights.
Shannon(gdf, values, spatial_weights, unique_id)
Shannon
Calculates the Shannon index of values within neighbours defined in spatial_weights.
Simpson(gdf, values, spatial_weights, unique_id)
Simpson
Calculates the Simpson’s diversity index of values within neighbours defined in spatial_weights.
Theil(gdf, values, spatial_weights, unique_id)
Theil
Calculates the Theil measure of inequality of values within neighbours defined in spatial_weights.
Unique(gdf, values, spatial_weights, unique_id)
Unique
Calculates the number of unique values within neighbours defined in spatial_weights.
shannon_diversity(data[, bins, categorical, …])
shannon_diversity
Calculates the Shannon’s diversity index of data.
simpson_diversity(data[, bins, categorical, …])
simpson_diversity
Calculates the Simpson’s diversity index of data.
DistanceBand(gdf, threshold[, centroid, ids])
DistanceBand
On demand distance-based spatial weights-like class.
sw_high(k[, gdf, weights, ids, contiguity, …])
sw_high
Generate spatial weights based on Queen or Rook contiguity of order k.
close_gaps(gdf, tolerance)
close_gaps
Close gaps in LineString geometry where it should be contiguous.
CheckTessellationInput(gdf[, shrink, …])
CheckTessellationInput
Check input data for Tessellation for potential errors.
extend_lines(gdf, tolerance[, target, …])
extend_lines
Extends lines from gdf to istelf or target within a set tolerance
remove_false_nodes(gdf)
remove_false_nodes
Clean topology of existing LineString geometry by removal of nodes of degree 2.
preprocess(buildings[, size, compactness, …])
preprocess
Preprocesses building geometry to eliminate additional structures being single features.
snap_street_network_edge(edges, buildings, …)
snap_street_network_edge
Fix street network before performing momepy.Blocks.
momepy.Blocks
gdf_to_nx(gdf_network[, approach, length, …])
gdf_to_nx
Convert LineString GeoDataFrame to networkx.MultiGraph or other Graph as per specification.
limit_range(vals, rng)
limit_range
Extract values within selected range
nx_to_gdf(net[, points, lines, …])
nx_to_gdf
Convert networkx.Graph to LineString GeoDataFrame and Point GeoDataFrame.
networkx.Graph
unique_id(objects)
unique_id
Add an attribute with unique ID to each row of GeoDataFrame.