Determine the speed limit on a specific road - From lat and long

Arun Shiva 1 Reputation point
2023-01-04T11:40:43.263+00:00

We see that google provides an API to get if a speed is permissible(From lat and long, determine the speed limit on a specific road) based on the location (Lat Long)
https://developers.google.com/maps/documentation/roads/speed-limits

We wanted to know if such an API is available in Microsoft.

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
595 questions
Azure FastTrack
Azure FastTrack
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.FastTrack: This tag is no longer in use. Please use 'Azure Startups' instead.
74 questions
{count} votes

1 answer

Sort by: Most helpful
  1. rbrundritt 15,391 Reputation points Microsoft Employee
    2023-01-05T16:29:36.44+00:00

    The Bing Maps Snap to Road API can take in one or more coordinates and retrieve the speed limit for that section of road. The coordinate returned will most likely be different than what you passed in as this API "snaps" it to the road line used in the map while your input is likely a GPS coordinate that could be a meter or two away.

    There is no API that I am aware of that turned the number of turns in a route path. That said, I had a similar need many years ago for a project and I ended up writing some code that analyzed the snapped route line. I don't have the code any longer, but here is what it did:

    1. Step through each coordinate in the route path and calculate the heading (or bearing) between coordinates.
    2. Look through the heading and calculate the angle difference between them. A 90-degree change in heading is likely to be too strict for this analysis and depending on your scenario (not uncommon for forks in a road to be much less than 90-degrees), so you need to decide what angle change you want to use to consider a change in a direction a turn.
    1 person found this answer helpful.
    0 comments No comments