Graph From Address¶

Create a graph from OSM within some distance of some address.

In [ ]:
# OSMnx: New Methods for Acquiring, Constructing, Analyzing, and Visualizing Complex Street Networks
import osmnx as ox

ox.config(use_cache=True, log_console=False)
ox.__version__
Out[ ]:
'1.1.2'

all_private¶

In [ ]:
address = '서울특별시, 대한민국'
dist = 1000
dist_type = 'bbox' # "network", "bbox"
network_type = 'all_private' # "all_private", "all", "bike", "drive", "drive_service", "walk"

# Create a graph from OSM within some distance of some address.
G = ox.graph_from_address(
    address, 
    dist=dist, 
    dist_type=dist_type,
    network_type=network_type, 
    simplify=True, 
    retain_all=False, 
    truncate_by_edge=False, 
    return_coords=False, 
    clean_periphery=True, 
    custom_filter=None)

# Plot a graph.
fig, ax = ox.plot_graph(G)
In [ ]:
address = '서울특별시, 대한민국'
dist = 1000
dist_type = 'network' # "network", "bbox"
network_type = 'all_private' # "all_private", "all", "bike", "drive", "drive_service", "walk"

# Create a graph from OSM within some distance of some address.
G2 = ox.graph_from_address(
    address, 
    dist=dist, 
    dist_type=dist_type,
    network_type=network_type, 
    simplify=True, 
    retain_all=False, 
    truncate_by_edge=False, 
    return_coords=False, 
    clean_periphery=True, 
    custom_filter=None)

# Plot a graph.
fig, ax = ox.plot_graph(G2)

all¶

In [ ]:
address = '서울특별시, 대한민국'
dist = 1000
dist_type = 'bbox' # "network", "bbox"
network_type = 'all' # "all_private", "all", "bike", "drive", "drive_service", "walk"

# Create a graph from OSM within some distance of some address.
G3 = ox.graph_from_address(
    address, 
    dist=dist, 
    dist_type=dist_type,
    network_type=network_type, 
    simplify=True, 
    retain_all=False, 
    truncate_by_edge=False, 
    return_coords=False, 
    clean_periphery=True, 
    custom_filter=None)

# Plot a graph.
fig, ax = ox.plot_graph(G3)
In [ ]:
address = '서울특별시, 대한민국'
dist = 1000
dist_type = 'network' # "network", "bbox"
network_type = 'all' # "all_private", "all", "bike", "drive", "drive_service", "walk"

# Create a graph from OSM within some distance of some address.
G4 = ox.graph_from_address(
    address, 
    dist=dist, 
    dist_type=dist_type,
    network_type=network_type, 
    simplify=True, 
    retain_all=False, 
    truncate_by_edge=False, 
    return_coords=False, 
    clean_periphery=True, 
    custom_filter=None)

# Plot a graph.
fig, ax = ox.plot_graph(G4)

bike¶

In [ ]:
address = '서울특별시, 대한민국'
dist = 1000
dist_type = 'bbox' # "network", "bbox"
network_type = 'bike' # "all_private", "all", "bike", "drive", "drive_service", "walk"

# Create a graph from OSM within some distance of some address.
G5 = ox.graph_from_address(
    address, 
    dist=dist, 
    dist_type=dist_type,
    network_type=network_type, 
    simplify=True, 
    retain_all=False, 
    truncate_by_edge=False, 
    return_coords=False, 
    clean_periphery=True, 
    custom_filter=None)

# Plot a graph.
fig, ax = ox.plot_graph(G5)
In [ ]:
address = '서울특별시, 대한민국'
dist = 1000
dist_type = 'network' # "network", "bbox"
network_type = 'bike' # "all_private", "all", "bike", "drive", "drive_service", "walk"

# Create a graph from OSM within some distance of some address.
G6 = ox.graph_from_address(
    address, 
    dist=dist, 
    dist_type=dist_type,
    network_type=network_type, 
    simplify=True, 
    retain_all=False, 
    truncate_by_edge=False, 
    return_coords=False, 
    clean_periphery=True, 
    custom_filter=None)

