Skip to content

Web services

shekhark edited this page Jan 12, 2013 · 1 revision
  • The building of the API, as a web service, (its a data API as of now) Which will be able to serve other websites and mobile apps to use the information we have.
  • Syncing data with the mobile app.
  • Integration with GTFS and linking with libraries supporting GTFS feed especially for routing.
  • Enabling the editing interface via the OSM map overlay.
  • Reworking the SMS infrastructure, using regex matching
APIs and standards for transport routing and mapping on the web which integrate with OpenStreetMap.

To implement point-to-point transport routing, our two main options (not mutually exclusive) are in using OpenStreetMap for base maps, and OpenTripPlanner and the General Transit Feed Spec (GTFS) data format for routing services.

OpenStreetMap's own data schema for public transport was just revamped in March 2011, and there exist numerous routing tools which can query and manipulate native OSM data through its API. The best of the lot is called OpenRouteService, which works quite well in cities where OSM coverage is detailed and near-perfect (not Mumbai!)

Improving the OSM base map for routes, roads, stops, landmarks will take time, we can't rely on the OSM API. The favoured approach in both FOSS and commercial web mapping is to use OSM (or GoogleMaps or Yahoo or Bing) as a background map and overlay routes, stops and other features using GTFS (General Transit Feed Spec). GTFS is the most widely used open standard for transport routing data, and worth a close look. GTFS is used by all the FOSS web routing services (see below) as well as by Google Maps and most other services. Sanjay, Arun and Yuvi and I agreed that GTFS is the way to go with our data, as well as for Chennai, Bangalore and other cities. ChaloBEST can be the BEST's agency for maintaining the Mumbai GTFS feed, which can be used by a whole spectrum of web and mobile apps.

OpenTripPlanner (OTP) is a FOSS stack that runs on Java and Linux and seems like the best candidate for a web-based routing service and RESTful API. It receives data in GTFS and OSM formats and provides point-to-point routing. See the sites below with demos, right click on any two points in the map to see how it works.

We can integrate OTP into our website for routing while using django for making Stops, Routes, Roads, Areas and Landmarks pages where users can contribute data which enriches the search functions. For editing the base map we can send them directly to OSM.

OTP uses GraphBuilder and GraphServer to represent bus and route networks. I think these tools would be fun to explore in a workshop with GN and Amit at HBCSE. These are basically tools for visualising GTFS and OSM data in graphs.

OneBusAway is an allied FOSS project of OpenTripPlanner, uses some of its stack, is based on GTFS data standards, and also has a suite of non-web applications, from voice and SMS to Android, iPhone and Windows phone which come with the package.
  • http://onebusaway.org/
  • http://code.google.com/p/onebusaway/
  • http://developer.onebusaway.org/modules/onebusaway-application-modules/current/
Clone this wiki locally