This program creates a new cube containing slope (radians, degrees, or percent) or aspect
(radians or degrees) data from an input cube. This program computes the slope and aspect of
an input cube and outputs the results. An individual slope, aspect, or percent slope cube can
be rendered using this program.
Data requirements to run slpmap:
- A digital terrain model (DTM) with DN values representing the radius or elevation of a
target body, or
- Any ISIS cube that is a level 1 or level 2 image (can be multiband).
Horne's algorithm is used to compute the slope or aspect using a 3x3 kernel:
A B C
D E F
G H I
Aspect:
The aspect represents the direction or 0 to 360 degrees of the slope in pixel space (see
figure below). From the center pixel E, 0 degrees is straight towards B (generally north),
45 is towards C, 90 is towards F, 135 is towards I, 180 is towards H, and so on.
ASPECT EQUATION
[dz/dx] = ((C + 2F + I) - (A + 2D + G)) / 8
[dz/dy] = ((G + 2H + I) - (A + 2B + C)) / 8
aspect = 90 - ATAN2 ([dz/dy], -[dz/dx])
if (aspect < 0) then aspect = aspect + 360
Slope:
Slope is typically between 0 and 90 degrees, where 0 is flat and 90 is vertical. Slope may be
output in radians, degrees, or percent slope.
SLOPE EQUATION
[dz/dx] = ((C + 2F + I) - (A + 2D + G)) / (8 * X_PIXEL_RESOLUTION)
[dz/dy] = ((G + 2H + I) - (A + 2B + C)) / (8 * Y_PIXEL_RESOLUTION)
slope = ATAN ( SQRT ( [dz/dx]^2 + [dz/dy]^2 ) )
percentslope = slope / 90
The slope equation above assumes the pixels are not square, hence the two variables:
X_PIXEL_RESOLUTION and Y_PIXEL_RESOLUTION. That is, the x distance across the pixel is not
equal to the y distance from top to bottom of the pixel.
Pixel Resolution:
-
By default, the program will attempt to remove any scaling differences by using the map
projection information (PIXRES=AUTOMATIC). This computation is done at every pixel so the
correct x-to-y ratio is computed. This is important, for example, for global maps where
the x/y ratio deviates with distance from the latitude and/or longitude of true scale in
a map projection. This only works for radius DTMs and does not work for elevations.
-
The default setting PIXRES=AUTOMATIC will not work if the input cube Z units are in
elevation values instead of radius values. You will need to set PIXRES=FILE
(recommended for a map projected file) or PIXRES=USER. Note: unlike PIXRES=AUTOMATIC,
these later two methods do not correct for distortions in the map projection. They will
return good results for smaller regions when the map projection is defined to minimize
distortions (e.g. LROC NAC or HIRISE sereo DTMs).
-
If the image lacks a map projection, you must provide the pixel resolution via
PIXRES=USER (for this option the pixels are assumed to be square). You must also
provide a single value using the RESOLUTION parameter that will be applied to all pixels
in the image and in both directions.
Conversion:
The program assumes the xy units are the same as the z (pixel) unit by default
but allows you to scale the z units to the xy
units using the CONVERSION parameter if the PIXRES=USER option is selected.