overturetoosm.addresses

Convert Overture's addresses features to OSM tags.

 1"""Convert Overture's `addresses` features to OSM tags."""
 2
 3from typing import Dict
 4
 5from .objects import AddressProps
 6
 7
 8def process_address(props: dict, style: str = "US") -> Dict[str, str]:
 9    """Convert Overture's address properties to OSM tags.
10
11    Args:
12        props (dict): The feature properties from the Overture GeoJSON.
13        style (str, optional): How to handle the `address_levels` field. Open
14            a pull request or issue to add support for other regions. Defaults to "US".
15
16    Returns:
17        Dict[str, str]: The reshaped and converted properties in OSM's flat
18            str:str schema.
19    """
20    return AddressProps(**props).to_osm(style)
def process_address(props: dict, style: str = 'US') -> Dict[str, str]:
 9def process_address(props: dict, style: str = "US") -> Dict[str, str]:
10    """Convert Overture's address properties to OSM tags.
11
12    Args:
13        props (dict): The feature properties from the Overture GeoJSON.
14        style (str, optional): How to handle the `address_levels` field. Open
15            a pull request or issue to add support for other regions. Defaults to "US".
16
17    Returns:
18        Dict[str, str]: The reshaped and converted properties in OSM's flat
19            str:str schema.
20    """
21    return AddressProps(**props).to_osm(style)

Convert Overture's address properties to OSM tags.

Arguments:
  • props (dict): The feature properties from the Overture GeoJSON.
  • style (str, optional): How to handle the address_levels field. Open a pull request or issue to add support for other regions. Defaults to "US".
Returns:

Dict[str, str]: The reshaped and converted properties in OSM's flat str:str schema.