Routing API
SWAT Routing API provides quality route generation between multiple points. High quality routing is enabled by:
- Manual curation of underlying maps
- Transparent integration with hyper local mapping providers focused on a specific area of service
- Unique time-depended routing enabled by AI predictive model trained and constantly updated by SWAT team
- Compliance with local safety regulations (in certain supported regions)
Routing API reference documentation can be found here
Compatibility
Route generation API is generally backwards compatible with MapBox and OSRM routing APIs although adding new extensions to increase flexibility and quality of the routes produced.
To quickly visualize the routes in the response, we can use polyline/geojson visualization tools like Polyline decoder utility from Google.
Regional support
Routing engine works globally, however ot offer the best experience in regions that are curated by SWAT team and partners. Maintained and curated regions of service include:
- Singapore
- Malaysia
- Thailand
- Vietnam
- Philippines
- Japan
- Urban Australia
Different vehicle profiles are supported for those regions - please reach our support for details. For a example, in order to respect traffic restrictions (known as truck bans) in Bangkok area, special routing profiles were introduced, including:
- van_4w for a 4 wheel truck
- van_6w for a 6 wheel truck
- van_10w for a 10 wheel truck
Avoiding road classes
A routing profile built with exclude classes can avoid one road class per request through the exclude query parameter. For example, one profile can return a normal route, and the same profile with exclude=motorway returns a route without motorways. This replaces the need for a separate "no expressway" profile.
/tdroute/v1/{vehicle_type}/{wkt_waypoints}?start_time=2019-09-09T12:00:05Z&exclude=motorway
The parameter works on /tdroute, /route and /tdtable. Current profiles use the classes motorway, toll and service. Send only one class per request: exclude=motorway,toll is not supported.
Send exclude only with one class that your routing profile supports. The request fails with a 502 error, and the routing service for that profile restarts, when:
- the profile was built without exclude classes
- the profile does not support the class, for example
exclude=ferry - the value combines classes, for example
exclude=motorway,toll
The restart interrupts every request that uses the profile. Ask the SWAT team which profiles and classes are available to you before you use the parameter.
Authentication
Route generator API is using a separate authentication key and support apiKey security policy. Please request API key from our team at [service@swatmobility.com] additional specifying what region you are interested in since API keys are providing access only with in a specific region or a geofence.
Postman collection
Please refer sample Postman collections to explore routing capability further. As a part of collection, we provide a sample visualization tool within Postman.
Support process for routing
SWAT team provides 24x7 support for routing capability and can update underlying GIS data on the customer request to reflect rapidly changing hyper local environment. Examples of such changes may include but not limited to:
-
Inability to make a U turn for a truck
-
Time restricted access to an area (for example, school zone)
-
Long-term reconstruction projects
-
Operationally infeasible roads (trees with large canopies, local regulations etc.)
-
Unsafe to drive conditions