Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Here is a pretty pic of the raster I am using - with no effects applied - just the color ramp and historgram adjusted to show out all the relief - all be it in a very 2D way!

enter image description here

I have a raster layer that I want to display with hillshade as a default. I can do this in code and in effect it is the same as selecting the Hillshade option in ArcMap (see below):

enter image description here

When you do this however - it looks rubbish:

enter image description here

Especially if you zoom into the raster you see all kinds of gridded articfacts - which does not look nice at all!

enter image description here

However if I create a proper Hillshade layer using the raster with Spatial Analyst and overlay it with transparancy of 85% it looks pretty good and very different!:

enter image description here

My question is in two parts really:

1) How can I acheive this effect in ArcMap and override the default functionality of the Hillshade option (I supsect this is impossible, or is it some setting I have missed out that is caused the raster to be displayed poorly). If it is possible to override or select the correct settings - is it possible to do in ArcObjects.

2) If option 1 is not possible, can I create my effect with creating a Hillshade layer (without using Spatial Analyst) and effectively fuse it to the orginal raster - i.e. I don't want people to see two layers in the table of contents in ArcMap. I just want one layer but with a default hillshade rendering of my choosing/configuration. I need to do this programmatically too i.e ArcObjects.

UPDATE 13 Jan 2012

OK - so thanks to everybody on here with their thoughts, some nice suggestions too and things I never knew existed. One thing I did learn is that you must have your DEM in the correct Spatial Reference and measurement units or the resulting hillshade looks too black and over exaggereated - check out this video to find out more - its a very good explanation.

So I think I now know what I need to do in regards to producing some high quality hillshading, but I think it's going to take some low level tweaking ArcObjects code. I am thinking I need to come up with my own graphics rendering and plug this into ArcMap (I have a dll that renders bitmaps of grids in a cool way). I think a good place to show this would be to override the Draw() event on something like the IRasterRenderer, and insert my own image rendering. Of course it might get a bit complicated with reprojections etc. Hmmmmm.

Has anyone done any kind of this low level graphics rendering in ArcMap - if so can you offer any guidance or things I should be aware of?

share|improve this question
1  
I've never done this, but I feel you can use IRasterRenderer to customize how to render a specific raster. If you have the two datasets (hill + regular) you can use a IRasterCursor to blend and draw each pixel together. –  George Jan 6 '12 at 12:18
    
Hmmm....interesting. –  Vidar Jan 6 '12 at 13:07
5  
For what it's worth, I just tried the same thing yesterday in ArcMap and it look terrible too. –  Chad Cooper Jan 6 '12 at 13:36
    
@George, I think a RasterCursor changes the CELL value - whereas I think I want to change the colour value - i.e. effectively changing its colour intensity based on a hillshade value - do you know how to changes specifc RGB values pixel by pixel? –  Vidar Jan 6 '12 at 14:09
1  
It looks like the "hillshading effect" is computed by first rounding the elevation values, which effectively turns your DEM into a lot of tiny abrupt terraces. If this is correct, it's unlikely you will find a solution: submit a bug report. You can work around the two-layer problem by grouping the grid and the hillshade layer. BTW, I believe this option is new in version 10; it would help to update the tags by indicating what version of ArcMap you're using. –  whuber Jan 6 '12 at 14:42

5 Answers 5

up vote 17 down vote accepted

Use Bilinear Interpolation resampling during display

You can somewhat improve the display by changing the resampling method used from the default Nearest Neighbor to Bilinear Interpolation. Layer Properties -> Display Tab -> Resample during display using: Bilinear Interpolation.

This effect works best with DEM and the default black and white color ramp.

You will get a much better result and a lot more control over the display when using 2 raster as you have already done. Make sure you also use the Bilinear Interpolation resampling method during display.

Add DEM:

enter image description here

Toggle "Use Hillshade Effect" on: enter image description here

Renders as follows on screen: enter image description here

Change resampling during display to Bilinear Interpolation: enter image description here

Renders as follows on screen: enter image description here

share|improve this answer
    
