From 4f9bd674dd8a34c417d1ddd713ba4cb23624a6cb Mon Sep 17 00:00:00 2001 From: t3kpunk Date: Fri, 1 Apr 2022 15:33:40 +0200 Subject: [PATCH] Support for Shapely 2.0 ShapelyDeprecationWarning: The array interface is deprecated and will no longer work in Shapely 2.0. Convert the '.coords' to a numpy array instead. --- geog/geog.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/geog/geog.py b/geog/geog.py index ed69600..0a6fd2d 100644 --- a/geog/geog.py +++ b/geog/geog.py @@ -15,6 +15,8 @@ def _to_arrays(*args): single = True for a, ndim in args: try: + arg = np.array(a.coords, copy=False) + except AttributeError: arg = np.array(a, copy=False) except TypeError: # Typically end up in here when list of Shapely geometries is