|
@@ -23,9 +23,9 @@ def gen_sources(sourceProviders, location):
|
|
|
print("Unable to find a position for " + location)
|
|
|
else:
|
|
|
for sp in sourceProviders:
|
|
|
- # keep 2 nearest sources, if distance < 2 km
|
|
|
+ # keep 2 nearest sources (and distance equivalent), if distance < 2 km
|
|
|
ids_pos = {id: pos for (dist, pos, id) in k_neighbors(sp.dic_of_positions(), position, 2) if dist < 2}
|
|
|
- print('Cherches les sources : ', list(ids_pos.keys()))
|
|
|
+ print('Cherche les sources : ', list(ids_pos.keys()))
|
|
|
for source in sp.sources_of_ids(ids_pos):
|
|
|
yield source
|
|
|
|