2

I was measuring geometry using some PostGIS functions and noticed that I was getting different results from the two methods I used.

sum(st_length(st_transform(geom, 3857))) # Gave 3674

sum(st_length(geom::geography)) # Gave 1671

Why am I seeing different results? I was expecting a slight deviation but this seems to be quite significant.

Is there something wrong with how am I using these queries?

andyp
  • 65
  • 6
  • (Web) Mercator is very bad for distance/area calculations. What is the length when you use the regional UTM zone? It should be similar to 1671. – pLumo Sep 14 '17 at 15:50
  • Indeed, using the UTM zone does give the same result as st_length(geom::geography) – andyp Sep 14 '17 at 17:14

1 Answers1

5

EPSG:3857 is also known as Web Mercator. Usual Mercator projections preserve angles but creates important distortions of size. Web Mercator has slight distortion of angles.

Web Mercator shares some of the same properties of the standard Mercator projection: north is up everywhere, meridians are equally spaced vertical lines, but areas near the poles are greatly exaggerated.

Unlike the ellipsoidal Mercator and spherical Mercator, the Web Mercator is not quite conformal due to its use of ellipsoidal datum geographical coordinates against a spherical projection. Rhumb lines are not straight lines. The benefit is that the spherical form is much simpler to calculate, saving many computing cycles

Source

Tissot's indicatrices show how equal area circles look like when they are projected.

Here is the result for Web Mercator: Web Mercator

Source

thibautg
  • 2,097
  • 10
  • 16
  • 1
    Related: https://gis.stackexchange.com/questions/245151/why-does-reprojection-with-gdalwarp-change-pixel-size/245156#245156 – pLumo Sep 14 '17 at 15:45
  • 1
    EPSG:3857 does not preserve angles. Mercator does, web Mercator doesn't. See http://hydrometronics.com/downloads/Web%20Mercator%20-%20Non-Conformal,%20Non-Mercator%20(notes).pdf – user30184 Sep 14 '17 at 15:48
  • @user30184 yes you are right I will correct the answer – thibautg Sep 14 '17 at 15:49
  • Thanks. My coordinate system knowledge has just got a lot better. – andyp Sep 14 '17 at 17:15