I am getting familiar with the package and I have been trying to find a list of all the possible custom filters for network_type.
Looking directly at the code has provided some ideas, but I wonder if there is a list somewhere with all the type of filters (motorway, primary, residential) per network_type (drive, walking,bike)
Here is a link to all the types of filters road network analysis and OpenStreetMap Wiki.
The network_type parameter allows you to specify the type of network (e.g., driving, walking, biking). Each network_type includes a predefined set of OSM highway tags.
driveIncluded Highway Types:
motorway, motorway_linktrunk, trunk_linkprimary, primary_linksecondary, secondary_linktertiary, tertiary_linkunclassified, residentialliving_street, serviceimport osmnx as ox
# Fetch driving network
G = ox.graph_from_place('Your Location', network_type='drive')
drive_serviceIncluded Highway Types:
driveservice roadsG = ox.graph_from_place('Your Location', network_type='drive_service')
bikeIncluded Highway Types:
cyclewayprimary, primary_linksecondary, secondary_linktertiary, tertiary_linkunclassified, residentialliving_street, servicepath, road, trackG = ox.graph_from_place('Your Location', network_type='bike')
walkIncluded Highway Types:
footway, pedestrianpath, stepsresidential, living_streetservicecycleway, road (for crossings and walkways)G = ox.graph_from_place('Your Location', network_type='walk')
allIncluded Highway Types:
motorway, trunk, primary, etc.unclassified, residential, service, etc.footway, pedestrian, path, etc.cycleway, steps, track, bridleway, raceway, busway, etc.G = ox.graph_from_place('Your Location', network_type='all')
all_privateIncluded Highway Types:
allG = ox.graph_from_place('Your Location', network_type='all_private')
You can use a Custom filter
highway_types = [
'motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'residential', 'unclassified',
'motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary_link',
'living_street', 'service', 'road'
]
custom_filter = '["highway"~"{}"]'.format('|'.join(highway_types))
G = ox.graph_from_place('Your Location', custom_filter=custom_filter)