Updated shapes parser:
ignore features without geometry
This commit is contained in:
parent
07223d6cb6
commit
95b3b20a43
|
@ -9,7 +9,8 @@ class ShapesParser(JsonParser):
|
||||||
shapes = []
|
shapes = []
|
||||||
if 'features' in self.__jsonData__:
|
if 'features' in self.__jsonData__:
|
||||||
for feature in self.__jsonData__['features']:
|
for feature in self.__jsonData__['features']:
|
||||||
shapes.append(shape(feature['geometry']))
|
if feature['geometry']:
|
||||||
|
shapes.append(shape(feature['geometry']))
|
||||||
elif 'geometries' in self.__jsonData__:
|
elif 'geometries' in self.__jsonData__:
|
||||||
for geometry in self.__jsonData__['geometries']:
|
for geometry in self.__jsonData__['geometries']:
|
||||||
shapes.append(shape(geometry))
|
shapes.append(shape(geometry))
|
||||||
|
|
Loading…
Reference in a new issue