From 4170f6e9e3d8b10c6d5f3f3aa7e359ec0df6188c Mon Sep 17 00:00:00 2001 From: Al Date: Thu, 26 Nov 2015 14:14:53 -0500 Subject: [PATCH] [fix] same options for geohash-based index --- scripts/geodata/polygons/index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/geodata/polygons/index.py b/scripts/geodata/polygons/index.py index 50fbae2d..56b4c105 100644 --- a/scripts/geodata/polygons/index.py +++ b/scripts/geodata/polygons/index.py @@ -277,7 +277,7 @@ class GeohashPolygonIndex(PolygonIndex): lat, lon = (bbox[1] + bbox[3]) / 2.0, (bbox[0] + bbox[2]) / 2.0 self.index_point(lat, lon, geohash_level) - def get_candidate_polygons(self, lat, lon, all_levels=False): + def get_candidate_polygons(self, lat, lon, return_all=False): candidates = [] code = geohash.encode(lat, lon) for level, area in self.GEOHASH_PRECISIONS: @@ -285,7 +285,7 @@ class GeohashPolygonIndex(PolygonIndex): if not indices: continue candidates.extend(indices) - if not all_levels: + if not return_all: break return candidates