PAGE CONTENTS
Travel Time Bands
API Name: travel-time-bands
Introduction
Travel Time Bands enables the user to calculate the distance, in kilometres, to specified landmarks and see the estimated travel time to get there. More importantly, the travel time calculated considers the actual road infrastructure.
Overview
Data
Input for the data endpoint of this API is a set of coordinates (latitude and longitude) or seoid obtained from AfriGIS Autocomplete API or Geocode API. This indicates the location from which to identify the travel distance or time.
Users should indicate if travel time (in minutes) or distance (in kilometres) is to be provided.
The size of each band, in either minutes or kilometres, depending on the mode selected, must be specified.
Users can specify the number of bands to generate. The default setting for number of bands generates 5 bands.
The travel time or distance calculated considers the actual road infrastructure. Other straight-line measurements do not consider mountains, rivers, landmarks etc. It only measures the straight line from one point to another. The closest distance, when using travel time bands, will therefore not take a hospital (or other specified landmark) into account that lies on the other side of a mountain or river.
Landmarks
A list of landmarks that can be specified when using the data endpoints, can be obtained by using the landmarkmenuitems endpoint in the API. The current landmarks available to specify are:
- Fire stations
- Hospitals
- Police
- Schools
Examples
The examples below specify 3 bands with a width of 2 kilometres each. The landmarks included are fire stations, hospitals and police stations.
Travel distance
Note how the bands exclude the restricted area of the air force base (shown below):
Travel time
Note how the bands exclude the areas on the other side of the mountain (shown below):
Report
The reports endpoint enables a location input using a set of coordinates (latitude and longitude) or seoid from AfriGIS Autcomplete or Geocode APIs.
An indication should made if the calculation is based on travel time (in minutes) or distance (in kilometres).
Bandsizes must be specified in minutes for travel time or kilometres for travel distance.
Users can set the number of bands to generate if the default of 5 is not required.
Landmarks to return in the response can be specified. The options for landmarks are retrieved using the landmarksmenuitems endpoint.
Authentication
This API makes use of OAuth2 authentication. To integrate, sign up for a free trial account by contacting [email protected]
For detailed integration instructions using OAuth2, please click on the following link: https://developers.afrigis.co.za/oauth2-authentication/
To view technical documentation describing the details of Travel Time Bands, click on the button below.