Controls in the Options tab of the Style pane manage hill shading and low-level resampling / rendering of images. This topic covers hill shading controls, which allow us to shade images that provide terrain elevation data, as if they were lighted by the sun from the given angle and azimuth.
Hill shading works when using an image created from a single channel.
Shading is off by default. The resulting display is flat color, for example, using closer lower value for a fill method, as seen above.
Checking the Use shading box turns on hill shading.
If the Options tab includes the warning Shading requires style to be based on a single channel, that indicates we are trying to apply hill shading using a (use RGBA channels) choice for the source, and have not selected a single channel as the source in the Image tab. We still can check the Use Shading box, but shading will take effect only when we switch the source to a single channel.
Options Tab |
|
Use shading |
Check the box to apply shading: Interpret the values of pixels as heights and adjust colors in the display to simulate the generation of shadows as if a light source were located at the specified Azimuth and Altitude.
Also called hill shading since the normal use is to shade images representing views of terrain to provide a 3D effect, as if the Sun was illuminating the hills and valleys and shadows provided greater relief. See the Example: Autocontrast and Hill Shading Images using Style topic. |
Azimuth |
The compass bearing to the light source, 315 degrees by default. |
Altitude |
The angular elevation, in degrees, of the light source, 45 degrees by default. |
Z scale |
Scaling factor for heights used when shading.. Increase the Z scale to increase the relative heights and thus the apparent shading effect. |
Update Options |
Apply any changes in the Options tab to the image. |
The default hill shading gives a 3D effect as if the terrain were elevated according to the values used for pixel grayscale, with the Sun shining from a direction of 315 degrees, that is, from the upper left, and at an altitude of 45 degrees, that is, about half-way up from the horizon to directly overhead.
The illustration below shows the imaginary placement of the Sun for the computation of shading effects, within a synthetic 3D view of the terrain (using greatly exaggerated differences in elevation, necessary since Florida is so flat...) as if we were flying over the region above one of the round ponds near the center of the image above and looking North.
For most people, applying hill shading with the Sun apparently shining from the upper left of the view provides the easiest to "read" view of shading where hills appear to pop up and depressions (such as craters) appear as low places. This avoids a false reading of shading effects as sometimes happens when looking at photos of the Moon in which craters appear to be round mounds instead of depressions. Many hill shading packages therefore use defaults of an azimuth of 315 and an elevation of 45 even though in many parts of the Northern hemisphere the Sun is always South of the line from East to West.
A Sun altitude of 89 means the Sun is almost overhead, lighting the scene to the brightest extent. As the sun lowers in the sky the scene will become increasingly darker, with low Sun angles creating highlights, as are indeed seen in reality.
Consider a terrain elevation image above, seen without shading.
Shading using Sun Altitude of 89 degrees and 65 degrees will darken the image slightly.
As the Sun sets in the sky to lower Altitude values, the image becomes darker. The model currently used by Manifold tends to darken the scene as occurs in reality. However, GIS presentations are often not about reality but a more appealing presentation. It could be that in response to community discussions Manifold will alter the model to provide brighter colors even with the Sun lower in the sky.
Shading requires style to be based on a single channel - If the Options tab includes the warning Shading requires style to be based on a single channel, that indicates we are trying to apply hill shading using a (use RGBA channels) choice for the source, and have not selected a single channel as the source in the Image tab.
We still can check the Use Shading box, but shading will take effect only when we switch the source to a single channel.
Style: Channels and Outputs Tutorial
Style: Contouring using Colors
Example: Create Two Images From One Table - More than one image can show data from the same table, including from the same tile field.
Example: Change the Contrast of an Image - In this example we use the Style pane to change the contrast of an image.
Example: Using the Assign Channels Button - The Assign Channels button in the Style pane for images allows us to assign channels to the standard three Red, Green, and Blue display outputs using frequently-desired arrangements. The button provides a short cut way to assign all channels at once instead of doing each channel individually.
Example: Assign Channels - How to use the Style pane for images to assign channels to display outputs such as R, G, B or A. This topic shows examples of channel combinations and the visual results.
Example: Display an NAIP Four Band Image as Color Infrared (CIR) - How to use the Style pane for images to re-assign channels in a four band NAIP image to produce a Color Infrared (CIR) image display.
Example: Set Image Transparency using Alpha - The A row in the Style pane allows us to specify what transparency we want to apply to the image, either by applying the same value for A for all pixels or by using one of the other channels to also control the A value.
Example: Autocontrast and Hill Shading Images using Style - This example shows how the Style pane 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.
Example: Style Applied to an Image Server Image - Because the Style pane simply changes the way an image is displayed and not the data, it can operate on read-only data served by various web servers such as WMS REST servers. In this example we look at every detail of creating a data source using an image server and then manipulating the appearance of the display with Style. We will connect to a WMS server that provides LiDAR data in various forms, including as terrain elevation.
Example: Import CTG Grid Cell File and Style - A companion topic to the Example: Import GIRAS vector LULC File and Style topic. We import a CTG LULC Grid Cell file containing raster data showing land use and land cover and then we use Style to provide a more understandable display.
Example: Import DDF SDTS DEM Raster File - We import a raster data terrain elevation surface from USGS SDTS format using DDF files.
Example: Import GIRAS vector LULC File and Style - A companion topic to the Example: Import CTG Grid Cell File and Style topic. We import a USGS land use file in GIRAS vector format and then we use Style to provide a more understandable display.