Note: This post could have been written in puns alone, but I’m going to hold myself back from that and try to be a good person. But I mean if you want me to shed some *light* on the situation and step out of the *shadows*, this wasn’t a *night*mare to make…
Another note: I believe Sarah coined the term “mountains of light“. I like it, thanks!
Here’s the general workflow of how the code works:
- Get that elevation layer wired up to Nasa’s nighttime lights satellite imagery server.
- Ok fine, if you really want to geek out with me, it comes from the Suomi-NPP VIIRS sensor.
- The polished and cleaned up pixels are called “Black Marble” and provide a 500m image resolution.
- This isn’t live data but rather a static composite of images taken at different times. Joshua Stevens and Rob Simmons helped me get a better understanding of the hard work that went in to creating and cleaning up this raw imagery into a beautiful worldwide dataset.
- Back to the code: for every nighttime light pixel, convert the visual color ramp that goes from dark blue/black to yellow/white into a simple 0-1 number range. For this I used the chroma.js “luminance” calculation.
- Take the 0-1 number value and multiply it by some huge number! We don’t want 1 meter tall mounds, we want wild and exaggerated mountains reaching high into the sky.
- Drape anything you want on top of this fake terrain. In this case it made sense to also put the nighttime lights imagery on top of the terrain that it generated.
This is a view of northern India, the Himalaya, Nepal, Bhutan, and the Tibetan plateau with our fake mountains at night.
If we drape daytime satellite imagery over this synthetic terrain it is hard not to notice something is a bit off with the Himalaya. Viewing the Earth this way wasn’t the original intent of the app, but it is fun to look at if you don’t mind the headache.
And here’s a bunch of other links to keep you going down the rabbit hole.
.@JWasilGeo's beautiful geoviz, Earth At Night, showing artificial light via elevation. Mountains of light! Check out this beauty & more gorgeous maps on @kennethfield's list: https://t.co/HU7IwwD0rz
Thanks Ken! pic.twitter.com/QC7i58tm06
— Petrichor GeoViz (@petrichorviz) December 17, 2018
— Sarah Bell (@sarahbellmaps) September 7, 2018
— Joshua Stevens (@jscarto) September 18, 2018
— Maarten Lambrechts (@maartenzam) September 6, 2018
Time to shed some light on the situation: explore nighttime lights that define the Earth's "terrain" at https://t.co/fBu63xgwrm
Super cool Instagram video by @esrigram at https://t.co/rotGhInGDs
— Jacob Wasilkowski (@JWasilGeo) September 6, 2018
View this post on Instagram
The world's brightest spots visualized as citadels of light: https://t.co/cL3fFV6PX5
— John Metcalfe (@citycalfe) March 6, 2019
Visit the app here: https://jwasilgeo.github.io/esri-experiments/earth-at-night/