momepy.corners¶
-
momepy.corners(geometry, eps=
10, include_interiors=False)[source]¶ Calculates the number of corners of each object given its geometry.
As a corner is considered a point where the angle between two consecutive segments deviates from 180 degrees by more than
eps.- Parameters:¶
- geometry : GeoDataFrame | GeoSeries¶
A GeoDataFrame or GeoSeries containing polygons to analyse.
- eps : float, optional¶
Deviation from 180 degrees to consider a corner, by default 10
- include_interiors : bool, optional¶
If True, polygon interiors are included in the calculation. If False, only exterior is considered, by default False
- Return type:¶
Series
Examples
>>> path = momepy.datasets.get_path("bubenec") >>> buildings = geopandas.read_file(path, layer="buildings") >>> momepy.corners(buildings) 0 24 1 43 2 8 3 16 4 8 .. 139 4 140 6 141 6 142 4 143 4 Length: 144, dtype: int64