Category Archives: Uncategorized

Adding Shaded Relief in Photoshop

I’ve had occasion, from time to time, to show my colleagues in the UW Cartography Lab the technique I use to combine shaded relief with other map layers in Photoshop. After a recent request to share the technique again, I decided to make a video, so that people can watch at their own convenience. So, if you’re interested in this:

Equation

then watch this:

(make sure to view in HD, so you can see the details I’m talking about). If you’d like, you can also follow along with the same file I’m using: https://www.dropbox.com/s/6teczksvgajrxdb/ReliefTutorial.psd?dl=0

Tricks from the Historical Atlas of Canada

I’m constantly assembling, in my mind, a toolkit built out of little tricks that I see other cartographers pull off. I take pleasure in the small things. The big picture is important, and certainly we need to focus on telling a clear story that looks great, but it is the details that always interest me most: a well-done coastal effect, great typography, or a smart tweak to an old, standard symbology.

In that spirit, I’d like to take a minute to promote a couple of nice ideas which come from the Historical Atlas of Canada. Geoffrey Matthews served as the Cartographic Editor for its three volumes, the last of which was published in 1993. During my introductory cartography course, the instructor pointed to it as an example of one of the final great works of the manual cartography era, and I have found things to appreciate in it ever since.

There are three nice things I’d like to share…

In-Situ Insets

In-Situ 1
In-Situ 2

In-Situ 3

In-situ insets” is a term I just made up to explain what’s going on above. Maybe it has a real, accepted term already. Perhaps you could call it “lensing” instead? It is as a magnifying glass, dropped over the terrain. Instead of separate inset maps that zoom in on areas like Vancouver or Toronto, the authors expand these areas and then plop them right down in the middle of the map, covering part of the basemap. For comparison, here’s a map of Canada all at the same scale that I swiped from Wikipedia.

Political_map_of_Canada

Admittedly, the geography of Canada helps the authors here. There’s not much going on nearby that needs to be shown for the stories they’re trying to tell, so it can be safely covered up. Creating in-situ insets requires some fortunate circumstances, but when they come together, I think it’s a fabulous idea. I think forcing people’s eyes to shift to a separate inset map is disruptive and reduces their appreciation for the spatial context you’re trying to show. Keeping everything in one place, on one map, is more coherent.

Non-boxed Insets

Sometimes, instead of an in-situ inset, the authors do something like this:

Inset 1

Inset 2

The greyed out section of the main map and the arrow to the inset create a strong, nice-looking connection. So often, when we want to make an inset map, we end up putting it in a box, separated from the main map by a line. But I’m wary of introducing extra dividing lines into a map layout; I think it’s done way too often, and it prevents the various page elements from being seen as a coherent whole. The setup above is a nice way to have an inset without having to separate it from the main map. It is seen more clearly in its spatial context.

I’m not sure how I feel about the extruded, pseudo-3D perspective, but I expect this idea would work just as well in 2D.

Gridded Proportional Symbols

Finally, something nice that has nothing to do with insets. I like the Historical Atlas of Canada‘s use of proportional symbols that are gridded, so that they can be be easily broken down into countable units. Here’s an example:

Gridded

In many maps, these would simply be treated as proportional squares or lines, but in the Atlas, they’re broken up into units (I’ve seen the New York Times do similar). So, a reader can look at the whole and make a quick comparison, or they can take a moment to actually start counting if they’d like to dig out the actual number. Normally it’s very difficult for a reader to get an estimated value from a proportional symbol, but the grid makes it much easier. I like to call these “aggregate symbols,” as they’re proportional symbols built out of many individual pieces.

Here’s a second example, which we saw in the last section:

Gridded2

This map takes things a step farther and color-codes the units, adding another layer of data that, importantly, doesn’t interfere with the big picture. If you want to see the overall pattern, you can just look for the tallest stacks. If you want to dig deeper, more data are there, but they’re not in the way. It can be read at multiple levels, which is quite an excellent goal to aim for.

