GeofabrikDownloader.get_region_subregion_tier
- GeofabrikDownloader.get_region_subregion_tier(update=False, confirmation_required=True, verbose=False)[source]
Get region-subregion tier and all (sub)regions that have no subregions.
This includes all geographic (sub)regions for which data of subregions is unavailable.
- Parameters:
update (bool) – whether to (check on and) update the prepacked 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
False
- Returns:
region-subregion tier and all (sub)regions that have no subregions
- Return type:
tuple[dict, list] | tuple[None, None]
Examples:
>>> from pydriosm.downloader import GeofabrikDownloader >>> gfd = GeofabrikDownloader() >>> # region-subregion tier, and all regions that have no subregions >>> rgn_subrgn_tier, no_subrgn_list = gfd.get_region_subregion_tier() >>> type(rgn_subrgn_tier) dict >>> # Keys of the region-subregion tier >>> list(rgn_subrgn_tier.keys()) ['Africa', 'Antarctica', 'Asia', 'Australia and Oceania', 'Central America', 'Europe', 'North America', 'South America'] >>> type(no_subrgn_list) list >>> # Example: five regions that have no subregions >>> no_subrgn_list[0:5] ['Antarctica', 'Algeria', 'Angola', 'Benin', 'Botswana']