Salta al contenuto principale


There's been talk on the Fedi about why online maps like OSM and Google use the Mercator projection, and I think it needs a bit of clarification. (Do NOT snitch tag.)

Online maps are _mostly_ used at small scales, of a district or a city. At these scales, the earth is approximately flat, so users expect a map that is _conformal_, one that preserves angles and shapes.

Online maps are continuously zoomable from continents down to your house. They usually aren't rendered on your browser straight from vectors, but are batch-rendered offline into square tile images. If you're on a slowish Internet connection, you can see them loading individually.

As you zoom an online map, tiles get replaced with higher-resolution ones, and as you scroll, tiles get filled in to fill the gaps. You could theoretically scroll and zoom forever, so the map needs to not have a magically special reference latitude or longitude. These constrains mean that the map needs to be _equatorial_, so that no point gets special treatment, and _cylindrical_, so that meridians are vertical and lines of latitude are horizontal.

And which is the map projection that is all of equatorial, cylindrical and conformal? Mercator!

#Maps #Cartography #OpenStreetMap

reshared this

in reply to Deborah Pickett

Mercator's world map of 1569 was useful to navigators at the time because it is conformal (preserving angles) even over long distances. You could draw a line between source and destination, read off the constant bearing, and point your ship in that direction for days or weeks, and you'd arrive at your destination. This line is called a "rhumb line", or (and I love this word) a "loxodrome".

Rhumb lines are absolutely not the shortest route between two points. That would be a great circle route, but computing a great circle requires spherical trigonometry, which is something that navigators were loath to mess with (as your bearing changes over the course of traversing a great circle, so it requires constant attention). Great circles have certainly been used by navigators for a long time, particularly in aviation where carrying your fuel is a factor. Now of course, ubiquitous computing and GPS makes great circles easy, and rhumb lines are just a historical curiosity.

But because of the properties of Mercator being coincidentally convenient for online maps, we find ourselves back in the 16th Century with a default projection that is frankly bad at large scales.

#Maps #Cartography

in reply to Deborah Pickett

One fun fact about Mercator is that it's often misrepresented as the map projection you'd get if you wrapped a cylinder of paper around the equator and shone a light out from the centre of the earth. But that gives you a different projection, the central cylindrical projection, which is not conformal and has ridiculous amounts of distortion away from the equator (y = tan θ).

Mercator doesn't correspond to any physical projection; it's computed mathematically so that the projected y coordinate ensures that every point from there back to the equator is conformal. This requires calculus, where y is the definite integral of the stretch factor 1/cos(θ), giving y = ln (tan [θ/2 + π/4]).

en.wikipedia.org/wiki/Mercator…

#Maps #Cartography

Questa voce è stata modificata (5 mesi fa)
in reply to Deborah Pickett

Sensitive content

Questa voce è stata modificata (5 mesi fa)
in reply to Javier Jimenez Shaw

@jjimenezshaw Very neat. That nicely captures the integration of the scale factor over latitude, while maintaining conformity. Exactly Mercator’s properties.
in reply to Deborah Pickett

The Mercator projection is also easy on our brains, which is a big reason why it's used so much. Accuracy is not a huge factor.
in reply to Bruce Heerssen :guillotine:

@bruce It depends on what axis of accuracy you measure. Mercator is super accurate about directions and angles, more so than other darlings like Lambert equal-area or equirectangular or Mollweide. All projections have to compromise on something.
in reply to Deborah Pickett

Yes, of course, but I meant that accuracy is not super important for most human purposes when looking at a map. Close enough is good enough.
in reply to Deborah Pickett

Interestingly, I see that Apple Maps (on iOS and macOS) wraps its tiles onto a sphere, and plots place names and other text live and undistorted onto the viewport. Google and OSM web are the old guard, steadfast in using Mercator.

Edit: And Google Maps has a checkbox to enable sphere projection too, TIL.

Questa voce è stata modificata (5 mesi fa)
in reply to Deborah Pickett

@Deborah Pickett I think that marble ( marble.kde.org/ ) wraps pre-rendered tiles from various sources onto a sphere without rendering the names separately and at times the effects are interesting, but then that's what you get when you use tiles that were supposed to be used for small scales

(it also offers vector maps rendered on the fly, and stuff like historical maps)

in reply to Deborah Pickett

The globe projection requires vector map tiles to work well - openstreetmap.org still uses old-school raster tiles, but the vector @maplibre library recently added globe support, so vector OSM maps (such as my openinframap.org) can now show a globe.
Questa voce è stata modificata (5 mesi fa)