So there you go! A few nice tricks from a great product. They’re little things, but I think that small details is what a lot of good mapmaking comes down to.

 

Atlas of Design 2014

Friends, as many of you know, I am one of the Editors of the Atlas of Design, which is a book which NACIS publishes every two years. It’s a showcase of some of the best and most beautiful cartography around the world. We’ve recently opened submissions for the 2014 edition, and I very much hope you’ll think about submitting your work to us. Visit atlasofdesign.org/call for more details.

Also, I hope you’ll help us in spreading the word. The more people we reach, the better sample of maps we’ll have, and the better final volume we’ll produce. I would also especially like to ask for your help in reaching people outside the English-speaking world. We’d like this to be a book about great cartography throughout the globe. Our call for submissions and our submissions form are, thanks to some awesome volunteers, available in a dozen other languages.  While our volunteers make it possible to communicate outside of English,  we need help in reaching out to mapmakers who speak those languages. I and my fellow editors are based in the US, and our colleagues and professional contacts are primarily in the English-speaking world. If you can help us expand beyond that sphere by alerting your colleagues, posting in non-English forums, etc., we’d be much appreciative. We know it’s going to take time, but we’d like the Atlas of Design to represent the maps all of us make, no matter where we are.

Blender Tutorial

As promised several months ago, I’ve finally put together some instructions on how to create shaded relief using Blender. I’ve created a 72-minute, six-part video series that walks you through the process (don’t worry; it doesn’t take that long to do it every time, just your first time). Please share it around! I’d love to see other people making use of this technique, and extending it beyond what I’ve done.

NOTE: Since I put together this video series, some of my colleagues have made some great contributions that you should be aware of. First off, Ryan Lash (@RRLash) has put together an awesome step-by-step explanation of everything that goes on in the videos, so that you don’t have to hunt around to find the step you missed: https://docs.google.com/spreadsheets/d/11HHMdKawdbXNkkxWdW82-HgHE2k3Tojg7P_X75ojb50/edit#gid=0. Second, check out the comments below. Morgan Hite has been using BlenderGIS to ease some of the issues with Blender not handling spatial data natively, and he’s put together a description of his basic workflow. I’m very happy that people are using and, more importantly, extending the material I’ve put together her.

Make sure you’re watching these in HD, otherwise you may have trouble following along when I click buttons. If you want to follow along with the DEM I am using, get it here: https://www.dropbox.com/s/p70l34zf4grh63j/Blender%20Demo%20DEM.tif

Meanwhile, if you just want to look at pretty things, here’s the relief I made during the tutorials:

relief

Blending my Way to Relief

Throughout my brief cartographic career, I’ve been a fan of shaded relief, but I’ve also struggled to create one that I found satisfactory. I haven’t had the time to learn how to draw relief manually, and so I rely on the old standard digital hillshade algorithm, plus the judicious application of Photoshop (having learned from folks like Tom Patterson and Tanya Buckingham how big of a difference it can make). I’ve also posted here on some efforts to do a bit of spatial analysis to improve the end result. But, I am still often dissatisfied with the final product.

Lately, though, I’ve been experimenting with something that I think could represent a substantial improvement over the standard techniques for doing a digital hillshade. I’ve been messing around with Blender, a free 3D modeling program.

I got started with Blender because I wanted to do some oblique terrain maps (a la Natural Scene Designer), and because I also wanted to do some 3D printing for a project I’m working on. But I also realized it might be the solution for shaded relief. So, I used a DEM to create a 3D terrain mesh inside Blender, then positioned my camera directly above it, and started doing some rendering. Here’s what I’ve gotten so far.

First off, here’s one that mimics what you’d get out of ArcMap or some other standard GIS algorithm. Nothing special, but it’s a good starting point for comparison.

Plain

A fairly plain effort that looks much like a standard hillshade

It’s pretty plain. The standard hillshade algorithm looks at each pixel, determines its slope and aspect, and uses that to figure out how bright it should be. That’s about it. It doesn’t look at where each pixel sits in the context of its surroundings, or figure out how light bounces around or causes shadows. It produces decent results, but it’s pretty simple and unrealistic. So, let’s add some more realism:

