Reduce those dimensions
Locations of our geospatial data exist somewhere on our three-dimensional planet, but we have to make two-dimensional maps for our flat electronic screens (or pieces of paper!). Deciding which map projection to use is an exercise in telling your data how it needs to bend, twist, rip, and transform from a three-dimensional reality to a two-dimensional medium.
Different map projections exist for different reasons and any choice made is a trade-off for which property you’d like to preserve from your original data, including area, shape, angle, or distance. For example, if you need to maintain the correct areas of countries, then you may have to give up caring about their shapes becoming distorted. (This would be called an equal-area projection, by the way.) There is no perfect map projection to fit all situations.
Center or rotate a web map?
Most of the web maps we interact with use some variation of the Mercator projection. It is known as a conformal projection and nearly always is rotated in a way that is visually very familiar and comfortable to us: north is up, south is down, and land masses closer to the poles are distorted in area and appear much bigger than they actually are.
Moving around on this kind of web map changes the center location, which is similar to shifting a paper map around on a table. When you navigate up to view Greenland in a web map, it would be like moving a paper map down, right? Greenland’s area is still distorted and bloated.
But when you interact with a globe in real life you rotate it. The same is actually possible for all map projections, and in D3 we can rotate along 3 different axes. If the world’s landmasses look unfamiliar when rotating a map’s projection it doesn’t mean we are doing something wrong. Perhaps unconventional, but not necessarily wrong. Our three-dimensional data is simply being instructed how to reshape itself onto a two-dimensional map. If we were to rotate the same example web map to Greenland its area would be much more accurate, but at the cost of other landmass areas becoming distorted.
Here’s a demo showing the differences between centering and rotating. The top row uses the Mercator projection while the bottom uses the Orthographic projection which resembles a globe (but a flat globe in 2-D).
Circles, circles everywhere
What if we were gods and could sculpt perfectly circular islands of the same size and then place them evenly around the planet? I suppose even on our best days we don’t have this power–sorry–but we can at least draw them on a map. These regularly spaced circles, called Tissot’s indicatrices, show the unique distortions of each projection by stretching, warping, and also moving the circles around.
The regions in the next demo that contain evenly distributed, small circles exhibit very little or no distortion. But as the circles grow, morph into other shapes, or move away or closer together, we are given visual cues about how the distortions of a projection affect the sizes, angles, and distances between geographical features throughout the map.
Which one is your favorite? Are any of these cool enough to be a tattoo?
Go make some maps
- Projection Wizard by Bojan Savric is highly recommended. Learn more about projections and then go back and use it regularly when setting out on new mapping adventures.
- EPSG 4326 vs EPSG 3857 (projections, datums, coordinate systems, and more!) — Lyzi Diamond
- An ode to d3.js projections — Ian Johnson
- D3 projection demos by Mike Bostock and Jason Davies are here, here, and here.
- Comparing Map Projections — Kai Chang
- Web Mercator Tile Visibility — Jake Low
- And over here are my own D3 web mapping super-fun-time experiments on CodePen.
Have fun distorting the shape of the world!