From 59e6a6a1664a2147063bc5becc76dfc4a078e275 Mon Sep 17 00:00:00 2001 From: ChimneySwift <28179563+ChimneySwift@users.noreply.github.com> Date: Mon, 9 Oct 2023 16:29:42 +1000 Subject: [PATCH] Update automatic PostGIS type conversion for Shapely 2.0 Shapely 1.8 -> 2.0 depreciates the shapely.geometry.asShape() method in favor of shapely.geometry.shape(). source: https://shapely.readthedocs.io/en/stable/migration.html#other-deprecated-functionality --- docs/usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage.rst b/docs/usage.rst index 82a7a370..91897790 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -288,7 +288,7 @@ will work. if not hasattr(geometry, '__geo_interface__'): raise TypeError('{g} does not conform to ' 'the geo interface'.format(g=geometry)) - shape = shapely.geometry.asShape(geometry) + shape = shapely.geometry.shape(geometry) return shapely.wkb.dumps(shape) def decode_geometry(wkb):