With some basic lighting effects added

With some basic lighting effects added

This one is much better. All I’ve done here is turn on two things: shadows and light bounces. Places facing away from the sun are now in shadow, with the shadow length depending on the height of the terrain. The light bounces allow us to still see the shadowed areas, though. Blender figures out that the backside of the mountain, while not receiving direct sun, will still be illuminated by light striking nearby ridges and scattering around. So, it traces the path of the light rays and determines how light moves around the scene to create a much more realistic result. In ArcMap, you can turn on shadows in your shaded relief, but it just makes everything black if it’s caught in a shadow; it’s not equipped to re-light those shadows by looking at light scattering.

We can also change our light angle, or strength, to simulate different times of day. Here’s one with a low sun angle, coming from the west.

Mount Rainier at dusk

Mount Rainier at dusk

Again, you could aim for something like this in a GIS program, but it’s not likely to turn out quite so nicely, because it doesn’t have the ability to calculate the way light bounces around and dimly illuminates those east-facing slopes. They’d just be in a solid black shadow. Or, if you didn’t turn on shadows, they’d be lit as though the mountain isn’t in the way.

There are a lot of parameters you can change in Blender that simply aren’t available in a GIS program, as well. We can, for example, add a second light source. Here’s the same image as above, except with some moonlight coming from the southwest:

With moonlight

With moonlight

We can also do things like adjust the “size” of the sun, giving us more of a point-light effect, as though we’re on a planet without an atmosphere to spread out the incoming rays:

OnTheMoon

A harshly-lit landscape

Now it’s as though we’re on the moon, or some other harshly-lit place, with much sharper shadows.

Finally, my favorite is probably this one:

A more sketched look

A softer, more sketched look

I think it looks the closest to a handmade relief. It’s still not the same, but it’s probably the closest I’ve seen an automated algorithm come to something human-produced. It’s got a nice fuzziness that comes from turning down the number of light paths that Blender calculates. I’ve also made the surface smoother, which gives it a bit more specular reflectivity and produces an interesting effect that I quite like. Since we’re working in a 3D modeling program, we can change what material the surface is made from, if we want to try interesting things. Here’s one more where I’ve made the terrain out of a glossy material, instead:

A shinier terrain

A shiny world

In the end, I think this could be the way to go for a lot of my future shaded relief needs. It does, admittedly, take longer to accomplish. Each test render can take several minutes. But I think the quality is a lot higher. I don’t think this is necessarily the be-all, end-all, last word in doing automated relief. It could probably be improved further via some of the same techniques people use to improve standard GIS hillshades. But I think it’s a better foundation than the standard algorithm, and I’m looking forward to playing around with it more.

At some point in the future, I’m hoping to put together instructional materials on using Blender for shaded relief. But I don’t think I’m quite ready yet. I don’t know the program well enough to be able to say that I’m doing things in the most efficient and effective manner, and I haven’t quite pieced together the best way to explain everything clearly. In the meanwhile, I encourage you all to experiment with it, and to tell me if you’ve tried anything similar in the past. I imagine I’m not the first to think of this.

Is Cartography Dead?

Loyal followers,

I’ve got a new post up on the Visual.ly blog that you might want to check out, if you’re interested in my thoughts on the future of cartography: Is Cartography Dead?

Meanwhile, I hope you will pardon the dust around here. Too often that we think of blogs which update infrequently as being dead, but that is far from the case. I intend to keep my current pace of “a few times a year.” Make sure to sign up for RSS or email updates so you’ll know when I’ve got a new post up. I’ve been going through one of the busiest periods of my life lately, and while I have ideas for some content, I’ve not had a chance to write anything up. Stay tuned for a few things to come this summer.

Atlas of Design

Gentle readers,

Things have been fairly quiet around here lately, and I apologize for that. I’ve got a number of things in mind to write about, but much of my spare time has been taken up by a major project. I present to you, the NACIS Atlas of Design:

