From 654f8f3f42c88678802bba6c537721fb52d753c5 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 25 Oct 2009 18:08:03 -0400 Subject: [PATCH] Modified the Geometry.Polygon.from_wkt() method to return a Geometry.Polygon. --- src/Geometry.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Geometry.py b/src/Geometry.py index 6c039a8..2bee60a 100644 --- a/src/Geometry.py +++ b/src/Geometry.py @@ -242,8 +242,9 @@ class Polygon: # Ex: POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2, 3 2, 3 3, 2 3,2 2)) if (text.lower().find('polygon') == -1): return None - - return shapely.wkt.loads(text) + + sp = shapely.wkt.loads(text) + return Polygon.from_shapely(sp) def drag_rectangle(self, v): -- 2.44.2