foxes.utils.load_areas_from_geojson(geojson_path, name_key='name')[source]

Loads area geometries from a GeoJSON file path.

Parameters

geojson_path: str or pathlib.Path

Path to a GeoJSON file

name_key: str or list of str

Preferred feature property key(s) for area names

Returns

area_map: dict

Mapping from unique resolved area names (str) to foxes.utils.geom2d.AreaGeometry objects. Missing, empty, or duplicate names are replaced with default names of the form area_XXX.