From 1b242a745f6d13d9dd516f47f68093ac2023d2d5 Mon Sep 17 00:00:00 2001 From: lgolston <30876419+lgolston@users.noreply.github.com> Date: Sun, 20 Aug 2023 09:20:37 -0500 Subject: [PATCH] Apply suggestions from code review add bbox param back to BasicReader Co-authored-by: Greg Lucas --- 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 ffac64cf5..823c62f85 100644 --- a/lib/cartopy/io/shapereader.py +++ b/lib/cartopy/io/shapereader.py @@ -133,9 +133,9 @@ class BasicReader: """ - def __init__(self, filename, **kwargs): + def __init__(self, filename, bbox=None, **kwargs): # Validate the filename/shapefile - self._reader = reader = shapefile.Reader(filename, **kwargs) + self._reader = reader = shapefile.Reader(filename, bbox=bbox, **kwargs) if reader.shp is None or reader.shx is None or reader.dbf is None: raise ValueError("Incomplete shapefile definition " "in '%s'." % filename)