You are right in what you say - this does indeed get rid of the gridding artifacts - but the hillshading still looks awful. In a way, I guess the artifacts were a kind of secondary problem - as it is the hillshading that I really want to nail. But thanks for the effort in your answer! –  Vidar Jan 6 '12 at 14:33

I have always been instructed to increase the z exageration when doing hillshade.
I just tried 100 on mine and it seems a bit extreme.
Also changing the stretch type makes a big difference in the look of hillshade.
Since you are talking about how it looks you might also look at this help item. esir help
Which says that hillshading iis applied at the display pixel resolution.
And to change the illumination angle
Esri help
Also changing the direction and contrast

share|improve this answer
    
thanks. I always wondered what z: was for. –  Matthew Snape Jan 6 '12 at 23:34

When you say in item #2 "can I create my effect with creating a Hillshade layer (without using Spatial Analyst)", do you mean alternate applications for creating a hillshade?

If you want to use an application outside of Spatial Analyst, I just recently learned about (but never have used) the "SEXTANTE for ArcGIS extension" (free), which allows users to consume SEXTANTE tools in ArcMap. If you watch this video clip, you can see that they demonstrate ways to create a hillshade.

share|improve this answer
    
Not really - I just want to apply my own hillshading techniques without using ESRI's. I have added extra comments in my opening post. –  Vidar Jan 13 '12 at 15:28

If you are looking for a good looking hillshade that takes some time to create, but is great for larger projects where it will get a lot of exposure, you might try the Swiss Hillshade Method - it requires 3 layers, but you can then export them to one georeferenced tiff to save space and for portability. This method DOES require Spatial Analyst, I believe, so it is not a direct answer to OP's question, but may be useful to others looking at hillshade methods in ArcGIS. The method works in other GIS systems too, but the linked toolbox is for ArcGIS.

Edit 11/2014: Esri recently released a new tool for creating Hillshades. It look really slick and should fuse with the Asker's workflows. They introduce it here and you can download the code and installation instructions here

share|improve this answer
    
I've used this a few times recently. Very nice. Added to my go-to bag of tricks. Thanks for sharing. –  Kstoney Feb 29 '12 at 12:09
    
No problem - I'm glad you found it useful. It definitely makes a nicer hillshade, and I like that I can keep my layers around and just change the coloration on the dem to emphasize everything a little differently –  nicksan Mar 6 '12 at 21:48
1  
Thanks for this. also, in 10.1, the Raster Shader (blogs.esri.com/esri/apl/2013/05/02/…) gives much improved control over raster display and allows you to create nice hillshades. –  SoilSciGuy May 23 '13 at 18:20

Arcmap's on the fly hillshade, the method described, is quick and dirty and was never meant to replace the hillshade result from Spatial Analyst and/or 3D Analyst. Although the same term is used to describe both they are not the same at all.

To create a true hillshade without Spatial Analyst you might try GDAL's gdaldem:

gdaldem hillshade dem.tif shade.tif

The TileMill Terrain Data Tutorial has a nice overview of how to use gdaldem to build a composite hillshade with hypsometric tinting.
detail of hillshade and hypsometric composite relief

If the utility is not direct enough for your application the C++ source code for gdaldem is here.

share|improve this answer
1  
Good stuff! Especially like the idea of combining the results and of using the Hillshade as well as the slope. Never thought of combining those together. Will have to give it a try. –  Jakub Jan 13 '12 at 16:13
    
gdaldem is definitly the way to go for some GIS opertations over ArcGIS. Hillshading, I have learned, is definitly one of such operations. –  GIStack Jan 13 '12 at 18:05
1  
@jakub, if you like the idea of hillshade combined with slope and hypsometry, have a look at Tom Patterson's work on Cross-blended hypsometric tints and Producing Natural-Color Maps with Satellite Land Cover Data. The techniques discussed are aimed at overcoming the limitation with standard hypsometric tinting of the often inappropriate association of low-elevation-rich-greens with vegetation and high-elev-brown/red with deserts or barren lands. Well worth reading and studying. –  matt wilkie Jan 15 '12 at 5:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.