[fix] language polygon index

This commit is contained in:
Al
2015-08-14 21:22:15 -04:00
parent 0e92abd53e
commit 05b8f555d5

View File

@@ -105,7 +105,7 @@ class LanguagePolygonIndex(RTreePolygonIndex):
if poly_type == 'Polygon':
poly = Polygon(rec['geometry']['coordinates'][0])
index.index_polygon(i, poly)
poly = self.simplify_polygon(poly)
poly = index.simplify_polygon(poly)
index.add_polygon(poly, dict(rec['properties']))
elif poly_type == 'MultiPolygon':
polys = []
@@ -114,7 +114,7 @@ class LanguagePolygonIndex(RTreePolygonIndex):
polys.append(poly)
index.index_polygon(i, poly)
multi_poly = self.simplify_polygon(MultiPolygon(polys))
multi_poly = index.simplify_polygon(MultiPolygon(polys))
index.add_polygon(multi_poly, dict(rec['properties']))
else:
continue