_Downloader.file_exists_and_more(subregion_names, osm_file_format, data_dir=None, update=False, confirmation_required=True, verbose=True)[source]

Check if a requested data file already exists and compile information for downloading the data.

  • subregion_names (str | list) – name(s) of geographic (sub)region(s) available on a free download server

  • osm_file_format (str) – file format of the OSM data available on the free download server

  • data_dir (str | None) – directory where the data file (or files) is (or are) stored, defaults to None

  • update (bool) – whether to (check on and) update the data, defaults to False

  • confirmation_required (bool) – whether asking for confirmation to proceed, defaults to True

  • verbose (bool | int) – whether to print relevant information in console, defaults to True


whether the requested data file exists; or the path to the data file

Return type:



>>> from pydriosm.downloader import GeofabrikDownloader, BBBikeDownloader

>>> gfd = GeofabrikDownloader()

>>> gfd.file_exists_and_more('London', ".pbf")
(['Greater London'], '.osm.pbf', True, 'download', ['Greater London'], [])

>>> gfd.file_exists_and_more(['london', 'rutland'], ".pbf")
(['Greater London', 'Rutland'],
 ['Greater London', 'Rutland'],

>>> bbd = BBBikeDownloader()

>>> bbd.file_exists_and_more('London', ".pbf")
(['London'], '.pbf', True, 'download', ['London'], [])

>>> bbd.file_exists_and_more(['birmingham', 'leeds'], ".pbf")
(['Birmingham', 'Leeds'],
 ['Birmingham', 'Leeds'],