Home News Hill shading

Hill shading

By Graham Asher on 21 September 2010

The picture says it all. example of hill shading: Swiss alps

The tool generate_map_data_type1 reads a USGS (United States Geological Survey) file containing heights in metres at 90m intervals. It converts that into a bitmap at one byte per pixel; each byte represents a shade, calculated using the surface normal at the point and a light source in the south west. CartoType loads the bitmap as a new type of map object and scales and draws it. The color is controlled by the style sheet. I use a medium sepia tone here.