Click to visit the Atlas of Design website

This is a book I edited along with the superbly awesome Tim Wallace. It’s a refereed collection of some of the world’s best cartography. You may recall my announcement earlier this year that we were taking entries. Well, we had over 140 of them, and then a panel of judges selected 27 finalists to be published in this anthology.

This book is very important to me personally. In this era of quick and easy mapping, I feel that all too often we are focused only on the coding, or the data, and not enough on how the whole thing looks, and how it makes readers feel. This is a book about how maps look, and why we need to remember that beautiful and clever design is an essential ingredient in mapmaking. We wanted to produce a volume to honor talented people, and to inspire everyone out there toward new understandings of the role of aesthetics and design in mapmaking. I hope you’ll enjoy it, and I very much hope it will give you something to ponder.

Linework Like Typefaces

The aesthetic and design choices available to cartographers are near infinite. As we strive to craft something that looks good and fits with the themes we want to convey, we can select from a massive variety of colors, typefaces, line weights, symbols, and more. This flexibility allows for the creativity and expression that lies at the heart of the discipline, and it makes every map unique.

But while each map may vary in so many of these particular dimensions, one thing that rarely changes is the linework: the shape of the coastline, the path of a river, the boundary of a nation; these things usually look the same from map to map. The lines may be given different colors or widths, but the paths they take remain fairly similar. They are twisted around a bit on account of changes in projection, and simplified more or less based on the map scale, but they generally follow reality as well as they can. This generic, accurate-as-possible look to the linework is very much a part of the standard Cartgraphic Aesthetic described by my colleague Marty Elmer.

Different-looking maps, but similar linework.

But the power of cartography (and its purpose) is that it’s not realistic. It’s highly abstracted and generalized, and reality went out the window once we decided to show a road as being red and give it a stroke width that makes it look hundreds of miles wide, or to replace a city with a black circle. We stylize so many other things on maps, but playing around with the actual shapes of states, islands, or roads, is uncommon. I’d like that to change. I want to shake things up, because I think that people become too familiar with the shapes of states and countries and the like. They’re default, unobtrusive. It’s hard to call attention to places when they always look the same.

I want linework like typefaces. Consider how the shape of an “M” varies significantly as you go from one typeface to another, yet we still understand that they all refer to the same thing. Each one expresses a different feeling or character, while remaining true to the same basic concept.

I want us to think of cartographic linework this way. When I make a map of the United States, I want to be able to choose different renderings of the coastline, each unique, but each referring back to the same geographic reality. We are not satisfied with having only one typeface, or only making our polygons one color, with one stroke width. Why should we limit ourselves when it comes to linework? We must generalize linework for aesthetics, not merely clarity and scale.

Different-looking maps, very different linework

I’d like to introduce you to Project Linework, which is an attempt at a solution. Project Linework aims to provide a library of free, public-domain sets of vector linework for cartographic use. Each is unique, and each is ready for you to use in your mapping projects. We’ve got three sets so far, and we hope you’ll consider contributing. Click here to visit the project page, where you can download linework and learn more about contributing.

I’m not sure where the project will go from here. If we get a few more contributions, and there’s some interest in these things, maybe I’ll see about getting a website together. I’m trying not to be too top-down with this, instead letting it develop organically. Hope you’ll come along for the ride.

Against Neatlines

Note: In the comments below, it turns out there’s a bit of confusion about what the definition of neatline actually is, and whether or not I’m using it correctly. Like a lot of cartography terms taught in school, practicing mapmakers aren’t always sure what they mean. Feel free to weigh in with your opinion on whether or not I’ve got the right term.

Gentle readers, today I exhort you to beware of the neatline, that quiet little item which encircles our maps and whose most common realization is no more than a simple black rectangle.

