Coverage for src/overturetoosm/buildings.py: 100%
3 statements
« prev ^ index » next coverage.py v7.6.1, created at 2025-07-22 06:43 -0400
« prev ^ index » next coverage.py v7.6.1, created at 2025-07-22 06:43 -0400
1"""Convert Overture's `buildings` features to OSM tags."""
3from .objects import BuildingProps
6def process_building(props: dict, confidence: float = 0.0) -> dict[str, str]:
7 """Convert Overture's building properties to OSM tags.
9 Args:
10 props (dict): The feature properties from the Overture GeoJSON.
11 confidence (float, optional): The minimum confidence level. Defaults to 0.0.
13 Returns:
14 dict[str, str]: The reshaped and converted properties in OSM's flat
15 str:str schema.
17 Raises:
18 `overturetoosm.objects.ConfidenceError`: Raised if the confidence level is set
19 above a feature's confidence.
20 """
21 return BuildingProps(**props).to_osm(confidence)