bento.tl.area¶
- bento.tl.area(sdata, shape_key, recompute=False)¶
Compute the area of each shape.
- Parameters:
sdata (SpatialData) – Spatial formatted SpatialData
shape_key (str) – Key in sdata.shapes[shape_key] that contains the shape information.
recompute (bool, optional) – If True, forces the computation of the area even if it already exists in the shape metadata. If False (default), the computation is skipped if the area already exists.
- Returns:
.shapes[shape_key][‘{shape}_area’] – Area of each polygon
- Return type:
float