[Qgis-user] Unexpected comparison Web-Mercator vs Mercator
Javier Jimenez Shaw
j1 at jimenezshaw.com
Tue Jul 22 07:50:36 PDT 2025
Hi
I am trying to compare web-mercator (EPSG:3857) with Mercator (EPSG:3395)
projections.
For that purpose I think that a straight line in EPSG:3395 (loxodromic)
shouldn't be exactly straight in EPSG:3857.
To show that, I created two linestrings in EPSG:3395, one with one segment,
and the second with two segments co-linear (just adding a point in the
middle). If I then select EPSG:3857 in QGIS, there should be a small
difference... but I do not see it!
Only if I use the "Identify features", click in the area (at the proper
zoom level), and hover over "identify all" or "2p". Then a second line
appears! But it disappears when I select anything. (see attached screenshot)
The attached gpkg files are just the geometries as one segment (2p.gpkg)
and 2 segments (3p.gpkg), both defined in EPSG:3395
The coordinates of the line are (0,0) and (8e6, 10e6) Yes, a long line to
make it more visible.
the midpoint in EPSG:3395 is (4e6, 5e6). That is easy.
Reprojecting the two points into EPSG:3857 we have (0,0) and
echo 8e6 10e6 | cs2cs EPSG:3395 EPSG:3857
8000000.00 10039255.88 0.00
The midpoint is
echo "scale=2; 8000000.00 / 2; 10039255.88 / 2" | bc
4000000.00
5019627.94
The midpoint in EPSG:3395 and then projected to EPSG:3857 is this:
echo 4e6 5e6 | cs2cs EPSG:3395 EPSG:3857
4000000.00 5028099.31 0.00
The difference is about 8 km. But I cannot see it in QGIS.
Jakub suggested that it could be the simplification. I disabled it in the
settings. No difference.
Is QGIS doing something strange? Can I disable it?
If I select EPSG:4326 instead of EPSG:3857, then you can see clearly the
two linestrings.
Thanks,
Javier.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20250722/0d3da5cd/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2025-07-22 16-27-19.png
Type: image/png
Size: 364284 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20250722/0d3da5cd/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2p.gpkg
Type: application/geopackage+sqlite3
Size: 98304 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20250722/0d3da5cd/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3p.gpkg
Type: application/geopackage+sqlite3
Size: 118784 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20250722/0d3da5cd/attachment-0003.bin>
More information about the QGIS-User
mailing list