cartopy.io.shapereader.GSHHSShpDownloader#

class cartopy.io.shapereader.GSHHSShpDownloader(url_template='https://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/latest/gshhg-shp-2.3.7.zip', target_path_template=None, pre_downloaded_path_template='')[source]#

Specialise cartopy.io.Downloader to download the zipped GSHHS shapefiles and extract them to the defined location.

The keys which should be passed through when using the format_dict are scale (a single character indicating the resolution) and level (a number indicating the type of feature).

__init__(url_template='https://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/latest/gshhg-shp-2.3.7.zip', target_path_template=None, pre_downloaded_path_template='')[source]#

Methods

__init__([url_template, ...])

acquire_all_resources(format_dict)

acquire_resource(target_path, format_dict)

Download the zip file and extracts the files listed in zip_file_contents() to the target path.

default_downloader()

Return a GSHHSShpDownloader instance that expects (and if necessary downloads and installs) shapefiles in the data directory of the cartopy installation.

from_config(specification[, config_dict])

The from_config static method implements the logic for acquiring a Downloader (sub)class instance from the config dictionary.

path(format_dict)

Returns the path to a file on disk that this resource represents.

pre_downloaded_path(format_dict)

The path on disk of the file that this resource represents, if it does not exist, then no further action will be taken with this path, and all further processing will be done using target_path() instead.

target_path(format_dict)

The path on disk of the file that this resource represents, must either exist, or be writable by the current user.

url(format_dict)

The full URL that this resource represents.

zip_file_contents(format_dict)

Return a generator of the filenames to be found in the downloaded GSHHS zip file for the specified resource.

Attributes

FORMAT_KEYS

The minimum keys which should be provided in the format_dict argument for the path, url, target_path, pre_downloaded_path and acquire_resource methods.

gshhs_version