Bulk/Massive Route/Distance Calculation RRS feed

  • Question

  • Hi guys.

    I would like to know if Bing offer a feature for bulk calculation of route/distance from a list of points (as a csv file for example).

    I explain better my need. I have roughly 80.000 couple of locations and I would need to calculate the distance:

    - A1 to B1, A2 to B2, ..., An to Bn

    I know which is possible to use the BING Maps API REST endpoint for the calculation of the distance (route, timing, etc...) between two points. The problem here is that invoking 80.000 time the service is not feasible (especially for the limitation in terms of licensing). 

    As far as I know, BING offers a feature (Multiple Request) for geocoding a big set of data, so I am wondering if there is something similar also for my need.

    Any suggestions?

    Many thanks for your support.


    Wednesday, October 5, 2016 6:55 AM


  • What you are looking for is a distance matrix service. Bing Maps currently does not provide such a service. It is possible to use the routing service to get this data. As an optimization you can combine locations to create a multi-waypoint route to reduce the number of calls you make to the routing service. For example, you can calculate a route from A1 to B2 to A2 to B2... the response will have an array of route legs. The odd index legs will have the data for A1 to B1, A2 to B2... The routing service allows up to 25 waypoints in a single route request. This means you can calculate 12 pairs worth of data in a single request. Thus reducing your 80,000 requests to 6,667.

    That said, the free terms of use allow 125,000 transactions a year, so if this is a one of job, you can keep things simple and just use two waypoints per route request.

    [Blog] [twitter] [LinkedIn]

    Wednesday, October 5, 2016 5:40 PM