[fix] classmethod for loading polygons
This commit is contained in:
@@ -254,11 +254,11 @@ class PolygonIndex(object):
|
|||||||
def load_polygons(cls, filename):
|
def load_polygons(cls, filename):
|
||||||
f = open(filename)
|
f = open(filename)
|
||||||
polygons = {}
|
polygons = {}
|
||||||
self.i = 0
|
cls.i = 0
|
||||||
for line in f:
|
for line in f:
|
||||||
feature = json.loads(line.rstrip())
|
feature = json.loads(line.rstrip())
|
||||||
polygons[i] = prep(cls.polygon_from_geojson(feature))
|
polygons[cls.i] = prep(cls.polygon_from_geojson(feature))
|
||||||
self.i += 1
|
cls.i += 1
|
||||||
return polygons
|
return polygons
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user