Deborah Pickett reshared this.

in reply to Deborah Pickett

People involved in #Openstreetmap and #FOSSGIS do think about other Projections. E.g. @implgeo Video unfortunately only available in German:
media.ccc.de/v/fossgis2025-580…
in reply to Deborah Pickett

google maps also does the sphere thing. But it seems it does not on mobile.
in reply to Deborah Pickett

OSM's demo site does not, but the data allows anybody to do it. One of many examples:

osmapp.org/#2.22/-5.9900/-157.…

in reply to Deborah Pickett

Aren't there more modern maps with the same features, but less distortion?
in reply to Canageek

@Canageek All map projections distort _something_. You just have to choose what's important. For online maps, preserving shapes wasn't as important as preserving angles.
in reply to sabik

@sabik Pretty sure that Google Earth, as a native application, was able to use the GPU to texture-map tiles onto a sphere (maybe even a geoid) with altitude data. I don't think it's a projection in the cartography sense at all, but a projection in the perspective sense.
in reply to Deborah Pickett

I think this logic has to be backwards. We don't use Mercator because the tiles are square. The tiles are square because we are using Mercator.

Streetview has to do spherical manipulations in the browser in realtime, so why couldn't Maps do the same?

in reply to dr 🛠️🛰️📡🎧:blobfoxcomputer:

@davidr Remember that Google Maps dates from 2004, which was long before browsers had the ability to do those kinds of transforms. Almost all the work was done ahead of time, server-side. At the time, Mercator was the only projection that ticked all the boxes. The text on maps like road names was also baked into the tiles, so stretching them client-side would make for some unpleasant distortions.

But I agree,: if you invented a mapping application now, you might make different compromises, and you might come up with something closer to Google Earth where we don't pretend the world is an infinite plane for the sake of simpler programming.

in reply to Deborah Pickett

KDE Marble has a neat feature where as you zoom out you can see the globe start to curve, and if you go out far enough you can see the globe, but when zoomed into human moving around a city scale it certainly looks like squares.

marble.kde.org/index.php

I haven't seen many other map programs do that and some times it's a useful feature.

in reply to Diane

@alienghic That's _nice_, I approve of their attention to detail. I notice that the baked-in text curves too (of course it does), but it doesn't look terrible at this subcontinental scale.
in reply to Deborah Pickett

I think osmapp.org does something similar, if I've understood correctly, but without curving text.

osmapp.org/ @alienghic

Questa voce è stata modificata (5 mesi fa)
Unknown parent

Deborah Pickett
@Stoori Oh wow, how long has that been there?
Unknown parent

Deborah Pickett
@Stoori 2018 apparently. showmetech.com.br/en/google-ma…
in reply to Deborah Pickett

nah, it is just a conspiracy by Big Greenland to make Greenland look Big.
in reply to Deborah Pickett

Have a look at cartographerstale.com/p/cartog… for a great intro to cartographic projections and the compromises required
in reply to Deborah Pickett

Yep - people talk about Mercator like it's the wrong projection. It's not only the right projection, but given the constraints, it's the only projection when you add north-up to what you listed.

We're starting to see globes at low zooms, but that technology didn't exist at the start of online maps. It still doesn't change high zooms, and all conformal maps look the same up close.

in reply to Deborah Pickett

I will talk about the Mercator projection in FOSS4G Europe in one week!

I have the impression you are not coming. It's far away from your place. But you can watch the video later.

in reply to Deborah Pickett

My beef with OSM is not the projection but that the tile render times can render OSM unusable, whether the maps are stored locally or served. My contention is that the performance hit from so much detail on a tile varies from 'absolutely necessary, the detail is critical!' , to 'I just need the route I should follow and some stubbed turnings, so it works at light speed with NO lags'. Where a user is happy on that continuum depends on what they are doing. A simplified map that prioritizes rendering the essential over task superfluous detail (rendered on a best-can-do basis if useful or just left out if it's distracting clutter - I probably don't need to render footpaths, buildings or business names when I'm following navigation down a motorway (freeway) on a long journey where navigation clarity & responsiveness are much more important than superfluous detail.

I love the premise of OSM but the user experience needs a close look & significant refinement for each task type and persona.

Questo sito utilizza cookie per riconosce gli utenti loggati e quelli che tornano a visitare. Proseguendo la navigazione su questo sito, accetti l'utilizzo di questi cookie.