overturetoosm.buildings
Convert Overture's buildings
features to OSM tags.
1"""Convert Overture's `buildings` features to OSM tags.""" 2 3from typing import Dict 4 5from .objects import BuildingProps 6 7 8def process_building(props: dict, confidence: float = 0.0) -> Dict[str, str]: 9 """Convert Overture's building properties to OSM tags. 10 11 Args: 12 props (dict): The feature properties from the Overture GeoJSON. 13 confidence (float, optional): The minimum confidence level. Defaults to 0.0. 14 15 Returns: 16 Dict[str, str]: The reshaped and converted properties in OSM's flat 17 str:str schema. 18 19 Raises: 20 `overturetoosm.objects.ConfidenceError`: Raised if the confidence level is set 21 above a feature's confidence. 22 """ 23 return BuildingProps(**props).to_osm(confidence)
def
process_building(props: dict, confidence: float = 0.0) -> Dict[str, str]:
9def process_building(props: dict, confidence: float = 0.0) -> Dict[str, str]: 10 """Convert Overture's building properties to OSM tags. 11 12 Args: 13 props (dict): The feature properties from the Overture GeoJSON. 14 confidence (float, optional): The minimum confidence level. Defaults to 0.0. 15 16 Returns: 17 Dict[str, str]: The reshaped and converted properties in OSM's flat 18 str:str schema. 19 20 Raises: 21 `overturetoosm.objects.ConfidenceError`: Raised if the confidence level is set 22 above a feature's confidence. 23 """ 24 return BuildingProps(**props).to_osm(confidence)
Convert Overture's building properties to OSM tags.
Arguments:
- props (dict): The feature properties from the Overture GeoJSON.
- confidence (float, optional): The minimum confidence level. Defaults to 0.0.
Returns:
Dict[str, str]: The reshaped and converted properties in OSM's flat str:str schema.
Raises:
overturetoosm.objects.ConfidenceError
: Raised if the confidence level is set above a feature's confidence.