The neatline is merely the boundary separating the map from the rest of the page. This innocuous border is known as a “map element,” which is a vague term used in cartography education to mean “all the stuff that needs to go on your map that isn’t your map itself.” Scale bars, legends, neatlines, titles, north arrows — all these are map elements. None of the map elements have much to do with each other, and their grouping under this term is a bit inexplicable, except that it permits academics to make cartography look more complicated than it really is and offers them another vocabulary item to test their students on. I’m not convinced most practicing cartographers use the term or think of legends or scales or the like as belonging to this overarching category of “map elements.”

I’ve probably made my feelings on other map elements like scale bars and north arrows clear. They’re usually unnecessary, even though students are often inexplicably taught that they’re mandatory. The neatline is no different, and it’s high time I took on the pro-neatline lobby.

The first problem I have with neatlines is that they impart an unfortunate sense of finality. Beyond this line, the map ends and the world does not exist, or is at least not thought of. But when we look at maps, we’re often looking at only a section of the world. I want readers to have a feeling that the world continues on beyond the glimpse that the map gives. When possible, I print my maps full bleed, which simply means printing the map from one edge of the page to another, with no margins. It’s a habit I picked up from my time working under Tanya Buckingham, the wizard of the UW Cartography Lab. By running the map over the whole page, I hope to give the reader a sense of continuity; there’s more to the world that you can see here right now, and that the section you are seeing is connected with places that we’re not looking at, and in ways we’re probably not thinking about.

Left: This is all that exists in the world.
Right: The world continues on, but the lack of paper has stopped me from seeing it.

Of course, a lot of printers won’t let you do full bleed. Instead, I usually feather my map out so that it fades into the page background. Here’s an example from a map I prepared for a wine tasting.

Click for free PDF, in case you happen to be hosting a wine tasting featuring this exact same set of regions.

Again, I think this gives the sense that the world has not ended, but that it has simply faded from our sight. It still lurks there under the margins. It puts the area we see in its geographic context.

The other problem I find in neatlines is that they sometimes call too much attention to the separation between the background and the map. It draws attention away from the map itself, and towards the medium. It’s the difference between holding a piece of paper with a map on it and holding just a map (which happens to be printed on paper).

Left: A piece of paper with a map printed on it. Two visual objects.
Right: A map, made of paper. One visual object (hastily feathered for this example).

I want to integrate the map into the medium in which it’s being presented, so that readers don’t focus on how it’s framed, how it’s placed on the page, etc. Those are extra steps which get in the way of their engaging with the map. Part of this integration comes from how large the map is relative to its page, but a lot of it is in how noticeable that boundary is between them. Many map layouts have a problem I have (just now) starting calling boxing. Everything gets its own little frame, and so the whole page looks like it’s build of separable puzzle pieces, rather than being an engaging and integrated whole.

Map in a box, scale in a box, logo in a box, etc...
Source: http://courses.washington.edu/gis250/lessons/map_layouts/

Both of these examples above would be better served by removing all those little borders and frames (and a bit of rearranging). Don’t put boundaries between the map and its legend or title. Don’t separate it from the medium it sits in — let people hold the map in their hands, rather than holding a paper with a map printed on top of it.

All of the above criticisms have a print destination in mind, because I’m an anachronism — a thirty year old cartographer primarily interested in static print work. But, I think the concept can be applied just as well to the web. Maps can fill the width of the browser window, or they can be given feathered edges. The idea here is portable, certainly, though the particulars of how it is achieved may vary.

Though I’m all for dropping neatlines and integrating the map into its page, it can be taken too far. On Cartastrophe today, I explored the unfortunate consequences when someone fails to distinguish at all between the two.

Click to visit Cartastrophe

Certainly, it needs to be clear to readers where the map ends and the rest of the page begins. Neatlines are one way of doing this, but I think there are better alternatives. To be sure, sometimes these alternatives are not always practical. Full bleed or feathering won’t work for every situation. Even so, neatlines are usually not necessary, if colors are chosen well. The map below has no neatline, but I don’t think anyone will be confused as to what’s the map and what’s not. Throwing a black line around this thing won’t do anything more.

Modified from a map I stole off the Wikipedia article for the Robinson Projection.

