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.
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:
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.
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:
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:
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:
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:
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.
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.
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:
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.
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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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:
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.
When I was done, I hastily assembled these maps using Indiemapper, which makes doing unclassed choropleths and noncontiguous cartograms a snap.
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.
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...
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.
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.
Today I’d like to give a little publicity to a couple of new projects I’m involved in, and which need help from people like you. Both of these are organized through NACIS, the North American Cartographic Information Society.
Atlas of Design
First off, NACIS is creating a new publication, the Atlas of Design, which is intended to be a showcase for top-notch cartographic work around the world. We need help from you, though, to make it happen. If you know of some great work out there, let us know at email@example.com. It doesn’t have to be something you’ve made — if you’ve seen a great map out there that someone else has made, encourage them to submit to us, or let us know and we’ll get in touch. We want work out there that gets to the heart of great cartography and makes us think about what beauty and design are.
As the announcement says:
The Atlas will feature a gallery of full-color maps showcasing cartography at its most beautiful, its cleverest, its sharpest, and its most intriguing. But it will be more than a museum of images; each map will be accompanied by thoughtful commentary that guides the reader toward a deeper understanding of the work: its inspiration and message, the ways it means to influence us. It is well to look upon something beautiful and good, but once we understand how it is beautiful and good, we can carry those lessons into our own work and advance the craft of mapmaking.
For more information, including guidelines, go to nacis.org/atlas.
Initiative for Cartographic Education
NACIS is also launching a new education program, the Initiative for Cartographic Education. The aim of ICE is to improve the quality and reach of cartography education at all levels (primary through college through professional training). As its first project, ICE will be assembling a curated database of education resources: labs, lesson plans, images, tutorials, etc. Wondering how other people teach projections? You’ll be able to look at lecture notes and slides from other educators, using them to inspire improvements in your own practice. Creating a new a lab section and need some content? Ready-to-use lab exercises will be available to help get you started. We want to make it easier for colleagues to share best practices with each other, and create an ongoing conversation about how cartography should be taught.
To do this, we need your help. If you have resources you’d be willing to share (preferably under a Creative Commons license), contact me at firstname.lastname@example.org. We can host materials, but if you already happen to have them online, we’ll also be putting URL entries into the database as well.
NACIS is about cartographers coming together to do great things, and both of these projects are going to be awesome. Please consider participating. And please pass this along to as many people possible. We want everyone to know what we’re up to.
Let me tell you about one of my favorite maps.
I’ve seen it on various t-shirts around Madison, Wisconsin, the city in which I have lived for the past four years or so. It’s an emblem of sorts for we who are proud of living on an isthmus.
I love this map because of its simplicity, and how that simplicity exemplifies good and clever cartographic design.
I like to bring this map up as an example to people because it helps explore the edge of the term “map.” It certainly doesn’t look like most maps (except, of course, the increasingly-poplar typographic maps). But to me, its unusual appearance simply brings into focus what a map is and is not. This is a representation of space, and one in which there is a correspondence between space on the page and space on the Earth. The isthmus of Madison runs roughly southwest-northeast, and to either side there are lakes. This relationship is preserved in the representation above. It’s authored, like any map, and it is graphical (it functions through its appearance). Those are the four components of map-ness, to me: authored, graphic, representation, spatial.
So, first off, I appreciate it because it permits me to be needlessly pedantic about what makes something a map. Beyond letting me show off in front of others, though, I appreciate it even when no one else is around. I enjoy its simplicity and its economy. It’s a very highly generalized map, breaking down the area into but two categories: lake and city. It’s a reminder to me that you can still convey a message with a map that is ridiculously simplified. Adding any more detail here would get in the way. All maps tell stories. Some are short, some are long. This map is a slogan. Unfortunately, there are a lot of maps out there that don’t say much, but take a lot of space to say it, and they could learn a thing or two from this one. Here, the message is paired perfectly with the level of visual complexity used to express it. I imagine there are a lot of more detailed maps out there that could stand to be distilled down into three words. I have some problems with those who worship Tufte’s doctrine of minimalistic, ink-efficient design, but those ideas can certainly be instructive.
Finally, I appreciate the fact that, like typographic maps generally, it needs no legend. When you look at this map, you see what it is. The interpretation of map symbols should ideally be seamless. As mapmakers, we work in the zone of representations. People see through maps — they don’t look at Google Maps and see yellow lines and blue polygons. They see roads and water. It is our job to make that representational layer transparent, so that people see what our symbols mean, not how they were constructed. A legend absolutely destroys that transparency, because it makes someone aware of the symbol’s mediation, and forces them to scramble for its meaning.
I’m not a big fan of legends. While they are certainly necessary and useful at times, I’d rather mark things directly on the page if I can. Too often, you find maps like this one, in which the legend serves only to waste everyone’s time. A lot of people have been unfortunately indoctrinated with the notion that a map must have a legend, when they should be used sparingly.
What I would be keen to see is something which expresses this economy of design, and this easy legibility, but does not use type. I’m sure there are examples out there, and it’s something I will have to ponder in my own future work.
Today I have decided to begin offering free PDFs of all the maps that I sell prints of.
There’s a fine line that a lot of people walk when putting their art online. You want people to be able to see (or hear) your work, but you also want to maintain some control over your intellectual property so that people don’t go passing it off as their own or profiting from it while you see nothing. And, if you’re selling something, why would people pay you for it if they can get it free? But, then again, people are less likely to buy when you only share a sample of your work — they can’t be wholly sure of what they’re getting until they’ve handed over their money. And so the arguments go back and forth.
Setting aside my fears, and feeling filled with a bit of faith in humanity, I have decided to embrace openness in the belief that the positive will outweigh the negative, that most people will not harm me, and they will be offset by those who will be kind to me. I have seen it work for others (though, it should be noted, that success stories tend to circulate; artists who are harmed by this model probably don’t get a lot of press).
If you click the link near the top of the page that says “Storefront,” you can see a PDF of any of the works that I’m selling at any level of detail you want. If you want to download the PDF and pay nothing, so be it. If you wish, though, you can also voluntarily donate to me via PayPal based on what you think my work is worth (and what you can afford). So, if you’d like to just print the map yourself and pay me directly, rather than ordering through Zazzle, now this is easy to do. Or if you’d like to print the map off and pay me nothing, that’s fine, too.
I also dreamed once of my river maps having some sort of educational use, so putting them out there free may encourage that far-off dream, as well.
I admittedly have little to lose from this — I rarely sell prints, and I am making these for my own satisfaction first and foremost. I’m slowly generating an atlas, and while I may offer copies of it to interested purchasers, I’m mostly doing it because I want to be able to hold a book of maps in my hand and know that I made them all.
But I’m also doing this because I’m secretly an idealist (with all the inherent irrationality), and I find the notion of a world in which people pay what they want for art to be attractive. Others have gone down this path, and I thought it was time I tried it, as well.
Edit: Now with extra licensing! As per Marty’s suggestion below, I have marked the download links with a Creative Commons license, specifically the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
I have nearly recovered sufficiently from an amazing NACIS conference, and I think I’m ready to get back to a little blogging. This time around, I’d like to present you all with an unfinished concept, and to ask you for your help in carrying it to completion. Specifically, I’d like to show you some attempts I’ve made at improving digital hillshades (I’ll be randomly switching terminology between ‘hillshade’ and ‘shaded relief’ throughout).
Automated, straight-out-of-your-GIS hillshades are usually terrible, and it generally takes some extra cleanup work to get them to the point where they aren’t embarrassing or won’t burst into flames simply by being put next to a well-executed manual shaded relief. Here’s an example I stole from shadedreliefarchive.com which illustrates the problem:
The computer doesn’t see the big picture — that every little bump in elevation can sum to a large mountain, or that some bumps are more critical than others. It treats everything the same, because it can’t generalize. What we’re left with is noise, rather than an image. But most of us, including myself, haven’t the talent to do a manual hillshade. We are left with two options: steal one from shadedreliefarchive.com, or do a digital one and try to find ways to make it look not terrible. In this post, I’m going to talk about some new (or, at least new to me) ways of doing the latter.
To begin, here’s a bit of Mars, from a project I’m doing about Olympus Mons, given an automated hillshade through ArcMap’s Spatial Analyst tools.
As in the earlier example, this image is way too noisy and detailed, especially in the rough area west of the mountain, Lycus Sulci. The common answer to these problems is to find ways of reducing the detail in the DEM so that those annoying little bumps go away, but the big stuff remains. Usually this is done by downsampling, blurring, median filters, and a few other more sophisticated methods that I don’t have time to explain in detail. For starters, check out Tom Patterson’s excellent tutorials at shadedrelief.com, and Bernhard Jenny’s gasp-inducing tools at terraincartography.com — both of these resources can take you a long way toward improving a digital hillshade.
Both of these are an improvement over the original. The major valleys in Lycus Sulci become more apparent, and the flatter plateau regions there are no longer obscured by a myriad of tiny bumps. At the same time, though, while we’re losing unwanted details in the Sulci, we’re also losing desirable details elsewhere, especially along the escarpment of Olympus Mons and the gently sloping mountain face. In places like these, where the terrain is not so rough, we can support a finer level of detail than in the Sulci.
What we need is a way to keep 100% of the original detail in the smooth places where we can support it, and to generalize the terrain where it’s too rough. To do this, we need a way of figuring out where the terrain is rough and where it isn’t. To do this, I originally started looking at variations in terrain aspect — which way things are facing, since the rough areas have a lot of variation in aspect, and the smooth areas have relatively constant aspect in one direction. But, that’s a somewhat complicated path to go down (though it works well), so instead I’m going with a simpler method that’s probably just as effective: I’m going to look at the variation in my initial hillshade, above. If I do some analysis to find out where the hillshade is seeing a lot of variation — many dark and light pixels in close proximity, then that will give me a mathematical way of separating the smooth from the rough areas.
Here, I’ve calculated the standard deviation of the hillshade (using a 12px diameter circle window), and also blurred it a bit just to smooth things. The darker areas correspond to the smoothest terrain, and the bright areas are where we find a lot of jagged changes, such as in the rugged Sulci. Notice that even though the escarpment is steep, and the plain at the top center of the image is flat, both are dark because they’re relatively smooth and would be good places to keep lots of detail in our final image. In the end, what I’ve really done here is take a look at my initial, poor hillshade, and find out where the noisiest sections are. I think the analogy to image noise reduction is valuable here — we’re trying to reduce noise in our image, so that the major features become clear.
So now I’ve got a data set which tells me a degree of ruggedness or noisiness for different parts of the terrain. There are other ways to get the same effect — you could do a high-pass filter, or the aspect analysis I mentioned above, or perhaps look at curvature. This is just my way of measuring things.
Once I have this data set, I can move on to the fun part. What I want to do is use this to figure out where to keep details and where to lose them. I’m going to use this thing to do a weighted average of my original, high-detail DEM, and a much more generalized DEM. Where the terrain is very rough, I want the resulting data set to draw from the generalized DEM. Where it’s very smooth, I want it to use the detailed DEM. Where it’s in-between, I want it to mix both of them together, adjusting the level of detail in the final product based on the level of roughness in the terrain. In more mathematical terms, I want to use this thing as the weight in a weighted average of my original DEM and the generalized one.
The general formula looks kind of like this:
((Generalized DEM * Weight) + (Detailed DEM * (WeightMax – Weight))) / WeightMax — where Weight is the value of our noisiness data set. Each pixel in the final output is a mix of the original DEM and the generalized one. Where there’s a lot of variation in the terrain, our Weight is very high, so we get a result that’s mostly the generalized DEM and very little of the detailed DEM. Where terrain is smooth, Weight is low, and we see mostly our detailed DEM.
Here’s the output, once it’s been hillshaded:
The smoothest areas retain all of their original detail, and the roughest areas are much more generalized. It’s a combination of the first two hillshades near the top of this post, with the best of both worlds. It could still use some tweaking. For example, in the Lycus Sulci, it’s still blending in some of the initial DEM into the generalized one, so I could tweak my setup a bit, by requiring the noisiness index to fall below a certain number before we even begin to blend in the detailed DEM. Right now the index runs from 0 to 100. So, an area with a noisiness of 80 would mean that we blend in 20% of the detailed DEM and 80% of the generalized. If I tweak the data set so that the new maximum is 40 (and all values above 40 are replaced with 40), then more of my terrain will get the highest level of generalization. Any place that’s at 40 (or was higher than 40 and has become 40) will get 100% of the generalized DEM and 0% of the detailed one.
Here’s what we get:
And here it is compared to the original relief:
Notice how seamlessly the two images blend together along the mountain slope — each of them has the same high level of detail. But in the Sulci, where we need more generalization, the improvement is manifest. For comparison, here’s my generalized DEM vs. the original before blending the two. The loss of fine texture detail on the mountain slope and especially along the cliff face becomes apparent here:
So, there you have it. I feel like this is still a work in progress, that there are some other places it could go. Is this the best way to figure out how to blend the two DEMs together? Should I even be blending at all? Is this even a problem that needs solving? I am a bit unhappy with the median filter, I will say — it’s a classic of noise reduction, but it tends to leave things a bit…geometric. Here’s a more extreme example:
There’s a balance still between cutting out detail and the artificial look of the median filter. I have also tried blurring, but then everything looks blurry, unsurprisingly. I’d like something that can cut out details, but keep sharpness. I may go back and use Terrain Equalizer some more to generate the blending base. But all this fits more on the side of “things you can use to blend into your detailed DEM,” and the main point I am writing about here is the blending concept.
So, I invite you, gentle reader, to give me your input on where this can go, if it has any potential, and how to improve it. I think, after some weeks of work on this and a number of dead ends, my brain can take this no further without a break.