Skip to content

zone_area_km2

zone_area_km2

zone_area_km2(zones: GeoDataFrame, *, equal_area_crs: str = 'EPSG:6933') -> Series

Area of each zone in km², computed in an equal-area projection (not in degrees).

Reprojects to EPSG:6933 (World Cylindrical Equal Area) so areas are metric and comparable across latitudes: the denominator for bikes-per-km² density. Requires [geo].

See Also

zones_for_points : Assign points to these zones. to_canonical_geofencing : Parse the zones first.

Source code in src/gbfs_toolkit/spatial/geofencing.py
def zone_area_km2(zones: gpd.GeoDataFrame, *, equal_area_crs: str = "EPSG:6933") -> pd.Series:
    """Area of each zone in km², computed in an equal-area projection (not in degrees).

    Reprojects to ``EPSG:6933`` (World Cylindrical Equal Area) so areas are metric and
    comparable across latitudes: the denominator for bikes-per-km² density. Requires ``[geo]``.

    See Also
    --------
    [`zones_for_points`][gbfs_toolkit.zones_for_points] : Assign points to these zones.
    [`to_canonical_geofencing`][gbfs_toolkit.to_canonical_geofencing] : Parse the zones first.
    """
    _require_geo()
    return zones.to_crs(equal_area_crs).geometry.area / 1e6