OSM utilities

osm_utilities.download_osm_streets(bbox_coords, exp_path)[source]

Queries Overpass API for streets inside bbox_coords and saves them into a csv file.

Parameters
  • bbox_coords (tuple) – Contains the bounding box coords to download from the API in (south, west, north, east) format

  • exp_path (str) – Path to write

Returns

None

osm_utilities.parse_osm_streets(fpath)[source]

Parses the API response from fpath and converts it to a dataframe.

Parameters

fpath (str) – File path to read

Returns

Contains all streets as well as their geometries

Return type

pandas.DataFrame

osm_utilities.query_osm_data(query, fpath)[source]

Queries Overpass API for query.

Parameters
  • query (str) – The query to be passed to API

  • fpath (str) – File path to write the API response

Returns

None