Custom network simplification

Manually configure network simplification steps and parameters.

Network simplification helps to prevent distortions in centrality measures and can also be preferable for visualisation.

While cleaning and simplifying the network, cityseer keeps track of intersection coordinates and street geometries and updates these in place, checking that the street alignments remain as accurate as possible. This is a complex undertaking that involves finding an approach intended to work for most situations. Manual inspection and cleaning is recommended as a final step for best results.

from cityseer.tools import graphs, plot, io

The test area is taken from London Soho.

lng, lat = -0.13396079424572427, 51.51371088849723
buffer = 1200
poly_wgs, epsg_code = io.buffered_point_poly(lng, lat, buffer)

Option 1 - Automatic simplification

Simplification is automatic when using the osm_graph_from_poly function.

G_auto = io.osm_graph_from_poly(
    poly_wgs,
    simplify=True,
)
print(G_auto)
plot.plot_nx(
    G_auto,
    plot_geoms=True,
    figsize=(10, 10),
    x_lim=(698173, 699570),
    y_lim=(5710085, 5711440),
)
WARNING:cityseer.tools.io:Unsuccessful OSM API request response, trying again...
WARNING:cityseer.tools.io:Unable to parse level info: -`;-4
WARNING:cityseer.tools.io:Unable to parse level info: -`;-4
WARNING:cityseer.tools.io:Unable to parse level info: -`;-4
INFO:cityseer.tools.graphs:Generating interpolated edge geometries.
100%|██████████| 17203/17203 [00:00<00:00, 140809.82it/s]
WARNING:cityseer.tools.util:The to_crs_code parameter 4326 is not a projected CRS
INFO:cityseer.tools.io:Converting networkX graph to CRS code 32630.
WARNING:cityseer.tools.util:The to_crs_code parameter 4326 is not a projected CRS
INFO:cityseer.tools.io:Processing node x, y coordinates.
100%|██████████| 16104/16104 [00:00<00:00, 1140020.45it/s]
INFO:cityseer.tools.io:Processing edge geom coordinates, if present.
100%|██████████| 17203/17203 [00:00<00:00, 24313.61it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 16104/16104 [00:00<00:00, 51857.90it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 8871/8871 [00:00<00:00, 1372166.65it/s]
100%|██████████| 8871/8871 [00:00<00:00, 18580.27it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 7772/7772 [00:00<00:00, 123038.74it/s]
100%|██████████| 5372/5372 [00:00<00:00, 307265.80it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 6734/6734 [00:00<00:00, 2176500.20it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4843/4843 [00:00<00:00, 1471957.56it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3884/3884 [00:00<00:00, 264454.74it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4843/4843 [00:00<00:00, 248003.98it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4810/4810 [00:00<00:00, 1201870.74it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3884/3884 [00:00<00:00, 54710.58it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4877/4877 [00:00<00:00, 48857.99it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4850/4850 [00:00<00:00, 1441188.41it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3884/3884 [00:00<00:00, 296506.80it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4851/4851 [00:00<00:00, 408303.27it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4851/4851 [00:00<00:00, 1473001.43it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3884/3884 [00:00<00:00, 38510.69it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4853/4853 [00:00<00:00, 355712.87it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3884/3884 [00:00<00:00, 187877.58it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3884/3884 [00:00<00:00, 1005225.02it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4852/4852 [00:00<00:00, 407692.03it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3884/3884 [00:00<00:00, 1146342.74it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3842/3842 [00:00<00:00, 167920.76it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3842/3842 [00:00<00:00, 74855.14it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4423/4423 [00:00<00:00, 126708.60it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3532/3532 [00:00<00:00, 1176857.46it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3508/3508 [00:00<00:00, 202154.57it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3508/3508 [00:00<00:00, 303542.56it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4263/4263 [00:00<00:00, 291329.01it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3483/3483 [00:00<00:00, 2612906.61it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3476/3476 [00:00<00:00, 162689.29it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3476/3476 [00:00<00:00, 156823.40it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4167/4167 [00:00<00:00, 100165.43it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3403/3403 [00:00<00:00, 1315867.66it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3396/3396 [00:00<00:00, 167077.48it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4145/4145 [00:00<00:00, 1044355.74it/s]
INFO:cityseer.tools.graphs:Snapping gapped endings.
100%|██████████| 3396/3396 [00:00<00:00, 29439.00it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4339/4339 [00:00<00:00, 1515580.03it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3396/3396 [00:00<00:00, 22136.63it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5024/5024 [00:00<00:00, 378342.85it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 3784/3784 [00:00<00:00, 508889.52it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3184/3184 [00:00<00:00, 57651.92it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 3472/3472 [00:00<00:00, 1539063.99it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 2233/2233 [00:00<00:00, 25846.11it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 3489/3489 [00:00<00:00, 169010.31it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 2233/2233 [00:00<00:00, 188706.50it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 2233/2233 [00:00<00:00, 22403.20it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2882/2882 [00:00<00:00, 64035.85it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 2681/2681 [00:00<00:00, 1086781.58it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 1785/1785 [00:00<00:00, 35896.02it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2683/2683 [00:00<00:00, 343927.80it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 1785/1785 [00:00<00:00, 171252.86it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 1785/1785 [00:00<00:00, 23773.08it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2309/2309 [00:00<00:00, 93399.12it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1470/1470 [00:00<00:00, 147266.99it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 50.
100%|██████████| 2102/2102 [00:00<00:00, 225098.35it/s]
INFO:cityseer.tools.graphs:Ironing edges.
100%|██████████| 2094/2094 [00:00<00:00, 47041.44it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 1.
100%|██████████| 2085/2085 [00:00<00:00, 345206.80it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 1356/1356 [00:00<00:00, 654485.18it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1335/1335 [00:00<00:00, 477968.06it/s]
INFO:cityseer.tools.plot:Preparing graph nodes
INFO:cityseer.tools.plot:Preparing graph edges
MultiGraph with 1305 nodes and 2034 edges
100%|██████████| 2034/2034 [00:00<00:00, 100077.59it/s]

Option 2 - Automatic simplification with custom parameters

osm_graph_from_poly accepts parameters which offer a certain amount of control over the simplification process. Altering the distances used for final_clean_distances will affect how aggressive the final round of network simplification is. The default is (5, 10). So, for example, adding 25 will make the simplification more aggressive.

Footways and service roads intersecting green spaces are removed by default. This can be changed by setting green_footways and green_service_roads to True.

cycleways is set to True by default because they sometimes provide important links within networks.

The below example uses more aggressive cleaning while not discarding green footways.

G_params = io.osm_graph_from_poly(
    poly_wgs,
    simplify=True,
    final_clean_distances=(5, 10, 25),  # adds 25
    remove_disconnected=100,
    cycleways=True,
    busways=False,
    green_footways=True,  # keeps
    green_service_roads=False,
)
print(G_params)
plot.plot_nx(
    G_params,
    plot_geoms=True,
    figsize=(10, 10),
    x_lim=(698173, 699570),
    y_lim=(5710085, 5711440),
)
WARNING:cityseer.tools.io:Unable to parse level info: -`;-4
WARNING:cityseer.tools.io:Unable to parse level info: -`;-4
WARNING:cityseer.tools.io:Unable to parse level info: -`;-4
INFO:cityseer.tools.graphs:Generating interpolated edge geometries.
100%|██████████| 17203/17203 [00:00<00:00, 140875.52it/s]
WARNING:cityseer.tools.util:The to_crs_code parameter 4326 is not a projected CRS
INFO:cityseer.tools.io:Converting networkX graph to CRS code 32630.
WARNING:cityseer.tools.util:The to_crs_code parameter 4326 is not a projected CRS
INFO:cityseer.tools.io:Processing node x, y coordinates.
100%|██████████| 16104/16104 [00:00<00:00, 1150369.09it/s]
INFO:cityseer.tools.io:Processing edge geom coordinates, if present.
100%|██████████| 17203/17203 [00:00<00:00, 25487.78it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 16104/16104 [00:00<00:00, 55485.33it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 8871/8871 [00:00<00:00, 1477022.38it/s]
100%|██████████| 8871/8871 [00:00<00:00, 19906.38it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 7772/7772 [00:00<00:00, 128775.62it/s]
100%|██████████| 5372/5372 [00:00<00:00, 298711.40it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 6734/6734 [00:00<00:00, 3223515.54it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 5106/5106 [00:00<00:00, 1401578.29it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 4053/4053 [00:00<00:00, 292867.85it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5106/5106 [00:00<00:00, 234245.36it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 5068/5068 [00:00<00:00, 54833.02it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 4053/4053 [00:00<00:00, 57821.48it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5135/5135 [00:00<00:00, 288628.55it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 5108/5108 [00:00<00:00, 1241352.62it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 4053/4053 [00:00<00:00, 302235.08it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5109/5109 [00:00<00:00, 423701.42it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 5109/5109 [00:00<00:00, 1566539.89it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 4053/4053 [00:00<00:00, 183467.13it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5112/5112 [00:00<00:00, 426208.72it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 4053/4053 [00:00<00:00, 210632.46it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 4053/4053 [00:00<00:00, 46117.01it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5111/5111 [00:00<00:00, 423406.83it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 4053/4053 [00:00<00:00, 1096884.38it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 4003/4003 [00:00<00:00, 177997.57it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 4003/4003 [00:00<00:00, 79565.34it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4674/4674 [00:00<00:00, 131880.56it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3693/3693 [00:00<00:00, 1402024.32it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3669/3669 [00:00<00:00, 188559.44it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3669/3669 [00:00<00:00, 349731.86it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4514/4514 [00:00<00:00, 325355.52it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3644/3644 [00:00<00:00, 2877809.03it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3637/3637 [00:00<00:00, 172900.71it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3637/3637 [00:00<00:00, 164997.55it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4417/4417 [00:00<00:00, 299699.77it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3563/3563 [00:00<00:00, 2479148.17it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3554/3554 [00:00<00:00, 175975.78it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4391/4391 [00:00<00:00, 1033454.29it/s]
INFO:cityseer.tools.graphs:Snapping gapped endings.
100%|██████████| 3554/3554 [00:00<00:00, 32619.86it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4582/4582 [00:00<00:00, 1584361.16it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3554/3554 [00:00<00:00, 24567.26it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5303/5303 [00:00<00:00, 423559.77it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 3963/3963 [00:00<00:00, 684823.12it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3370/3370 [00:00<00:00, 63601.53it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 3740/3740 [00:00<00:00, 1580682.89it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 2401/2401 [00:00<00:00, 25363.36it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 3780/3780 [00:00<00:00, 184650.59it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 2401/2401 [00:00<00:00, 183577.74it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 2401/2401 [00:00<00:00, 21866.01it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2973/2973 [00:00<00:00, 63803.69it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 2758/2758 [00:00<00:00, 1647612.94it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 1826/1826 [00:00<00:00, 37194.71it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2760/2760 [00:00<00:00, 390444.16it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 1826/1826 [00:00<00:00, 184522.70it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 1826/1826 [00:00<00:00, 25383.46it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2444/2444 [00:00<00:00, 116853.76it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 2370/2370 [00:00<00:00, 1486763.46it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 1554/1554 [00:00<00:00, 31796.58it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2388/2388 [00:00<00:00, 327662.85it/s]
WARNING:cityseer.tools.graphs:Be cautious with large buffer distances when using crawl!
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 1554/1554 [00:00<00:00, 179959.37it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 1554/1554 [00:00<00:00, 21444.57it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 1982/1982 [00:00<00:00, 101906.33it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1201/1201 [00:00<00:00, 233557.08it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 50.
100%|██████████| 1870/1870 [00:00<00:00, 129779.41it/s]
INFO:cityseer.tools.graphs:Ironing edges.
100%|██████████| 1846/1846 [00:00<00:00, 44828.74it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 1.
100%|██████████| 1831/1831 [00:00<00:00, 301806.60it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 1141/1141 [00:00<00:00, 659550.84it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1131/1131 [00:00<00:00, 584854.87it/s]
INFO:cityseer.tools.plot:Preparing graph nodes
INFO:cityseer.tools.plot:Preparing graph edges
MultiGraph with 1112 nodes and 1803 edges
100%|██████████| 1803/1803 [00:00<00:00, 142317.60it/s]

Option 3 - Custom OSM requests

You may want more control over the data request that is sent internally to the OSM Overpass API. This is possible by providing the custom_request argument. The Overpass API is useful for figuring out which tags you may want to include or exclude in your request.

Note that the custom request must include a {geom_osm} placeholder, which will be replaced internally with the geometry of the area you are requesting data for.

req = """
    [out:json];
    (way["highway"]
        ["highway"!~"bus_guideway|busway|escape|raceway|proposed|planned|abandoned|platform|
            emergency_bay|rest_area|disused|corridor|ladder|bus_stop|elevator|services"]
        ["area"!="yes"]
        ["footway"!="sidewalk"]
        ["amenity"!~"charging_station|parking|fuel|motorcycle_parking|parking_entrance|parking_space"]
        ["indoor"!="yes"]
        ["level"!="-2"]
        ["level"!="-3"]
        ["level"!="-4"]
        ["level"!="-5"](poly:"{geom_osm}");
    );
    out body;
    >;
    out qt;
"""
G_req = io.osm_graph_from_poly(poly_wgs, simplify=True, custom_request=req)
print(G_req)
plot.plot_nx(
    G_req,
    plot_geoms=True,
    figsize=(10, 10),
    x_lim=(698173, 699570),
    y_lim=(5710085, 5711440),
)
WARNING:cityseer.tools.io:Unable to parse level info: -`;-4
WARNING:cityseer.tools.io:Unable to parse level info: -`;-4
WARNING:cityseer.tools.io:Unable to parse level info: -`;-4
INFO:cityseer.tools.graphs:Generating interpolated edge geometries.
100%|██████████| 17203/17203 [00:00<00:00, 141512.65it/s]
WARNING:cityseer.tools.util:The to_crs_code parameter 4326 is not a projected CRS
INFO:cityseer.tools.io:Converting networkX graph to CRS code 32630.
WARNING:cityseer.tools.util:The to_crs_code parameter 4326 is not a projected CRS
INFO:cityseer.tools.io:Processing node x, y coordinates.
100%|██████████| 16104/16104 [00:00<00:00, 1070869.15it/s]
INFO:cityseer.tools.io:Processing edge geom coordinates, if present.
100%|██████████| 17203/17203 [00:00<00:00, 25404.74it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 16104/16104 [00:00<00:00, 55438.15it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 8871/8871 [00:00<00:00, 1567496.77it/s]
100%|██████████| 8871/8871 [00:00<00:00, 19880.92it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 7772/7772 [00:00<00:00, 129154.70it/s]
100%|██████████| 5372/5372 [00:00<00:00, 307362.20it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 6734/6734 [00:00<00:00, 2184242.76it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4843/4843 [00:00<00:00, 1533173.39it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3884/3884 [00:00<00:00, 279749.91it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4843/4843 [00:00<00:00, 252213.39it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4810/4810 [00:00<00:00, 1135509.78it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3884/3884 [00:00<00:00, 57002.06it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4877/4877 [00:00<00:00, 273741.68it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4850/4850 [00:00<00:00, 1446414.56it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3884/3884 [00:00<00:00, 314522.19it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4851/4851 [00:00<00:00, 462002.01it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4851/4851 [00:00<00:00, 1697386.23it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3884/3884 [00:00<00:00, 177134.19it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4853/4853 [00:00<00:00, 404550.48it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3884/3884 [00:00<00:00, 186471.12it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3884/3884 [00:00<00:00, 1008336.02it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4852/4852 [00:00<00:00, 459945.83it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3884/3884 [00:00<00:00, 1303671.31it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3842/3842 [00:00<00:00, 197745.96it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3842/3842 [00:00<00:00, 71886.85it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4423/4423 [00:00<00:00, 133503.70it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3532/3532 [00:00<00:00, 1212992.85it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3508/3508 [00:00<00:00, 197278.45it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3508/3508 [00:00<00:00, 349442.32it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4263/4263 [00:00<00:00, 324471.35it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3483/3483 [00:00<00:00, 2589287.63it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3476/3476 [00:00<00:00, 190227.30it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3476/3476 [00:00<00:00, 161996.94it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4167/4167 [00:00<00:00, 304584.45it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3403/3403 [00:00<00:00, 2673387.62it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3396/3396 [00:00<00:00, 191712.51it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4145/4145 [00:00<00:00, 1601602.03it/s]
INFO:cityseer.tools.graphs:Snapping gapped endings.
100%|██████████| 3396/3396 [00:00<00:00, 31824.30it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4339/4339 [00:00<00:00, 1598654.70it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3396/3396 [00:00<00:00, 24934.67it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5024/5024 [00:00<00:00, 413366.48it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 3784/3784 [00:00<00:00, 623894.27it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3184/3184 [00:00<00:00, 58706.46it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 3472/3472 [00:00<00:00, 1619508.84it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 2233/2233 [00:00<00:00, 27569.98it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 3489/3489 [00:00<00:00, 182768.73it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 2233/2233 [00:00<00:00, 185525.44it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 2233/2233 [00:00<00:00, 23325.08it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2882/2882 [00:00<00:00, 65619.25it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 2681/2681 [00:00<00:00, 1164674.16it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 1785/1785 [00:00<00:00, 36533.61it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2683/2683 [00:00<00:00, 402969.19it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 1785/1785 [00:00<00:00, 179902.75it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 1785/1785 [00:00<00:00, 23916.00it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2309/2309 [00:00<00:00, 91110.18it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1470/1470 [00:00<00:00, 175503.88it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 50.
100%|██████████| 2102/2102 [00:00<00:00, 225196.09it/s]
INFO:cityseer.tools.graphs:Ironing edges.
100%|██████████| 2094/2094 [00:00<00:00, 45224.75it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 1.
100%|██████████| 2085/2085 [00:00<00:00, 437540.59it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 1356/1356 [00:00<00:00, 768370.20it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1335/1335 [00:00<00:00, 552808.36it/s]
INFO:cityseer.tools.plot:Preparing graph nodes
INFO:cityseer.tools.plot:Preparing graph edges
MultiGraph with 1305 nodes and 2034 edges
100%|██████████| 2034/2034 [00:00<00:00, 123347.61it/s]

Option 4 - Manual simplification

If you need full control over the simplification process, you can use the following as a template for further configuring your cleaning recipe. This offers a large degree of control, but he precise combination of tags and distances involves a degree of experimentation and some inevitable trade-offs for a given area of interest.

For this approach, start with an unsimplified network, which will perform only rudimentary preparation.

G_raw = io.osm_graph_from_poly(poly_wgs, simplify=False)
print(G_raw)
plot.plot_nx(
    G_raw,
    plot_geoms=True,
    figsize=(10, 10),
    x_lim=(698173, 699570),
    y_lim=(5710085, 5711440),
)
WARNING:cityseer.tools.io:Unable to parse level info: -`;-4
WARNING:cityseer.tools.io:Unable to parse level info: -`;-4
WARNING:cityseer.tools.io:Unable to parse level info: -`;-4
INFO:cityseer.tools.graphs:Generating interpolated edge geometries.
100%|██████████| 17203/17203 [00:00<00:00, 141860.43it/s]
WARNING:cityseer.tools.util:The to_crs_code parameter 4326 is not a projected CRS
INFO:cityseer.tools.io:Converting networkX graph to CRS code 32630.
WARNING:cityseer.tools.util:The to_crs_code parameter 4326 is not a projected CRS
INFO:cityseer.tools.io:Processing node x, y coordinates.
100%|██████████| 16104/16104 [00:00<00:00, 1152665.94it/s]
INFO:cityseer.tools.io:Processing edge geom coordinates, if present.
100%|██████████| 17203/17203 [00:00<00:00, 24613.80it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 16104/16104 [00:00<00:00, 53953.79it/s]
INFO:cityseer.tools.plot:Preparing graph nodes
INFO:cityseer.tools.plot:Preparing graph edges
MultiGraph with 7772 nodes and 8871 edges
100%|██████████| 8871/8871 [00:00<00:00, 38380.30it/s]

Then manipulate the network depending on your needs. See the graphs module for further information what the various functions do.

# remove disconnected components
G = graphs.nx_remove_dangling_nodes(G_raw, despine=0, remove_disconnected=100)
# initialize tag cache for performance
tag_cache: dict = {}
# clean by highway types - leave motorways alone
# split only for a given type at a time
for dist, tags, max_angle in (
    (40, ["trunk"], 30),
    (32, ["primary"], 35),
    (28, ["secondary"], 40),
    (24, ["tertiary"], 45),
):
    G = graphs.nx_split_opposing_geoms(
        G,
        buffer_dist=dist,
        squash_nodes=True,
        centroid_by_itx=True,
        osm_hwy_target_tags=tags,
        osm_matched_tags_only=True,
        prioritise_by_hwy_tag=True,
        simplify_by_max_angle=max_angle,
        tag_cache=tag_cache,
    )
# consolidate
for dist, tags, max_angle in (
    (32, ["trunk"], 45),
    (28, ["primary"], 50),
    (24, ["secondary"], 55),
    (20, ["tertiary"], 60),
):
    G = graphs.nx_consolidate_nodes(
        G,
        buffer_dist=dist,
        crawl=False,
        centroid_by_itx=True,
        osm_hwy_target_tags=tags,
        osm_matched_tags_only=True,
        prioritise_by_hwy_tag=True,
        simplify_by_max_angle=max_angle,
        tag_cache=tag_cache,
    )
    G = graphs.nx_remove_filler_nodes(G)
# snap gapped endings - don't clean danglers before this
G = graphs.nx_snap_gapped_endings(
    G,
    osm_hwy_target_tags=[
        "residential",
        "living_street",
        # "service", # intentionally omitted - e.g. parking lots
        "cycleway",
        "bridleway",
        "pedestrian",
        # "steps",
        "footway",
        "footway_green",
        "footway_pedestrian",  # plazas
        "path",
    ],
    buffer_dist=20,
    tag_cache=tag_cache,
)
# snap gapped endings to roads - don't clean danglers before this
# look for degree 1 dead-ends and link to nearby edges
G = graphs.nx_split_opposing_geoms(
    G,
    buffer_dist=20,
    osm_hwy_target_tags=[
        # "trunk",  # intentionally omitted
        "primary",
        "primary_link",
        "secondary",
        "secondary_link",
        "tertiary",
        "tertiary_link",
        "residential",
        "living_street",
        # "service", # intentionally omitted - e.g. parking lots
        "cycleway",
        "bridleway",
        "pedestrian",
        # "steps",
        "footway",
        "footway_green",
        "footway_pedestrian",  # plazas
        "path",
    ],
    min_node_degree=1,
    max_node_degree=1,
    squash_nodes=False,
    tag_cache=tag_cache,
)
# remove danglers
G = graphs.nx_remove_dangling_nodes(G, despine=40)
# do smaller scale cleaning
max_angle = 120  # rue de nevers in Paris
for dist in (4, 8):
    G = graphs.nx_split_opposing_geoms(
        G,
        buffer_dist=dist,
        squash_nodes=True,
        centroid_by_itx=True,
        osm_hwy_target_tags=[
            # "trunk",  # intentionally omitted
            # "primary",
            # "primary_link",
            # "secondary",
            # "secondary_link",
            # "tertiary",
            # "tertiary_link",
            # "residential",
            "living_street",
            "service",
            "cycleway",
            "bridleway",
            "pedestrian",
            # "steps",
            "footway",
            "footway_pedestrian",  # plazas
            "path",
            "unclassified",
        ],
        prioritise_by_hwy_tag=True,
        simplify_by_max_angle=max_angle,
        tag_cache=tag_cache,
    )
    G = graphs.nx_consolidate_nodes(
        G,
        buffer_dist=dist,
        crawl=True,
        centroid_by_itx=True,
        osm_hwy_target_tags=[
            # "trunk",
            # "trunk_link",
            # "primary",
            # "primary_link",
            # "secondary",
            # "secondary_link",
            # "tertiary",
            # "tertiary_link",
            # "residential",
            "living_street",
            "service",
            "cycleway",
            "bridleway",
            "pedestrian",
            "steps",
            "footway",
            "footway_pedestrian",  # plazas
            "path",
            "unclassified",
        ],
        prioritise_by_hwy_tag=True,
        simplify_by_max_angle=max_angle,
        tag_cache=tag_cache,
    )
G = graphs.nx_remove_filler_nodes(G)
G = graphs.nx_merge_parallel_edges(
    G, merge_edges_by_midline=True, contains_buffer_dist=50
)
G = graphs.nx_iron_edges(G, min_self_loop_length=100, max_foot_tunnel_length=100)
# do this last to clean up any orphaned sub components
G = graphs.nx_remove_dangling_nodes(G, despine=25)
INFO:cityseer.tools.graphs:Removing dangling nodes.
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 7772/7772 [00:00<00:00, 6119416.31it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 8538/8538 [00:00<00:00, 1094902.24it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 7238/7238 [00:00<00:00, 339986.03it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 8538/8538 [00:00<00:00, 239474.17it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 8492/8492 [00:00<00:00, 1388996.20it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 7238/7238 [00:00<00:00, 51359.90it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 8581/8581 [00:00<00:00, 311686.04it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 8541/8541 [00:00<00:00, 1479822.81it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 7238/7238 [00:00<00:00, 273854.12it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 8543/8543 [00:00<00:00, 399624.59it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 8543/8543 [00:00<00:00, 1185349.80it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 7238/7238 [00:00<00:00, 136956.09it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 8547/8547 [00:00<00:00, 285986.68it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 7238/7238 [00:00<00:00, 195204.33it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 7238/7238 [00:00<00:00, 848710.44it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 8545/8545 [00:00<00:00, 376945.21it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 7238/7238 [00:00<00:00, 1538690.95it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 7184/7184 [00:00<00:00, 192425.31it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 7184/7184 [00:00<00:00, 83605.61it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 7895/7895 [00:00<00:00, 145500.53it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 6680/6680 [00:00<00:00, 2119841.92it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 6656/6656 [00:00<00:00, 185673.35it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 6656/6656 [00:00<00:00, 248405.38it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 7660/7660 [00:00<00:00, 299473.06it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 6582/6582 [00:00<00:00, 4628149.02it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 6580/6580 [00:00<00:00, 206108.30it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 6580/6580 [00:00<00:00, 134299.37it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 7444/7444 [00:00<00:00, 288884.97it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 6388/6388 [00:00<00:00, 1432945.45it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 6381/6381 [00:00<00:00, 181000.73it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 7414/7414 [00:00<00:00, 1431570.29it/s]
INFO:cityseer.tools.graphs:Snapping gapped endings.
100%|██████████| 6381/6381 [00:00<00:00, 13423.06it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 8326/8326 [00:00<00:00, 1189069.26it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 6381/6381 [00:00<00:00, 15776.09it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 10220/10220 [00:00<00:00, 373411.62it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 7468/7468 [00:00<00:00, 645556.82it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 6602/6602 [00:00<00:00, 47284.42it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 6637/6637 [00:00<00:00, 1345396.34it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3887/3887 [00:00<00:00, 22397.29it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 6671/6671 [00:00<00:00, 85913.70it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3887/3887 [00:00<00:00, 181781.55it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3887/3887 [00:00<00:00, 19800.12it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5293/5293 [00:00<00:00, 55715.07it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4814/4814 [00:00<00:00, 1214446.02it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3015/3015 [00:00<00:00, 27889.81it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4835/4835 [00:00<00:00, 373567.03it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3015/3015 [00:00<00:00, 172858.74it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3015/3015 [00:00<00:00, 16889.16it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 3823/3823 [00:00<00:00, 44461.27it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 2175/2175 [00:00<00:00, 111549.27it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 50.
100%|██████████| 3130/3130 [00:00<00:00, 145845.89it/s]
INFO:cityseer.tools.graphs:Ironing edges.
100%|██████████| 3079/3079 [00:00<00:00, 52848.46it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 1.
100%|██████████| 3012/3012 [00:00<00:00, 368789.22it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 1933/1933 [00:00<00:00, 483977.41it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1806/1806 [00:00<00:00, 316069.14it/s]
plot.plot_nx(
    G,
    plot_geoms=True,
    figsize=(10, 10),
    x_lim=(698173, 699570),
    y_lim=(5710085, 5711440),
)
INFO:cityseer.tools.plot:Preparing graph nodes
INFO:cityseer.tools.plot:Preparing graph edges
100%|██████████| 2825/2825 [00:00<00:00, 101820.12it/s]