I don’t mean to suggest that neatlines should never, ever be used. I’m taking somewhat of an extreme position here because I like arguing about cartography. But I really do try to avoid them whenever I can, and I really do believe that, at least sometimes, a neatline turns a map into a map-on-a-piece-of-paper and breaks the reader’s sense of geographic continuity (even if other people think I’m crazy and making all of this up). All that said, there are certainly situations where neatlines are useful. Insets come to mind — putting one map next to another usually requires a clear distinction to be made between them. Admittedly, I’ve tried (with mixed success) to do away with neatlines even here, putting two feathered maps near each other and hoping that my readers’ knowledge of geography will prevent confusion. But that may be taking things farther than is reasonable.

In the end, all I ask is that you please think carefully the next time you intend to apply a neatline. It’s easy to use, but generally unnecessary and possibly harmful. Let your maps integrate into their environment without boundaries.

Odds and Ends

From time to time, I make quick, one-off projects for my own entertainment, and I usually don’t have anywhere for them to go once complete. So, instead, I will post a few of my recent ones here in hopes that they will amuse you, gentle reader.

Choropleth Mosaics

Some weeks ago, a friend of mine was looking at a choropleth map and commenting that she liked the mosaic of colors. This got me to thinking about using enumeration units as actual mosaic tiles to create an image. I’m sure someone’s done something like this before, but here it is:

Tim Wallace, I know, had an idea like this in mind some time before me and has made use of the concept in a slightly different form over on Bostonography.

Picturesque New England

While working on one of my river transit maps, I was reading about a lot of various New England towns, and it seemed to me that approximately every other one was described as “picturesque” on Wikipedia. So, I decided to do some wholly unsound research to map which parts of Massachusetts were most picturesque.


Each town is assigned a “picturesqueness score,” which is simply the number of search hits for “(townname) Massachusetts picturesque” divided by the search hits for “(townname) Massachusetts. So, it’s the percentage of pages which mention the town that also contain the word “picturesque.” I used Bing for the searches, mainly because Google kept searching for the word “beautiful” instead of “picturesque,” and I couldn’t stop it.

Note that most of those pages don't contain the word picturesque -- just the word beautiful, which Google thinks is close enough

When I was done, I hastily assembled these maps using Indiemapper, which makes doing unclassed choropleths and noncontiguous cartograms a snap.

Oregon Trail

This last week I was a guest lecturer in a cartography course, and as part of the lecture I showed a map extracted from one of the old Apple versions of Oregon Trail (to show the representation of mountains). Thinking about the game later that day, I decided to map out the route taken by my intrepid, dysentery-ravaged party, in a way different than the game uses. Unsurprisingly, I fell back on the Tube map style. I swear I know how to make other kinds of maps, and once I finish my river atlas I may never do them again.


Personally, I played the green-and-black version.

The type is set in a bitmap face called Apple ][, which I found at dafont.com. If you use it, be careful of the kerning — it needs some adjustment. But it was, otherwise, exactly what I needed to make this work.

Making this reminded me that I’d been meaning to do one other map in this style, for some months…

Oregon Wine

I have a friend who is very much into wine, and some way or another, the idea came up that I ought to do an Oregon Trail-style map of the various designated American Viticultural Areas of Oregon.

Click for larger image, one which is a whopping 25k.

The image above was created at a size of 320 x 200. If you click, you can view a copy which I tripled to 960 x 600, so it was large enough to actually see. Pixels have gotten a lot smaller since the 80’s.

There is a group of five very small AVAs that are situated in the Willamette Valley, which I had to leave out due to size constraints. Suppose I’ll need to make a second map sometime.

It was a fun challenge to try and fit everything into such a small space and with no color to work with. I can’t say it’s wholly successful, but it was good enough for its purpose as an amusement. I have a mind to institute some sort of bitmap-mapping competition, but my last efforts at competition-sponsoring went poorly, so I may just skip it.

That’s all for the time being. I’m sure I’ll have more amusements in a few months.

Follow

Get every new post delivered to your Inbox.

Join 80 other followers