That's an @dwtkns special. Mike Bostock helped with getting a D3 Rotated Transverse Mercator projection exactly aligned with our particular stitched-together crop of Landsat photos — so a lot of the geographic stuff in the graphic (the label placement, the city outlines, and the locator map) are powered by geographic coordinates instead of pixel positions. The "X Miles to Baghdad" works in the same fashion. Makes it way easier to place / resize / redraw things for all of the different widths this has to render at.
Edit:
Because this is a programming site, after all — let's share Mike's projection:
// φ is the central meridian (e.g., 45° for UTM Zone 38)
// θ is the screen rotation
function rotatedTransverseMercator(φ, θ) {
var π = Math.PI,
cosθ = Math.cos(θ = -(90 + θ) / 180 * π),
sinθ = Math.sin(θ);
function raw(λ, φ) {
var x = λ,
y = Math.log(Math.tan(π / 4 + φ / 2));
return [
x * cosθ - y * sinθ,
x * sinθ + y * cosθ
];
}
raw.invert = function(x, y) {
return [
x * cosθ + y * sinθ,
2 * Math.atan(Math.exp(y * cosθ - x * sinθ)) - π / 2
];
};
var rotate = [-φ, 0, 90],
rotation = d3.geo.rotation(rotate),
projection = d3.geo.projection(raw).rotate(rotate),
center = projection.center;
projection.center = function(_) {
return _
? center(rotation(_))
: ((_ = center()), rotation.invert(_));
};
delete projection.rotate;
return projection;
}
Anybody who says that can't be taken seriously. You need math anywhere there is meaningful manipulation of symbols/data/entity. That statement itself will end up including nearly ever profession on earth.
The problem with programming interviews is they test math tricks, arcane knowledge, trivia and puzzles.
Far more important than mathematical knowledge, is mathematical capability.
Math is a tool used in programming, programming isn't defined by math though (there are plenty of non-math activities that dominate the process). What is so hard about that?
Actually there's a deep equivalence theorem between mathematical statements and programs. Here are people doing ZFC as a program - http://en.metamath.org/
Yes, but that creative process isn't really doing math either (as defined by performing mathematical reasoning). The best we can say is that creative processes are involved in all disciplines.
Programming can involve math, math can involve programming, but neither is defined by the other.
This maybe a weird question, but where do most of the normal and landsat photos come from? If it all exclusive to NY or you use a freelance/marketplace service? I ask since I have a project ongoing with a similar photo requirements and have difficulty acquiring the images. (I have no problem paying, I just don't have the experience to know where to get them)
Edit:
Because this is a programming site, after all — let's share Mike's projection: