MapInfo Pro

 View Only
  • 1.  MapInfo Monday: Hill Shading

    Employee
    Posted 11-20-2023 02:43

    Happy #MapInfoMonday

    Today we will dive a bit into the world of raster again and look at how you can use hill shading to bring out specific features in your raster.

    Hill Shading creates a hypothetical illumination of your raster by specifying the position of a hypothetical light, for example, the sun. This position is given by the direction from where the light is coming and the height from where it is coming.

    The typical direction is North-West (315 degrees) and a height of 45 degrees. This can be changed to help bring out other features in your raster.

    Below is a dynamic GIFF showing the change that different directions can have on your elevation raster. The GIFF starts from a Northern direction, goes via East and South, and ends up coming from a North-Western direction. The GIFF holds 8 different directions in total.

    Let's start from the beginning. Here is an example of a raster grid where the Hill Shade has been turned off. If you select the elevation raster grid in the Layer List, you can find the Hill Shade control on the Style tab. It can also be found on the Raster tab.
    Let's try to turn on Hill Shade by checking the Sun Shadow option.
    As you can see, this immediately brings out other features in your raster grid. It is much easier to detect changes in slope and direction. Also, notice how you can see the roads in horizontal and vertical directions in the middle of the map.
    If you change the altitude, the raster grid seems to get more bright as the hypothetical sun now can shine down on additional cells.
    You can turn off Sun Highlight but still keep Sun Shadow turned on. Below you can see the result. The raster grid will typically get darker as the Highlight will brighten the raster grid.
    The options from the Hill Shade dropdown are the most commonly used settings. From the Advanced Hill Shade Options... at the bottom of the Hill Shade dropdown, you can access a window that gives you even more control.
    Using the Hill Shade window, you will be able to set different Angles and Elevation for the two light sources that control the shadow and the highlight. In the example below, I have specified different Angles. You can change the values using the drawings or by entering specific values in the fields under the drawings.
    You can even control the Intensity, Saturation, and Shadow values for the Sun Shadow and the Intensity value for the Highlight.
    You can check the Apply Automatically option to immediately see the changes or uncheck this option and click the Apply Settings button to see the changes.
    I hope you found this useful. The raster grid used in this example comes from the WashingtonDCSample workspace that you can find in the SampleWorkspace folder in the MapInfo Pro installation folder.


    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------


  • 2.  RE: MapInfo Monday: Hill Shading

    Posted 11-21-2023 16:08

    Hi Peter, Another technique with shadow I have always found useful is to use it to highlight the edge of raster cells.

    To do this you need to use nearest neighbor interpolation so that there is only a shadow on the edge of cells where there is an abrupt change in data value.

    It helps you to see the cell edges and I often use it to understand individual cell values in rasters.

    Also, if you have a classified raster where some classifications have the same color, then this can help you identify areas where the cell values change, but the coloration does not. The example picture is Catchment Scale Land Use of Australia 2020. The pink area has two different classification codes which becomes apparent when the shadow shows the cell value transition.

    Catchment Scale Land Use of Australia – Update December 2020



    ------------------------------
    Sam Roberts
    Founder, Roberts Geospatial Engineering
    Australia
    ------------------------------