An open source spatial database schema and interface for the storage, representation and analysis of interdependent infrastructure networks Mr David Alderson Dr Stuart Barr, Mr Tomas Holderness, Mr Craig Robson, Mr Alistair Ford ITRC Early Career Researcher Conference Clare College, Cambridge University 27 th November 2012
Overview Background Technology Schema Interface Applications Future steps… Summary Contacts and Links National Grid Gas National Grid Electricity
Background Store, model, represent and analyse various regional and national-scale spatial networks Robust storage solution for multi-scale data and networks Creation of attributed networks Represent dependencies Access to graph-theory based analyses and tools Combination of stable open source packages to provide solution for multiple network modelling tasks UK infrastructure networks Failure Link to other Newcastle
Technology Database PostgreSQL + spatial extension PostGIS pgAdmin – admin + backup PostgreSQL Procedural Language functions (PL/pgSQL) Python-compatible drivers SQL or.bat installers Python Wrapper Python (2.6.5+) GDAL + OGR NetworkX Python wrapper Spatial database Spatial database nx_pg nx_pgnet NetworkX
Database schema - introduction Tables Graphs Nodes Edges / Edge_Geometry Global Interdependency Interdependency / Interdependency_Edges
Database schema – functions Administrative functions: Create network tables Export to Gephi-compatible format, YAML, GraphML, GML, CSV Pre-processing functions: Connect a node to the nearest point on an edge based on an attribute matching Link node A and node B by an attribute Find the nearest point on each line segment to every node Connect edge end points to node Connect closest point along line segment Find junctions
Database schema – an example National Grid Electricity National Grid Gas Dependent / Interdependent links Initial interdependencies to consider 1 : Physical Geographic 1) Rinaldi, S.M., et al (2001) - Identifying, Understand and Analyzing Critical Infrastructure Interdependencies
The database – an example
The Python interface- overview Link PostGIS and NetworkX Modules provide read/write functions Single + Bulk feature upload Database connections db_conn = ogr.Open("PG: host=’localhost’ dbname=’a_spatial_database’ user=’postgres’ password=’password’") Build and store the topological network network = nx_pg.read_pg(lines, points) nx_pgnet.write(db_conn).pg_net(network)
Example – build a rail network Define input data in PostGIS OS Meridian 2 Rail Line, Stations Find junctions Link with stations Build network Data: Nodes: 7995 Stations: 2526 Junctions: 1416 Edges: 8484 Read->Build->Store~ 40s
TFL tube stations Substations Application – Modelling failure Understanding dependencies between transport (rail) and power supply Tube network: 466 edges, 437 nodes Power network: 119 edges, 99 nodes Compares two methods of simulating a targeted attack on substations Betweenness and degree recalculated on each iteration
Application – Modelling failure Degree: attacks on substations based upon degree: greater impact on tube network alone Betweenness: attacks on substations based upon betweenness: targetted attack using betweenness is more “effective” than using degree
Future steps… Continue UK infrastructure network construction Integration with other network modelling RESNET (Richard Dawson, Gaihua Newcastle) Distinction between schema and Python Extend to other databases Spatialite, MySQL, MS SQL Server Requires distinct Python drivers Future code release – GitHub Potential to look at “NO-SQL” OpenFlights UK Air
Summary Multiple spatial network modelling challenges Creation of a network data schema using open source tools Tools form part of a wider, open-source modelling framework Open source generalised transport cost model Regional and national-scale infrastructure network creation Representing infrastructure interdependencies Begin to investigate failure propagation Ordnance Survey Meridian 2 Road Network: A Roads ( edges) B Roads (81712 edges) Motorways (3837 edges) Roundabouts+ ( nodes)
More information… School of Civil Engineering and Geosciences, Newcastle University ( Centre for Earth Systems Newcastle ( Geospatial Engineering Newcastle ( New site: Geospatial Newcastle Blog ( blogs.ncl.ac.uk/geospatialengineering )
Thank you.