diff --git a/code/trail/network.py b/code/trail/network.py index b0b856e..cfb79d6 100644 --- a/code/trail/network.py +++ b/code/trail/network.py @@ -55,7 +55,7 @@ def __init__( self.G = self.get_osm_network( buffer_dist=buffer_dist, buffer_unit=buffer_unit) - def get_osm_network(self, buffer_dist, buffer_unit): + def get_osm_network(self, buffer_dist, buffer_unit, use_cache=True): """Use osmnx to get network of roads/trails around trail geometry """ # Take buffer of approximate trail @@ -72,7 +72,8 @@ def get_osm_network(self, buffer_dist, buffer_unit): G = self.osm.get_ways_for_polygon( polygon=approx_trail_buffer, section_name=self.trail_section, - source='geofabrik') + source='geofabrik', + use_cache=use_cache) # Get way ids that are part of the trail trail_way_ids = self._get_osm_way_ids_for_trail()