MapWinGIS:Utils GenerateHillShade

This is a back-up of the WIKI.
Not all links might work
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy


Generates a hillshade image for a raster data source.
This code was written by Matt Perry,, published in Gdal-dev Digest, Vol 19, Issue 20
Note: Scale for Feet/Latlong use scale=370400, for Meters/LatLong use scale=111120 (based on the GRASS GIS algorithm from r.shaded.relief)

VB6 and VB.NET Usage

Function GenerateHillshade(bstrGridFilename As String, bstrShadeFilename as String, [Z as Single = 1.0], [scale as Single = 1.0], [az as single = 315.0], [alt as Single = 45.0]) As Boolean


bstrGridFilename The input raster data. This can be in virtually any raster data format.
bstrShadeFilename The output image filename. This can be virtually any image format, the extension will determine the format.
Z Z Factor. Defaults to 1.
scale Scale Factor. Defaults to 1.
az Azimuth. Defaults to 315.
alt Altitude. Defaults to 45.

VB.Net Usage

    Private Sub GenerateAHillshade()
        Dim utils As New MapWinGIS.Utils()
        utils.GenerateHillShade("c:\input.tif", "c:\shaded.bmp", 1, 1, 315, 45)
    End Sub

Retrieved from ""

This page has been accessed 1,799 times. This page was last modified on 19 December 2005, at 13:39.