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

1"""Convert Overture's `addresses` features to OSM tags.""" 

2 

3from .objects import AddressProps 

4 

5 

6def process_address(props: dict, style: str = "US") -> dict[str, str]: 

7 """Convert Overture's address properties to OSM tags. 

8 

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". 

13 

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)