How to get the marked speed limit of a road, out of longitude and latitude

Ateik picture Ateik · Dec 12, 2011 · Viewed 43.9k times · Source

I know that is not a technical question, but I don't know where else to ask.

Is there a way to get the marked speed limit of a road from google or bing maps? or any other web service?

Answer

Alastair Aitchison picture Alastair Aitchison · Dec 12, 2011

You cannot obtain this information from Bing Maps or Google Maps. Nor am I aware of any other webservices that provide this information (certainly not any free ones).

Open Street Map (http://osm.org) has the ability for ways to be recorded with the maxspeed tag. You could download the OSM planet dataset and host it in a spatial database such as SQL Server 2012, then create your own web service to query the database and return the maxspeed of the closest way, but this value is not always reliably filled in. However, even when the maxspeed tag is missing, you can derive an approximate max speed limit by looking at the national speed limit for the type of road in the country of interest, as documented at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Maxspeed

OSM data varies in quality quite a lot by country. Here in the UK it's really very good - more up-to-date, accurate, and complete than Google Maps or Bing Maps in many respects. However, in other countries it's not so reliable. Alternatively, there are providers that will sell you commercial datasets of road networks containing this information, but they tend to be at the national level and can be very expensive. (What country(s) are you interested in? You don't mention..)

Finally, be aware that this information is fairly dynamic and time-dependent - if you do download a dataset of max road speed information (either from OSM or a commercial source) expect to have to update it frequently to keep up-to-date with highway changes.