Updated parser for shapefiles.
geometry collections can be used now, too.
This commit is contained in:
parent
8d4021f122
commit
07223d6cb6
|
@ -7,6 +7,11 @@ class ShapesParser(JsonParser):
|
||||||
|
|
||||||
def __createShapes__(self):
|
def __createShapes__(self):
|
||||||
shapes = []
|
shapes = []
|
||||||
|
if 'features' in self.__jsonData__:
|
||||||
for feature in self.__jsonData__['features']:
|
for feature in self.__jsonData__['features']:
|
||||||
shapes.append(shape(feature['geometry']))
|
shapes.append(shape(feature['geometry']))
|
||||||
|
elif 'geometries' in self.__jsonData__:
|
||||||
|
for geometry in self.__jsonData__['geometries']:
|
||||||
|
shapes.append(shape(geometry))
|
||||||
|
|
||||||
return shapes
|
return shapes
|
||||||
|
|
Loading…
Reference in a new issue