Tuesday, September 23, 2014

The Streetcars of San Francisco


I've always been a big fan of Vasile Coțovanu real-time transit maps. Using Vasile's Transit Map library it is possible to create a simulated real-time map for any transit system in the world.

A good example of the library in action is the Transit Map of San Francisco MTA.This Google Map shows the real-time position of San Francisco Municipal Transportation Agency buses and trams based on the published MTA timetable. The vehicles, moving in real-time on the map, are represented by markers displaying the route number.

The map works by plugging the city's GTFS dataset into Vasile's Transit Map library. Vasile has released the code for the GTFS plug-in as well. The code converts a set of GTFS files into a SQLite database and the GeoJSON's needed by the Transit Map library.

If you want to create your own simulated animated map of a city's transit network all you need to do is to grab the city's GTFS dataset, use GTFS-viz to create the database and GeoJSON's and then plug the data into the Transit Map library.

You will then have your very own animated simulated transit map.

No comments: