[fix] language polygon index
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user