By Charlie Frye, Esri Chief Cartographer
![]()
We’ve blogged about symbolizing hillshades (rasters that are derived from elevation raster datasets, like DEMs, via the Hillshade tool), but never really covered the basics of the data used to create hillshades, so we wanted to take a minute and share a few best practices we’ve been adopting.
Before getting started, though, it’s worth noting that we’ve been storing our rasters in file geodatabases. For us, these included some rather large hillshade datasets, ranging between 5Gb and 60Gb.
Pyramid resampling technique
First, the default pyramid resampling technique for rasters is Nearest Neighbor. For hillshades, we prefer Bilinear — it looks smoother and results in fewer abrupt changes in the gradation of shading.
8-bit unsigned integer data
Second, hillshades can be generated from elevation data as well as non-elevation data that represents a statistical surface. You we can take advantage of the fact that the values in a hillshade always range from 0 to 255. The Hillshade tool by default produces output that matches the input data. A typical elevation raster is a 16-bit signed integer, which allows for elevations above and below sea level and for the values to be stored in either of the typical units (meters or feet). Using the Copy Raster tool, these hillshade data can be converted to 8-bit unsigned integer rasters. The advantages of doing this are: 1) reduced file size, and 2) the ability, for large hillshade datasets, to rapidly access the histogram for symbology purposes.
JPEG2000 Compression
Third, the default output from the Hillshade tool uses LZ77 compression; we’ve found the JPEG2000 compression is even better.
Implications for file size
We’ve found that by combining the use of 8-bit unsigned integer data with the JPEG2000 compression, we cut our file sizes nearly in half.
Here’s an example using Oahu:

The default is normally 16 bit signed integer with nearest neighbor pyramids and LZ77 compression. The file size is 2.26Mb.

Converting to 8 bit unsigned integer data with default nearest neighbor pyramids and LZ77 compression, the file size drops to 1.8Mb.

Using all the settings described above, the 8 bit unsigned integer data with bilinear pyramids and JPEG2000 compression results in a file size of only 1.4Mb.
Notice that there is no difference between the first two images (outside of the nearly 25% file size savings). Keep in mind that the above images are showing pyramids, i.e., not the highest resolution; these hillshades look identical at full resolution.
3 Responses to Tips for hillshade data management
Leave a Reply
You must be logged in to post a comment.
The pyramid and compression settings for rasters are geoprocessing environment settings. To change them:
1. Click Tools on the Main menu of the application you are using and click Options.
2. Click the Geoprocessing tab.
3. Click the Environments button.
4. Click Raster Storage Settings.
5. The Build pyramids check box is checked by default. If you previously unchecked it, check it.
6. Click the Pyramid resampling technique drop-down arrow and click the bilinear resampling technique.
7. Click the Compression drop-down arrow and click the JPEG2000 option.
8. Click OK to close the Environment Settings dialog box, and click OK to close the Options dialog box.
Note that this only works for formats that support 8bit – GRID format does not, so this will not work for GRIDs.
[...] Tips for hillshade data management [...]