[openaddresses] adding clear_cache method to clear the LRU cache for point-in-polygon indices and using it in OpenAddresses import since it heavily reuses polygons and only for the current file
This commit is contained in:
@@ -255,6 +255,9 @@ class OpenAddressesFormatter(object):
|
||||
latitude_index = headers.index('LAT')
|
||||
longitude_index = headers.index('LON')
|
||||
|
||||
# Clear cached polygons
|
||||
self.components.osm_admin_rtree.clear_cache()
|
||||
|
||||
for row in reader:
|
||||
try:
|
||||
latitude = float(row[latitude_index])
|
||||
|
||||
Reference in New Issue
Block a user