Reprojecting Blue Marble
The blue marble dataset is the stuff of side-project dreams. If you’re not familiar with it already, have a look round theNASA Blue Marble Next Generation website, but in short there’s a lot of surprisingly high resolution satellite photography of the planet on offer, for no money, with a ridiculously permissive license. There’s also data for terrain heights and ocean depths, cloud coverage and light emission at night. If I could be bothered, I’d generate a nice, smooth low-res image for you, but things being what they are here’s a horribly speckled, undersampled image generated from some of their data:
Isn’t it pretty? And it’s all yours to play with, down a resolution of 500 metres per pixel. Heartfelt thanks to any tax-paying Americans reading, as I suspect you’ve supplied the funds for all this – but much rather that than have a Coke logo embossed on it.
All of that said, one thing I don’t like about the dataset is its projection. It’s Mercator, and while that’s very recognisable it means you get huge distortion towards the poles. That’s not only misleading & counter-intuitive, it’s also a bit wasteful if you’ve aspirations to chop it up and start displaying it in 3d – there’s really not that much detail at the poles, why waste megabytes of data on a single pixel smeared out by the projection to be tens of kilometres long? Surely we can do better than that… can’t we?
Well, yes, I expect we can. Carlos A. Furuti has a wonderful site about map projections here. There are many weird and wonderful ways of doing it, but for a first stab I thought I’d take look at gnomonic projections. These are riddled with problems of their own, but for my purposes have a few interesting properties:
- If you project onto a few planes, with reasonable angular limits, the projection needn’t be as brutally distorted as Mercator.
- It’s painfully simple - just spheres, rays and planes. It works just as if you put a strong, point light source in the centre of a glass globe and held a sheet of paper up to catch the coloured light. No fancy hill-climbing algorithms required, just a bit of basic trig.
- If you take a ruler and draw a straight line between two points on a gnomonic map, it will actually represent the shortest distance between the two places across the earth’s curved surface. That’s not true for Mercator (I’m not planning to learn to fly any time soon, so don’t know why that’s an advantage, I just thought it was pretty cool).
So, to cut a long story short, here’s a first attempt at a gnomonic projection of the above blue marble image onto a cube:
Now there are obvious issues with the above – I’ve chopped North America and Asia in half, Australia isn’t really that shape, and Scotland sadly isn’t quite the same size as Italy. That said, I think gnomonic projections – which could be used to project the world onto any shape made up of planes, not necessarily just cubes, are a wonderfully simple approach to the problem and could be adapted to take on forms suited for all sorts of interesting tech. More on this later, I hope.
Thanks for reading,