Could someone please explain why there is such a significant difference between the results of this query:
SELECT
ST_Distance(ST_Transform(previous_geom,3857), ST_Transform(current_geom,3857)) AS distance_transform_exp,
ST_Distance(previous_geom::geography, current_geom::geography) AS distance_geometry_exp
FROM
(
SELECT
ST_SetSRID(ST_MakePoint(-111.9096893, 40.7411742),4326) AS previous_geom,
ST_SetSRID(ST_MakePoint(-111.9092079, 40.74135181),4326) AS current_geom
) points_table
Results:
distance_transform_exp | distance_geometry_exp
+-----------------------+-----------------------
59.6050787601899 | 45.19182216
(1 row)
I understand there would be a difference between geometric (Cartesian) calculation results and geodetic (spheroid) alas for the example points which are relatively close, the discrepancy would be expected to be negligible.