From dcb23a039ce31a3253c015fcdce932c4bc7d9dd6 Mon Sep 17 00:00:00 2001 From: Kevin Dungs Date: Wed, 24 Jan 2024 22:52:38 +0100 Subject: [PATCH] Allow GSHHS levels 5 and 6 for Antarctica. The documentation for GSHHSFeature already states that levels 1 through 6 are allowed but the code so far only allowed 1 through 4. As per https://www.ngdc.noaa.gov/mgg/shorelines/data/gshhg/readme.txt levels 5 and 6 were introduced in GSHHS version 2.3.0 in February 2014 to distinguish the Antarctic ice-front (L5) and grounding lines (L6). Importantly, this also means that L1 does not contain any coastlines for Antarctica, so allowing only L1-L4 is insufficient. See also https://www.soest.hawaii.edu/pwessel/gshhg/. --- lib/cartopy/feature/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cartopy/feature/__init__.py b/lib/cartopy/feature/__init__.py index 3040a89e0..56a8f7cf7 100644 --- a/lib/cartopy/feature/__init__.py +++ b/lib/cartopy/feature/__init__.py @@ -365,7 +365,7 @@ def __init__(self, scale='auto', levels=None, **kwargs): if levels is None: levels = [1] self._levels = set(levels) - unknown_levels = self._levels.difference([1, 2, 3, 4]) + unknown_levels = self._levels.difference([1, 2, 3, 4, 5, 6]) if unknown_levels: raise ValueError(f"Unknown GSHHS levels {unknown_levels!r}.")