From 7500ad7d413837948102d14b1ddf209606875168 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 23 Feb 2018 02:09:01 -0500 Subject: [PATCH] Add ne_ prefix to NaturalEarth cache files. This prefix is used in the zip files provided by NaturalEarth, so if you download anything manually, you need to rename all the files for Cartopy to find them. This change makes that renaming no longer necessary, at the expense of a few extra re-downloads. --- lib/cartopy/io/shapereader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cartopy/io/shapereader.py b/lib/cartopy/io/shapereader.py index f857b3803..3e69553f1 100644 --- a/lib/cartopy/io/shapereader.py +++ b/lib/cartopy/io/shapereader.py @@ -345,11 +345,11 @@ def default_downloader(): >>> ne_dnldr = NEShpDownloader.default_downloader() >>> print(ne_dnldr.target_path_template) {config[data_dir]}/shapefiles/natural_earth/{category}/\ -{resolution}_{name}.shp +ne_{resolution}_{name}.shp """ default_spec = ('shapefiles', 'natural_earth', '{category}', - '{resolution}_{name}.shp') + 'ne_{resolution}_{name}.shp') ne_path_template = os.path.join('{config[data_dir]}', *default_spec) pre_path_template = os.path.join('{config[pre_existing_data_dir]}', *default_spec)