Improve query to the google maps geocoding api

This commit is contained in:
Arne Schlüter 2015-01-18 20:55:47 +01:00
commit 872d7b219d

View file

@ -58,9 +58,9 @@ def improve_potential_places(pos_tuples):
for tuple in tuple_list: for tuple in tuple_list:
index += 1 index += 1
# exclude articles ("the", "a"), they only introduce noise, but # exclude articles ("the", "a") beginning the phrase, they only
# keep the list as a whole # introduce noise, but keep the list as a whole
if tuple[1] == "ART": if tuple[1] == "ART" and index == 0:
continue continue
# if we have numbers in the middle of our phrase, probably the # if we have numbers in the middle of our phrase, probably the
@ -104,8 +104,9 @@ def get_geoloc(query):
} }
params = { params = {
"address": query, "address": query + ", Berlin",
"components": "country:DE|administrative_area:Berlin", "bounds": "52.6754542,13.7611176|52.33962959999999,13.0891553",
"components": "country:DE",
"sensor": False "sensor": False
} }