An Open Source Rail Dataset For Africa
# An Open Source Routable Rail Dataset For Africa
The aim of this project was to extend previous work to create a routable rail network for East Africa (Kenya, Uganda, Tanzania, and Zambia) to the rest of the African continent. The network is created within a PostgreSQL spatial database and is suitable for routing using the pgRouting extension (or similar tool).
Due to the extensive nature of the existing networks in some countries (including light rail, subway and tram), and a large number of construction schemes and scheme proposals, the decision was made to primarily concentrate on creating an accurate routable network of the existing heavy rail lines currently in use in each country.
The countries processed have been thoroughly researched based on information available via web-based sources. A document summarising findings and with links to key sources has been created for each country or group of countries and key documents and maps have been downloaded.
The rail network created identifies the track gauge (including dual gauge where applicable) and whether lines are used for passenger and/or freight services. In general it has been assumed that lines are used for both freight and passenger services (mixed) unless information indicates that they are freight or (rarely) passenger only. Where branch lines or spurs are clearly only servicing industrial locations (such as ports, mines, chemical plants etc.) they have been recorded as freight only.
As with the previous work in East Africa, a single line is used to represent the network irrespective of the number of physical tracks (unless alternate gauges exist) and where possible an existing line mapped in OpenStreetMap has been used. It has sometimes been necessary to insert fictitious edges to simplify the network (for example when routing in/out of stations on alternative branches).
In total the created network is 82,301 km in length with 5327 stations/stops.
Here is an example routing query (showing nam …