# Plot a graph.
fig, ax = ox.plot_graph(G6)

drive¶

In [ ]:
address = '서울특별시, 대한민국'
dist = 1000
dist_type = 'bbox' # "network", "bbox"
network_type = 'drive' # "all_private", "all", "bike", "drive", "drive_service", "walk"

# Create a graph from OSM within some distance of some address.
G7 = ox.graph_from_address(
    address, 
    dist=dist, 
    dist_type=dist_type,
    network_type=network_type, 
    simplify=True, 
    retain_all=False, 
    truncate_by_edge=False, 
    return_coords=False, 
    clean_periphery=True, 
    custom_filter=None)

# Plot a graph.
fig, ax = ox.plot_graph(G7)
In [ ]:
address = '서울특별시, 대한민국'
dist = 1000
dist_type = 'network' # "network", "bbox"
network_type = 'drive' # "all_private", "all", "bike", "drive", "drive_service", "walk"

# Create a graph from OSM within some distance of some address.
G8 = ox.graph_from_address(
    address, 
    dist=dist, 
    dist_type=dist_type,
    network_type=network_type, 
    simplify=True, 
    retain_all=False, 
    truncate_by_edge=False, 
    return_coords=False, 
    clean_periphery=True, 
    custom_filter=None)

# Plot a graph.
fig, ax = ox.plot_graph(G8)

drive_service¶

In [ ]:
address = '서울특별시, 대한민국'
dist = 1000
dist_type = 'bbox' # "network", "bbox"
network_type = 'drive_service' # "all_private", "all", "bike", "drive", "drive_service", "walk"

# Create a graph from OSM within some distance of some address.
G9 = ox.graph_from_address(
    address, 
    dist=dist, 
    dist_type=dist_type,
    network_type=network_type, 
    simplify=True, 
    retain_all=False, 
    truncate_by_edge=False, 
    return_coords=False, 
    clean_periphery=True, 
    custom_filter=None)

# Plot a graph.
fig, ax = ox.plot_graph(G9)
In [ ]:
address = '서울특별시, 대한민국'
dist = 1000
dist_type = 'network' # "network", "bbox"
network_type = 'drive_service' # "all_private", "all", "bike", "drive", "drive_service", "walk"

# Create a graph from OSM within some distance of some address.
G10 = ox.graph_from_address(
    address, 
    dist=dist, 
    dist_type=dist_type,
    network_type=network_type, 
    simplify=True, 
    retain_all=False, 
    truncate_by_edge=False, 
    return_coords=False, 
    clean_periphery=True, 
    custom_filter=None)

# Plot a graph.
fig, ax = ox.plot_graph(G10)

Walk¶

In [ ]:
address = '서울특별시, 대한민국'
dist = 1000
dist_type = 'bbox' # "network", "bbox"
network_type = 'walk' # "all_private", "all", "bike", "drive", "drive_service", "walk"

# Create a graph from OSM within some distance of some address.
G11 = ox.graph_from_address(
    address, 
    dist=dist, 
    dist_type=dist_type,
    network_type=network_type, 
    simplify=True, 
    retain_all=False, 
    truncate_by_edge=False, 
    return_coords=False, 
    clean_periphery=True, 
    custom_filter=None)

# Plot a graph.
fig, ax = ox.plot_graph(G11)
In [ ]:
address = '서울특별시, 대한민국'
dist = 1000
dist_type = 'network' # "network", "bbox"
network_type = 'walk' # "all_private", "all", "bike", "drive", "drive_service", "walk"

# Create a graph from OSM within some distance of some address.
G12 = ox.graph_from_address(
    address, 
    dist=dist, 
    dist_type=dist_type,
    network_type=network_type, 
    simplify=True, 
    retain_all=False, 
    truncate_by_edge=False, 
    return_coords=False, 
    clean_periphery=True, 
    custom_filter=None)

# Plot a graph.
fig, ax = ox.plot_graph(G12)