Coverage for src/overturetoosm/addresses.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 `addresses` features to OSM tags."""
3from .objects import AddressProps
6def process_address(props: dict, style: str = "US") -> dict[str, str]:
7 """Convert Overture's address properties to OSM tags.
9 Args:
10 props (dict): The feature properties from the Overture GeoJSON.
11 style (str, optional): How to handle the `address_levels` field. Open
12 a pull request or issue to add support for other regions. Defaults to "US".
14 Returns:
15 dict[str, str]: The reshaped and converted properties in OSM's flat
16 str:str schema.
17 """
18 return AddressProps(**props).to_osm(style)