block by robinhouston 4281738

4281738

Full Screen

A central challenge of projecting geography is that the globe is spherical while the display is planar. Projecting the globe onto the screen thus requires cutting the globe at least once. Most commonly, world maps are horizontally cented at the prime meridian and cut the globe along ±180° longitude, which is called the antemeridian.

But what happens to shapes that cross the antemeridian, such as the Eastern tip of Russia? When projecting Russia using a normal cylindrical projection, for example, the Western part of Russia appears on the right edge, while the Eastern part appears on the left edge. A naïve projection of lines that cross the antemeridian would also cross the map, leading to distracting visual artifacts!

To avoid this problem, many freely-available shapefiles are already cut along the antemeridian. This enables geographic software to ignore the topological complexity introduced by the spherical globe. Unfortunately, by relying on pre-cut input, much geographic software (including earlier versions of D3) cannot correctly handle different aspects and rotations of the globe!

D3 3.0 introduces a powerful new geographic projection system that supports antemeridian cutting, clipping, adaptive resampling, and arbitrary three-axis rotation! Use your mouse to rotate the world above and see a new aspect! Also try rotating the Winkel tripel, gnomonic, stereographic and orthographic projections, among many other examples.

Feedback, comments, questions? Discuss on HN.

index.html