GeofabrikDownloader.get_continent_tables¶
- GeofabrikDownloader.get_continent_tables(update=False, confirmation_required=True, verbose=False, raise_error=False, **kwargs)[source]¶
Get download catalogues for each continent.
- Parameters:
update (bool) – whether to (check on and) update the prepacked data, defaults to
Falseconfirmation_required (bool) – whether asking for confirmation to proceed, defaults to
Trueverbose (bool | int) – whether to print relevant information in console, defaults to
Falseraise_error (bool) – Whether to raise the provided exception; if
raise_error=False(default), the error will be suppressed.
- Returns:
download catalogues for each continent
- Return type:
dict | None
Examples:
>>> from pydriosm.downloader import GeofabrikDownloader >>> gfd = GeofabrikDownloader() >>> # Download information of subregions for each continent >>> continent_tables = gfd.get_continent_tables() >>> type(continent_tables) dict >>> list(continent_tables.keys()) ['Africa', 'Antarctica', 'Asia', 'Australia and Oceania', 'Central America', 'Europe', 'North America', 'South America'] >>> # Information about the data of subregions in Asia >>> asia_table = continent_tables['Asia'] >>> asia_table.shape (40, 7) >>> asia_table.head() subregion ... .osm.bz2 0 Afghanistan ... None 1 Armenia ... None 2 Azerbaijan ... None 3 Bangladesh ... None 4 Bhutan ... None [5 rows x 7 columns] >>> asia_table.columns.to_list() ['subregion', 'subregion-url', '.osm.pbf', '.osm.pbf-size', '.gpkg.zip', '.shp.zip', '.osm.bz2']