DIY Hillshade

Continuing recent themes of working with elevation data—but stepping back to something more in the realm of ordinary cartography—over on Observable we've got a notebook going through some processes of "DIY Hillshade" with JavaScript on a web map.

The notebook shows one way in which it's possible to use terrain tiles to render customized shaded relief on the fly with ordinary JavaScript and canvas. It's not intended to be an efficient means of getting relief on your web map, but rather an explanation and demonstration of certain precise controls you can have over a hillshaded map's aesthetics when algorithms and code are exposed. It assembles a map using a basic hillshade, hypsometric tints, a water layer, and an approximation of cast shadows.

Head over to the DIY Hillshade notebook to play around with the various controls—and the code if you dare—to see how you can push pixels to render your very own shaded relief!

Related Project:

No items found.
From the Blog