Spherical Mercator Distortion

Muhammad Abdul Moeed 61 Reputation points

Currently, I am displaying GPS coordinates on Azure Maps for a moving vehicle. These coordinates are to a significant degree away from road . I am trying to understand the various sources for this noise/error/inaccuracy. One source of noise can ofcourse be the GPS receiver itself, providing not very accurate coordinates. Could "Spherical Mercator projection coordinate system (EPSG: 3857)" which is being used in Azure Maps also be a source for this deviation, which is causing the coordinates to be mapped not on road(i.e. away from road)?

Furthermore, I observe a strange behaviour. A fixed GPS coordinate is mapped differently on Azure Map than on OpenStreetMaps, even though both are using same coordinate system.

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
587 questions
0 comments No comments
{count} votes

Accepted answer
  1. rbrundritt 15,211 Reputation points Microsoft Employee

    The spherical distortion of the map is unlikely the cause, the conversion from WGS 84 GPS coordinates to Spherical Mercator has a small amount of error. Here are the most likely causes of error:

    • GPS accuracy, this is usually the main cause as GPS devices typically have an error of +/- 15 to 30 meters.
    • Position of the roads in the maps. Maps show roads as a line, but in reality, roads have widths. Azure Maps and Open Street Maps can show the same road in two different places and technically both be correct as the lines would be within the width of the roadway.

    Generally, GPS coordinates will rarely show up exactly on a road unless using a specialized high precision GPS device. This is why "Snap to Road" type services exist. Snap to road is the process of calculating the nearest road line to a given coordinate (GPS point). There are a few different ways to do this depending on your needs.

    If you want to keep the snapped information in a database for future use (i.e. as a replacement for the GPS coordinate), then you would likely want to snap the coordinate on the server side using a REST service. The Azure Maps routing service can be used for this. Note that calling this service generates costs. Here are some examples:



    If you only want to snap the GPS coordinate to roads when visualizing the data, and you are using the Azure Maps Web SDK, you can leverage the underlying vector tiles to do this snapping at no additional cost.


    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful