momepy.sunlight_optimised#

momepy.sunlight_optimised(geometry, graph, fr_ratio=8, elongation_ratio=0.9, min_courtyard_area=1)[source]#

A bool indicating whether geometry shapes are optimised for sunlight exposure.

A building and its adjacent parts (i.e. connected component) are considered likely to be optimised for sunlight if its facade_ratio() and elongation() are lower than the respective parameters, or if its courtyard_area() is higher.

Parameters:
geometryGeoDataFrame | GeoSeries

A GeoDataFrame or GeoSeries containing building polygons to analyse.

graphlibpysal.graph.Graph

A spatial weights matrix that contains adjacency information for geometry polygons.

fr_ratiofloat, optional

Maximum area to perimeter ratio, for a building structure to be considered optimised for sunlight.

elongation_ratiofloat, optional

Maximum elongation ratio, for a building structure to be considered optimised for sunlight.

min_courtyard_areafloat, optional

Minimum courtyard area for a building structure to be considered optimised for sunlight.

Returns:
Series

Examples

>>> from libpysal import graph
>>> path = momepy.datasets.get_path("bubenec")
>>> buildings = geopandas.read_file(path, layer="buildings")
>>> building_graph = graph.Graph.build_fuzzy_contiguity(buildings, buffer=.1)
>>> momepy.sunlight_optimised(buildings, building_graph)
0      False
1       True
2       True
3       True
4       True
    ...
139     True
140    False
141     True
142     True
143     True
Length: 144, dtype: bool