Example: Import an ESRI ADF File and Apply Style and Hillshading

In this example we import an ESRI ADF format file that provides a raster terrain elevation data set for the region near Yosemite National Park in the United States.   The data set imports as an image.  We then use Style to style the image and to provide hillshading.


See this example on YouTube at the Radian / Viewer - View an ESRI ADF File Showing Yosemite video.   This topic has been updated, but the video does not incorporate the latest improvements in Manifold.  The video is still useful.




As discussed in the ESRI ADF topic we use File - Import to import the ADF by opening the hdr.adf file that is in the folder containing the ADF files for Yosemite.




That creates a table in the project plus an image that shows the table.   When we double-click on the image to open it we see it is in grayscale.   We can improve the appearance by coloring the image with a palette, using the Style dialog.




In the Style panel we click on the right side of the style properties button, a shortcut way of opening up the dialog directly to the settings we want.


ADF files are imported as a single channel applied to color a palette image, using a gray-scale, interpolated palette that runs from black to white.   The intervals panel shows the range of heights in the data, from 90 to 4000.   Given the location, we can guess without searching for any documentation on this particular data set that the heights are in meters.




In the Style dialog we use the default Breaks value of 5 and then we press the Tally button.  We press the Apply palette button (to the left of the disabled Delete toolbar button in the illustration above) and apply the Altitude palette from the Classic palettes submenu.    We choose closest lower value as the Fill method and then we press Update Style to apply the changes.




The result is a display colored by height, with discrete color ranges applied instead of smoothly interpolated color ranges.    That is a useful effect when we want to indicate crisp altitude ranges, almost like showing contours by swaths of different colors.


To apply hillshading we click the Options tab in the Style panel.




 We check the Use shading box to apply hillshading and then press Update Options.




That produces a comprehensible display, but the hillshading is too dark and aggressive.




Back in the Options tab we change the Z scale from the default value of 1 to a value of 0.1 and then we press Update Options.




That's better.   Using a lower multiplication factor for Z scale reduces the apparent verticality and thus reduces shadows.



We Alt-click on the image's tab to undock the image window and then resize it to make it larger, pressing the Zoom to Fit button to expand the view to fill the larger window.  That gives us a better view of the data.  


The famous Yosemite Valley known to millions of tourists is the seemingly narrow valley running horizontally across the image about one third of the way down from the top.  



What does interpolate do as a Fill method?  - In the example above we used closest lower value as the Fill method.   Suppose we used interpolate?




In the Image tab we change the Fill method to interpolate and then we press Update Style.




The result is a smooth interpolation of colors applied to pixel values between the bounds of ranges.   For example, a light green color is used for 90 meter and a beige color for 1068 meters.   Pixels with heights between 90 and 1068 will be colored with an interpolation of color between light green and beige.




After visiting the Options tab to reapply hillshading using a Z scale value of 0.1 we get the display above.




Undocking the map into a larger window and zooming to fit, we see the smoother effect interpolation provides.


See Also



Style: Images


Example: Autocontrast and Hill Shading Images using Style - This example shows how the Edit - Style dialog can hill shade an image using the values of pixels as heights and generating shadows as if the Sun were located at the specified azimuth and altitude.   This capability is used most frequently with raster images to give an impression of three dimensionality in cases where the values of pixels represent terrain elevations.