From 95b3b20a43a90b468fd595aff0a97ae47bf16f00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20W=C3=BCllhorst?= Date: Sun, 24 Sep 2017 23:20:42 +0200 Subject: [PATCH] Updated shapes parser: ignore features without geometry --- parser/ShapesParser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parser/ShapesParser.py b/parser/ShapesParser.py index 080468f..d9191ae 100644 --- a/parser/ShapesParser.py +++ b/parser/ShapesParser.py @@ -9,7 +9,8 @@ class ShapesParser(JsonParser): shapes = [] if 'features' in self.__jsonData__: for feature in self.__jsonData__['features']: - shapes.append(shape(feature['geometry'])) + if feature['geometry']: + shapes.append(shape(feature['geometry'])) elif 'geometries' in self.__jsonData__: for geometry in self.__jsonData__['geometries']: shapes.append(shape(geometry))