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?

  • (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
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.