Skip to content
Snippets Groups Projects
Commit 76f4449c authored by Martin Schrön's avatar Martin Schrön
Browse files

Updated osmnx for rivers

parent 370b3e16
No related branches found
No related tags found
Loading
......@@ -134,7 +134,7 @@ class Graph:
self.ls = '--'
self.color = 'black'
self.alpha = 0.5
self.network_type = 'none'
self.network_type = None #'none'
self.infrastructure = 'way["railway"]'
self.custom_filter = None
......@@ -143,9 +143,9 @@ class Graph:
self.ls = '-'
self.color = '#97B6E1'
self.alpha = 0.1
self.network_type = 'none'
self.infrastructure = 'way["waterway"]'
self.custom_filter = None
self.network_type = "all" #'none'
self.infrastructure = "none" #'way["waterway"]'
self.custom_filter = '["waterway"~"river"]'
def make_bbox(self, bbox=None, lats=None, lons=None):
......@@ -204,11 +204,13 @@ class Graph:
print('Download Road Network using a BoundaryBox')
bbox=self.boundary
self.G = ox.graph_from_bbox(bbox[3], bbox[2], bbox[0], bbox[1],
simplify=True, truncate_by_edge=True, retain_all=True,
network_type =network_type,
custom_filter =custom_filter)
simplify=True, truncate_by_edge=True, retain_all=True,
network_type ="all",
custom_filter ='["waterway"~"river"]')
# infrastructure='way["waterway"]'
print("Done!")
self.data = self.graph2gdf()
if len(self.data)<=0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment