{"id":2770,"date":"2016-05-09T09:14:08","date_gmt":"2016-05-09T13:14:08","guid":{"rendered":"http:\/\/andywoodruff.com\/blog\/?p=2770"},"modified":"2016-05-09T14:32:11","modified_gmt":"2016-05-09T18:32:11","slug":"hachures-and-sketchy-relief-maps","status":"publish","type":"post","link":"https:\/\/andywoodruff.com\/blog\/hachures-and-sketchy-relief-maps\/","title":{"rendered":"Hachures and sketchy relief maps"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"351\" src=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/molokai_sketchy.jpg\" alt=\"Sketchy Mokokai relief map\"  class=\"alignnone size-full wp-image-2771\" srcset=\"https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/molokai_sketchy.jpg 960w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/molokai_sketchy-300x110.jpg 300w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/molokai_sketchy-768x281.jpg 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>I&#8217;ve never been a terrain representation expert, but occasionally I get briefly super interested in some DIY technique for relief mapping, not using typical GIS tools or rendering software. Tom Patterson&#8217;s old (but still applicable) <a href=\"http:\/\/www.shadedrelief.com\/cp28\/relief_tp.html\" target=\"_blank\">Photoshop tutorials<\/a> were my introduction to the magic simplicity of turning a grayscale image into fancy shaded relief.<\/p>\n<p>Some years ago I wrote code for simple shaded relief, <a href=\"http:\/\/andywoodruff.com\/blog\/shaded-relief-in-as3\/\">using Flash at the time<\/a>. I picked that up again just a few months ago and did the same <a href=\"https:\/\/github.com\/awoodruff\/canvas-shaded-relief\" target=\"_blank\">using JavaScript and canvas elements<\/a>. These were impractical experiments, but  they were a super interesting way to learn some basics about how automated relief shading works, and they were a more fun playground than turning knobs or filling in boxes in some software would have been.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/hachure.jpg\" alt=\"hachures\" width=\"800\" height=\"238\" class=\"alignnone size-full wp-image-2807\" srcset=\"https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/hachure.jpg 800w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/hachure-300x89.jpg 300w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/hachure-768x228.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>Then the other day, for no particular reason, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Hachure_map\" target=\"_blank\">hachures<\/a> came to mind. Hachures are an old-fashioned technique in which parallel lines are drawn along slopes. You don&#8217;t see them much these days, but they&#8217;re one of my favorite techniques; their chapter is still the only one I&#8217;ve managed to read in <a href=\"http:\/\/www.amazon.com\/Cartographic-Relief-Presentation-Eduard-Imhof\/dp\/1589480260\" target=\"_blank\">Imhof&#8217;s book<\/a>. From time to time I&#8217;ve wished there were an easy way to generate nice hachure maps in GIS or what have you\u2014as far as I know there&#8217;s still not much out there.<\/p>\n<p>I tried rendering some hachure-like maps based on the same <a href=\"https:\/\/github.com\/awoodruff\/canvas-shaded-relief\">code<\/a> I&#8217;d used before, that is, in a browser with just some JavaScript. The ultimate result was not so much hachure maps but the kind of sketchy map style you see in these images, almost like something drawn with colored pencils.<\/p>\n<p><a href=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/sf_sketchy.jpg\" rel=\"attachment wp-att-2775\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"600\" src=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/sf_sketchy_crop.jpg\" alt=\"Sketchy SF relief map\" class=\"alignnone size-full wp-image-2775\" srcset=\"https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/sf_sketchy_crop.jpg 800w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/sf_sketchy_crop-300x225.jpg 300w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/sf_sketchy_crop-768x576.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>It began with something that I quickly recalled is essentially what <a href=\"http:\/\/mike.teczno.com\/notes\/hachures.html\" target=\"_blank\">Michal Migurski had worked on<\/a> (later <a href=\"https:\/\/www.flickr.com\/photos\/walkingsf\/6951578888\/\" target=\"_blank\">inspiring Eric Fischer<\/a>) some years back: divide elevation data into a grid and use short strokes to show slope (as line width) and aspect (as rotation).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/straight_slope.png\" alt=\"Gridded hachure-esque symbols\" width=\"800\" height=\"200\" class=\"alignnone size-full wp-image-2777\" srcset=\"https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/straight_slope.png 800w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/straight_slope-300x75.png 300w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/straight_slope-768x192.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>That was kind of cool, but certainly a lot more rigid-looking than classic hachure maps. The next step was to introduce some small random offsets in the grid so things didn&#8217;t line up so perfectly, looking slightly more natural.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/random_straight.png\" alt=\"Random offsets in hachure grid\" width=\"800\" height=\"200\" class=\"alignnone size-full wp-image-2778\" srcset=\"https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/random_straight.png 800w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/random_straight-300x75.png 300w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/random_straight-768x192.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>Wanting to move even further from a gridded appearance, next I tried drawing longer strokes at each point, longer than the dimensions of the cell so that lines would start to blend together. I also remembered that I wanted <em>shadow<\/em> hachures, where stroke weight or shade corresponds to brightness in an illuminated scene, not just slope. (My earlier shaded relief code could calculate this.)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/longer_strokes_shadow.jpg\" alt=\"Longer strokes and shadow hachures\" width=\"800\" height=\"200\" class=\"alignnone size-full wp-image-2780\" srcset=\"https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/longer_strokes_shadow.jpg 800w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/longer_strokes_shadow-300x75.jpg 300w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/longer_strokes_shadow-768x192.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>At this point it was starting to look more like a pencil sketch than a true hachure map, so I ran with that and added color. There&#8217;s kind of a combination of slope and shadow hachuring here, with stroke width representing slope and color representing shadowing.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/shadow_color.jpg\" alt=\"Shadow strokes and color\" width=\"800\" height=\"200\" class=\"alignnone size-full wp-image-2781\" srcset=\"https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/shadow_color.jpg 800w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/shadow_color-300x75.jpg 300w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/shadow_color-768x192.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>Lastly, there were two subtle steps: add a little more randomness in the form of slight curves, and draw the map at lower opacity several times on top of itself, each time with the sun angle varying a bit. This produced a somewhat smoother scene with a bit more shadow detail, and allowed the various random effects to accumulate into a very grassy look.<\/p>\n<p><a href=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/bigisland_sketchy.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"961\" height=\"1058\" src=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/bigisland_sketchy.jpg\" alt=\"Sketchy Big Island relief map\" class=\"alignnone size-full wp-image-2783\" srcset=\"https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/bigisland_sketchy.jpg 961w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/bigisland_sketchy-272x300.jpg 272w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/bigisland_sketchy-768x846.jpg 768w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/bigisland_sketchy-930x1024.jpg 930w\" sizes=\"auto, (max-width: 961px) 100vw, 961px\" \/><\/a><\/p>\n<p>The source code for this is <a href=\"https:\/\/github.com\/awoodruff\/sketchy-hachures\" target=\"_blank\">on GitHub here<\/a>. All in all, it&#8217;s not practical code, at least not in this implementation (it would be interesting to try it in a more efficient way, or on something like <a href=\"https:\/\/mapzen.com\/blog\/elevation\/\" target=\"_blank\">Mapzen&#8217;s elevation tiles<\/a>), but it&#8217;s a fun style to play around with! With more attention to things like color I can imagine some pretty good-looking maps. In any event, here are a few more that I rendered.<\/p>\n<p>Crater Lake:<br \/>\n<a href=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/craterlake_sketchy.jpg\" rel=\"attachment wp-att-2788\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/craterlake_sketchy_small.jpg\" alt=\"Crater Lake sketchy relief map\" width=\"800\" height=\"527\" class=\"alignnone size-full wp-image-2788\" srcset=\"https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/craterlake_sketchy_small.jpg 800w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/craterlake_sketchy_small-300x198.jpg 300w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/craterlake_sketchy_small-768x506.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>White Mountains, around Mount Washington:<br \/>\n<a href=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/mtwashington_sketchy.jpg\" rel=\"attachment wp-att-2790\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/mtwashington_sketchy_small.jpg\" alt=\"Mount Washington sketchy relief map\" width=\"800\" height=\"592\" class=\"alignnone size-full wp-image-2790\" srcset=\"https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/mtwashington_sketchy_small.jpg 800w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/mtwashington_sketchy_small-300x222.jpg 300w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/mtwashington_sketchy_small-768x568.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>Oahu:<br \/>\n<a href=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/oahu_sketchy.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"722\" src=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/oahu_sketchy.jpg\" alt=\"Oahu sketchy relief map\" class=\"alignnone size-full wp-image-2791\" srcset=\"https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/oahu_sketchy.jpg 960w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/oahu_sketchy-300x226.jpg 300w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/oahu_sketchy-768x578.jpg 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/a><\/p>\n<p>Yosemite Valley:<br \/>\n<a href=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/yosemite_sketchy.jpg\" rel=\"attachment wp-att-2813\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/yosemite_sketchy_small.jpg\" alt=\"Yosemite sketchy relief map\" width=\"800\" height=\"475\" class=\"alignnone size-full wp-image-2813\" srcset=\"https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/yosemite_sketchy_small.jpg 800w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/yosemite_sketchy_small-300x178.jpg 300w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/yosemite_sketchy_small-768x456.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>Hocking Hills, Ohio:<br \/>\n<a href=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/hocking_sketchy.jpg\" rel=\"attachment wp-att-2819\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/hocking_sketchy_small.jpg\" alt=\"Hocking Hills sketchy relief map\" width=\"800\" height=\"614\" class=\"alignnone size-full wp-image-2819\" srcset=\"https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/hocking_sketchy_small.jpg 800w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/hocking_sketchy_small-300x230.jpg 300w, https:\/\/andywoodruff.com\/blog\/wp-content\/uploads\/2016\/05\/hocking_sketchy_small-768x589.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve never been a terrain representation expert, but occasionally I get briefly super interested in some DIY technique for relief mapping, not using typical GIS tools or rendering software. Tom Patterson&#8217;s old (but still applicable) Photoshop tutorials were my introduction to the magic simplicity of turning a grayscale image into fancy shaded relief. Some years [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-2770","post","type-post","status-publish","format-standard","hentry","category-my-maps"],"_links":{"self":[{"href":"https:\/\/andywoodruff.com\/blog\/wp-json\/wp\/v2\/posts\/2770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/andywoodruff.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andywoodruff.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andywoodruff.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/andywoodruff.com\/blog\/wp-json\/wp\/v2\/comments?post=2770"}],"version-history":[{"count":38,"href":"https:\/\/andywoodruff.com\/blog\/wp-json\/wp\/v2\/posts\/2770\/revisions"}],"predecessor-version":[{"id":2826,"href":"https:\/\/andywoodruff.com\/blog\/wp-json\/wp\/v2\/posts\/2770\/revisions\/2826"}],"wp:attachment":[{"href":"https:\/\/andywoodruff.com\/blog\/wp-json\/wp\/v2\/media?parent=2770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andywoodruff.com\/blog\/wp-json\/wp\/v2\/categories?post=2770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andywoodruff.com\/blog\/wp-json\/wp\/v2\/tags?post=2770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}