Leaf: Transport Infrastructure Networks Dataset: OpenStreetMap — highway=*, railway=*, aeroway=*

OSM is the primary global open source for road and transport network geometry. It is the standard input for routing and network analysis via osmnx.

osmnx builds a routable NetworkX graph from OSM transport data, handling topology, directionality, and simplification automatically.

import osmnx as ox
ox.settings.cache_folder = ".cache/"
 
# Drive network
G_drive = ox.graph_from_place("Copenhagen, Denmark", network_type="drive")
 
# Walk network
G_walk = ox.graph_from_place("Copenhagen, Denmark", network_type="walk")
 
# Cycle network
G_bike = ox.graph_from_place("Copenhagen, Denmark", network_type="bike")
 
# Convert graph to GeoDataFrame for inspection
nodes, edges = ox.graph_to_gdfs(G_drive)

network_type values: drive, walk, bike, all, all_private

Geofabrik layers

LayerContent
gis_osm_roads_free_1.shpAll roads + paths, LineString, field fclass for type
gis_osm_railways_free_1.shpRail lines, LineString
gis_osm_transport_free_1.shpPublic transport stop points

Key OSM tags

TagMeaning
highway=motorwayMotorway / freeway
highway=trunkMajor non-motorway road
highway=primaryPrimary road
highway=secondarySecondary road
highway=residentialResidential street
highway=cyclewayDedicated cycle path
highway=footwayFootpath
railway=railMain line railway
railway=subwayUrban metro
oneway=yesDirected edge
maxspeed=*Speed limit (sparse — verify before use)