From d519054eb49667a9def2290b64682cb9cdb028d7 Mon Sep 17 00:00:00 2001 From: Al Date: Mon, 16 May 2016 01:52:36 -0400 Subject: [PATCH] [fix] try/except for GeoJSON in neighborhoods index, some of the neighborhoods repo polygons were using 3 coordinates --- scripts/geodata/neighborhoods/reverse_geocode.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/geodata/neighborhoods/reverse_geocode.py b/scripts/geodata/neighborhoods/reverse_geocode.py index adb4c741..fac007d0 100644 --- a/scripts/geodata/neighborhoods/reverse_geocode.py +++ b/scripts/geodata/neighborhoods/reverse_geocode.py @@ -161,7 +161,10 @@ class ZetashapesReverseGeocoder(GeohashPolygonIndex): f = open(os.path.join(repo_path, filename)) else: continue - index.add_geojson_like_file(json.load(f)['features']) + try: + index.add_geojson_like_file(json.load(f)['features']) + except ValueError: + continue return index