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:Merging node 12450391665 into 25544116 due to identical x, y coords.
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%|██████████| 16721/16721 [00:00<00:00, 52954.11it/s]
INFO:cityseer.tools.io:Converting networkX graph to CRS code 32630.
INFO:cityseer.tools.io:Processing node x, y coordinates.
100%|██████████| 15582/15582 [00:00<00:00, 1151235.60it/s]
INFO:cityseer.tools.io:Processing edge geom coordinates, if present.
100%|██████████| 16721/16721 [00:00<00:00, 18774.94it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 15582/15582 [00:00<00:00, 23807.70it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 8611/8611 [00:00<00:00, 1417748.84it/s]
100%|██████████| 8611/8611 [00:00<00:00, 10483.71it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 7472/7472 [00:00<00:00, 64412.90it/s]
100%|██████████| 5224/5224 [00:00<00:00, 262883.11it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 6457/6457 [00:00<00:00, 999727.61it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4729/4729 [00:00<00:00, 1206793.84it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3753/3753 [00:00<00:00, 298592.95it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4729/4729 [00:00<00:00, 177436.03it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4700/4700 [00:00<00:00, 1833618.16it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3753/3753 [00:00<00:00, 33844.30it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4748/4748 [00:00<00:00, 301562.06it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4740/4740 [00:00<00:00, 1748395.12it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3753/3753 [00:00<00:00, 145297.34it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4741/4741 [00:00<00:00, 468946.21it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4741/4741 [00:00<00:00, 1195742.35it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3753/3753 [00:00<00:00, 90900.40it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4742/4742 [00:00<00:00, 429140.82it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3753/3753 [00:00<00:00, 55272.51it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3753/3753 [00:00<00:00, 311942.11it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4742/4742 [00:00<00:00, 55589.41it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3753/3753 [00:00<00:00, 605129.09it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3715/3715 [00:00<00:00, 55362.53it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3715/3715 [00:03<00:00, 985.21it/s] 
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4326/4326 [00:00<00:00, 71722.44it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3418/3418 [00:00<00:00, 532407.29it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3391/3391 [00:00<00:00, 55468.44it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3391/3391 [00:00<00:00, 5271.49it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4167/4167 [00:00<00:00, 230655.17it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3357/3357 [00:00<00:00, 947720.17it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3349/3349 [00:00<00:00, 59628.66it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3349/3349 [00:01<00:00, 3085.00it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4077/4077 [00:00<00:00, 277235.74it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3291/3291 [00:00<00:00, 1072029.70it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3285/3285 [00:00<00:00, 55230.46it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4064/4064 [00:00<00:00, 1517597.17it/s]
INFO:cityseer.tools.graphs:Snapping gapped endings.
100%|██████████| 3285/3285 [00:00<00:00, 16483.71it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4225/4225 [00:00<00:00, 1510993.72it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3285/3285 [00:00<00:00, 15411.61it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4886/4886 [00:00<00:00, 469170.54it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 3658/3658 [00:00<00:00, 643437.37it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3092/3092 [00:00<00:00, 32576.30it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 3464/3464 [00:00<00:00, 1682384.10it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 2237/2237 [00:00<00:00, 11791.13it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 3496/3496 [00:00<00:00, 143108.11it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 2237/2237 [00:00<00:00, 58454.56it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 2237/2237 [00:05<00:00, 401.02it/s] 
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2721/2721 [00:00<00:00, 40823.94it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 2567/2567 [00:00<00:00, 1930222.01it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 1718/1718 [00:00<00:00, 12688.79it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2572/2572 [00:00<00:00, 351942.77it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 1718/1718 [00:00<00:00, 53980.99it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 1718/1718 [00:03<00:00, 560.17it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2210/2210 [00:00<00:00, 62422.38it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1411/1411 [00:00<00:00, 110839.48it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 50.
100%|██████████| 2057/2057 [00:00<00:00, 124765.85it/s]
INFO:cityseer.tools.graphs:Ironing edges.
100%|██████████| 2042/2042 [00:00<00:00, 22811.04it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 1.
100%|██████████| 2033/2033 [00:00<00:00, 380857.57it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 1319/1319 [00:00<00:00, 997707.30it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1306/1306 [00:00<00:00, 274946.60it/s]
INFO:cityseer.tools.plot:Preparing graph nodes
INFO:cityseer.tools.plot:Preparing graph edges
MultiGraph with 1276 nodes and 1990 edges
100%|██████████| 1990/1990 [00:00<00:00, 72305.56it/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 20
    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:Merging node 12450391665 into 25544116 due to identical x, y coords.
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%|██████████| 16721/16721 [00:00<00:00, 52195.89it/s]
INFO:cityseer.tools.io:Converting networkX graph to CRS code 32630.
INFO:cityseer.tools.io:Processing node x, y coordinates.
100%|██████████| 15582/15582 [00:00<00:00, 1139354.36it/s]
INFO:cityseer.tools.io:Processing edge geom coordinates, if present.
100%|██████████| 16721/16721 [00:00<00:00, 18822.05it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 15582/15582 [00:00<00:00, 23681.68it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 8611/8611 [00:00<00:00, 1582627.92it/s]
100%|██████████| 8611/8611 [00:00<00:00, 10645.73it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 7472/7472 [00:00<00:00, 63628.38it/s]
100%|██████████| 5224/5224 [00:00<00:00, 323988.88it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 6457/6457 [00:00<00:00, 1179762.19it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4999/4999 [00:00<00:00, 1521355.80it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3924/3924 [00:00<00:00, 274421.82it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4999/4999 [00:00<00:00, 40789.92it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4965/4965 [00:00<00:00, 1664778.91it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3924/3924 [00:00<00:00, 35331.22it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5013/5013 [00:00<00:00, 272831.68it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 5005/5005 [00:00<00:00, 1552928.80it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3924/3924 [00:00<00:00, 146232.33it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5006/5006 [00:00<00:00, 486586.31it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 5006/5006 [00:00<00:00, 1334308.96it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3924/3924 [00:00<00:00, 90707.15it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5007/5007 [00:00<00:00, 444943.33it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3924/3924 [00:00<00:00, 57815.69it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3924/3924 [00:00<00:00, 299179.25it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5007/5007 [00:00<00:00, 372712.88it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3924/3924 [00:00<00:00, 269691.27it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3878/3878 [00:00<00:00, 55101.65it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3878/3878 [00:04<00:00, 928.90it/s] 
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4583/4583 [00:00<00:00, 72578.53it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3581/3581 [00:00<00:00, 580587.65it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3554/3554 [00:00<00:00, 57969.46it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3554/3554 [00:00<00:00, 5075.46it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4424/4424 [00:00<00:00, 224684.88it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3520/3520 [00:00<00:00, 985972.36it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3512/3512 [00:00<00:00, 56913.23it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3512/3512 [00:01<00:00, 2860.79it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4334/4334 [00:00<00:00, 287401.00it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3454/3454 [00:00<00:00, 1035016.50it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3448/3448 [00:00<00:00, 58432.87it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4321/4321 [00:00<00:00, 1488957.24it/s]
INFO:cityseer.tools.graphs:Snapping gapped endings.
100%|██████████| 3448/3448 [00:00<00:00, 17414.59it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4481/4481 [00:00<00:00, 1837211.75it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3448/3448 [00:00<00:00, 15792.22it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5177/5177 [00:00<00:00, 418500.76it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 3841/3841 [00:00<00:00, 678643.65it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3284/3284 [00:00<00:00, 32642.90it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 3750/3750 [00:00<00:00, 1502975.63it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 2415/2415 [00:00<00:00, 11691.81it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 3784/3784 [00:00<00:00, 147317.46it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 2415/2415 [00:00<00:00, 57181.17it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 2415/2415 [00:06<00:00, 362.26it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2993/2993 [00:00<00:00, 44035.96it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 2838/2838 [00:00<00:00, 31884.74it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 1882/1882 [00:00<00:00, 13374.45it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2844/2844 [00:00<00:00, 370453.43it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 1882/1882 [00:00<00:00, 57295.66it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 1882/1882 [00:03<00:00, 492.58it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2466/2466 [00:00<00:00, 61899.10it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 2399/2399 [00:00<00:00, 1718554.28it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 1560/1560 [00:00<00:00, 11690.48it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2421/2421 [00:00<00:00, 335450.10it/s]
WARNING:cityseer.tools.graphs:Be cautious with large buffer distances when using crawl!
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 1560/1560 [00:00<00:00, 52985.40it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 1560/1560 [00:03<00:00, 486.45it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 1976/1976 [00:00<00:00, 43839.96it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1158/1158 [00:00<00:00, 136505.55it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 50.
100%|██████████| 1846/1846 [00:00<00:00, 73277.17it/s]
INFO:cityseer.tools.graphs:Ironing edges.
100%|██████████| 1818/1818 [00:00<00:00, 22250.24it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 1.
100%|██████████| 1803/1803 [00:00<00:00, 308477.67it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 1102/1102 [00:00<00:00, 729271.54it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1097/1097 [00:00<00:00, 306886.65it/s]
INFO:cityseer.tools.plot:Preparing graph nodes
INFO:cityseer.tools.plot:Preparing graph edges
MultiGraph with 1076 nodes and 1778 edges
100%|██████████| 1778/1778 [00:00<00:00, 89553.43it/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:Merging node 12450391665 into 25544116 due to identical x, y coords.
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%|██████████| 16721/16721 [00:00<00:00, 41785.16it/s]
INFO:cityseer.tools.io:Converting networkX graph to CRS code 32630.
INFO:cityseer.tools.io:Processing node x, y coordinates.
100%|██████████| 15582/15582 [00:00<00:00, 1165337.89it/s]
INFO:cityseer.tools.io:Processing edge geom coordinates, if present.
100%|██████████| 16721/16721 [00:00<00:00, 17050.36it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 15582/15582 [00:00<00:00, 23632.83it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 8611/8611 [00:00<00:00, 1371658.95it/s]
100%|██████████| 8611/8611 [00:00<00:00, 10914.57it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 7472/7472 [00:00<00:00, 61267.10it/s]
100%|██████████| 5224/5224 [00:00<00:00, 304518.84it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 6457/6457 [00:00<00:00, 897310.35it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4729/4729 [00:00<00:00, 1257440.32it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3753/3753 [00:00<00:00, 299975.66it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4729/4729 [00:00<00:00, 173337.73it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4700/4700 [00:00<00:00, 1644002.07it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3753/3753 [00:00<00:00, 34201.83it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4748/4748 [00:00<00:00, 293141.32it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4740/4740 [00:00<00:00, 1563832.37it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3753/3753 [00:00<00:00, 143692.47it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4741/4741 [00:00<00:00, 46165.73it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4741/4741 [00:00<00:00, 1085377.18it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3753/3753 [00:00<00:00, 89775.94it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4742/4742 [00:00<00:00, 493962.24it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3753/3753 [00:00<00:00, 59320.93it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3753/3753 [00:00<00:00, 302343.71it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4742/4742 [00:00<00:00, 436094.32it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3753/3753 [00:00<00:00, 588061.23it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3715/3715 [00:00<00:00, 55094.94it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3715/3715 [00:04<00:00, 875.38it/s] 
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4326/4326 [00:00<00:00, 71453.56it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3418/3418 [00:00<00:00, 533914.23it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3391/3391 [00:00<00:00, 54557.99it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3391/3391 [00:00<00:00, 4624.76it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4167/4167 [00:00<00:00, 223728.43it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3357/3357 [00:00<00:00, 941635.69it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3349/3349 [00:00<00:00, 54150.62it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3349/3349 [00:01<00:00, 2923.54it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4077/4077 [00:00<00:00, 259881.12it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3291/3291 [00:00<00:00, 981544.08it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3285/3285 [00:00<00:00, 54005.61it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4064/4064 [00:00<00:00, 1474154.76it/s]
INFO:cityseer.tools.graphs:Snapping gapped endings.
100%|██████████| 3285/3285 [00:00<00:00, 16668.71it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4225/4225 [00:00<00:00, 1216929.98it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3285/3285 [00:00<00:00, 14650.91it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4886/4886 [00:00<00:00, 418967.36it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 3658/3658 [00:00<00:00, 745771.84it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3092/3092 [00:00<00:00, 32972.53it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 3464/3464 [00:00<00:00, 1414985.30it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 2237/2237 [00:00<00:00, 11441.75it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 3496/3496 [00:00<00:00, 137708.01it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 2237/2237 [00:00<00:00, 55918.05it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 2237/2237 [00:06<00:00, 357.55it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2721/2721 [00:00<00:00, 39963.10it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 2567/2567 [00:00<00:00, 1487946.15it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 1718/1718 [00:00<00:00, 12582.95it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2572/2572 [00:00<00:00, 358814.23it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 1718/1718 [00:00<00:00, 53992.72it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 1718/1718 [00:03<00:00, 506.75it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2210/2210 [00:00<00:00, 61529.04it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1411/1411 [00:00<00:00, 112538.28it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 50.
100%|██████████| 2057/2057 [00:00<00:00, 125340.43it/s]
INFO:cityseer.tools.graphs:Ironing edges.
100%|██████████| 2042/2042 [00:00<00:00, 22462.32it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 1.
100%|██████████| 2033/2033 [00:00<00:00, 382720.83it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 1319/1319 [00:00<00:00, 643064.86it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1306/1306 [00:00<00:00, 182027.75it/s]
INFO:cityseer.tools.plot:Preparing graph nodes
INFO:cityseer.tools.plot:Preparing graph edges
MultiGraph with 1276 nodes and 1990 edges
100%|██████████| 1990/1990 [00:00<00:00, 72579.70it/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:Merging node 12450391665 into 25544116 due to identical x, y coords.
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%|██████████| 16721/16721 [00:00<00:00, 52433.82it/s]
INFO:cityseer.tools.io:Converting networkX graph to CRS code 32630.
INFO:cityseer.tools.io:Processing node x, y coordinates.
100%|██████████| 15582/15582 [00:00<00:00, 1059506.28it/s]
INFO:cityseer.tools.io:Processing edge geom coordinates, if present.
100%|██████████| 16721/16721 [00:00<00:00, 17653.83it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 15582/15582 [00:00<00:00, 23599.05it/s]
INFO:cityseer.tools.plot:Preparing graph nodes
INFO:cityseer.tools.plot:Preparing graph edges
MultiGraph with 7472 nodes and 8611 edges
100%|██████████| 8611/8611 [00:00<00:00, 27621.77it/s]

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

from cityseer import config

# It is recommended to override validation during cleaning
# This spares unnecessary repetition of validation checks
config.SKIP_VALIDATION = True

# deduplicate by hierarchy
G = graphs.nx_deduplicate_edges(G_raw, dissolve_distance=20, max_ang_diff=20)
# remove disconnected components
G = graphs.nx_remove_dangling_nodes(G, despine=0, remove_disconnected=100)
# clean by highway types - leave motorways alone
# split only for a given type at a time
for dist, tags, max_angle in (
    (28, ["trunk"], 45),
    (24, ["primary"], 45),
    (20, ["secondary"], 45),
    (16, ["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,
    )
# consolidate
for dist, tags, max_angle in (
    (28, ["trunk"], 95),
    (24, ["trunk", "primary"], 95),
    (20, ["trunk", "primary", "secondary"], 95),
    (16, ["trunk", "primary", "secondary", "tertiary"], 95),
):
    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,
    )
    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,
)
# 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,
)
# 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 (5, 10):
    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,
    )
    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,
    )
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.util:Creating edges STR tree.
100%|██████████| 8611/8611 [00:00<00:00, 38266.71it/s]
100%|██████████| 8611/8611 [00:01<00:00, 8508.57it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 7472/7472 [00:00<00:00, 39386.01it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 6457/6457 [00:00<00:00, 1331823.01it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 5020/5020 [00:00<00:00, 1260727.27it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3940/3940 [00:00<00:00, 274219.40it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5020/5020 [00:00<00:00, 160240.23it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4987/4987 [00:00<00:00, 670287.57it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3940/3940 [00:00<00:00, 14755.90it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5035/5035 [00:00<00:00, 274581.28it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 5027/5027 [00:00<00:00, 1270013.63it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3940/3940 [00:00<00:00, 135687.84it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5028/5028 [00:00<00:00, 380591.59it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 5028/5028 [00:00<00:00, 1287560.93it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3940/3940 [00:00<00:00, 90137.60it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5029/5029 [00:00<00:00, 429385.94it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3940/3940 [00:00<00:00, 59391.90it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3940/3940 [00:00<00:00, 266056.35it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5029/5029 [00:00<00:00, 384602.78it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3940/3940 [00:00<00:00, 473851.12it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3895/3895 [00:00<00:00, 48015.84it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3895/3895 [00:04<00:00, 850.98it/s] 
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4606/4606 [00:00<00:00, 75415.51it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3598/3598 [00:00<00:00, 567249.50it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3571/3571 [00:00<00:00, 60083.52it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3571/3571 [00:00<00:00, 5132.07it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4447/4447 [00:00<00:00, 233793.81it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3537/3537 [00:00<00:00, 945703.66it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3529/3529 [00:00<00:00, 57151.62it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 3529/3529 [00:01<00:00, 2769.40it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 4357/4357 [00:00<00:00, 276422.72it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3471/3471 [00:00<00:00, 732131.21it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 3465/3465 [00:00<00:00, 57530.37it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4344/4344 [00:00<00:00, 1353242.47it/s]
INFO:cityseer.tools.graphs:Snapping gapped endings.
100%|██████████| 3465/3465 [00:00<00:00, 15664.98it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 4504/4504 [00:00<00:00, 1295067.20it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 3465/3465 [00:00<00:00, 14907.21it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 5199/5199 [00:00<00:00, 402068.53it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 3858/3858 [00:00<00:00, 799092.58it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 3296/3296 [00:00<00:00, 33692.06it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 3765/3765 [00:00<00:00, 1319812.33it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 2425/2425 [00:00<00:00, 11565.25it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 3799/3799 [00:00<00:00, 38760.19it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 2425/2425 [00:00<00:00, 57226.05it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 2425/2425 [00:06<00:00, 357.15it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 3001/3001 [00:00<00:00, 46156.32it/s]
INFO:cityseer.tools.util:Creating edges STR tree.
100%|██████████| 2847/2847 [00:00<00:00, 1607590.67it/s]
INFO:cityseer.tools.graphs:Splitting opposing edges.
100%|██████████| 1885/1885 [00:00<00:00, 12694.73it/s]
INFO:cityseer.tools.graphs:Squashing opposing nodes
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2855/2855 [00:00<00:00, 353028.83it/s]
INFO:cityseer.tools.util:Creating nodes STR tree
100%|██████████| 1885/1885 [00:00<00:00, 58585.74it/s]
INFO:cityseer.tools.graphs:Consolidating nodes.
100%|██████████| 1885/1885 [00:03<00:00, 477.44it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 25.
100%|██████████| 2444/2444 [00:00<00:00, 64255.14it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1540/1540 [00:00<00:00, 125849.55it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 50.
100%|██████████| 2289/2289 [00:00<00:00, 130276.98it/s]
INFO:cityseer.tools.graphs:Ironing edges.
100%|██████████| 2273/2273 [00:00<00:00, 23793.33it/s]
INFO:cityseer.tools.graphs:Merging parallel edges within buffer of 1.
100%|██████████| 2265/2265 [00:00<00:00, 361646.75it/s]
INFO:cityseer.tools.graphs:Removing dangling nodes.
100%|██████████| 1450/1450 [00:00<00:00, 965969.00it/s]
INFO:cityseer.tools.graphs:Removing filler nodes.
100%|██████████| 1437/1437 [00:00<00:00, 299251.02it/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%|██████████| 2223/2223 [00:00<00:00, 75885.81it/s]