From: Michael Orlitzky Date: Sun, 25 Oct 2009 22:08:03 +0000 (-0400) Subject: Modified the Geometry.Polygon.from_wkt() method to return a Geometry.Polygon. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=654f8f3f42c88678802bba6c537721fb52d753c5;p=dead%2Fcensus-tools.git Modified the Geometry.Polygon.from_wkt() method to return a Geometry.Polygon. --- 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):