From 7742da09c7cf8624e80e984df8b62a1c64c52211 Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Tue, 4 Feb 2020 16:22:53 -0500 Subject: [PATCH] Add option to not use cache --- code/trail/network.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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()