Home

User Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Contributor Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Quick Links

Software Manual
AstroDiscuss
GitHub
API Reference

Documentation Versions

Public Release
8.1.0
8.0.0
7.2.0
7.1.0
7.0.0
6.0.0
3.9.0
3.5.0

ISIS 2

Documentation
Tutorials
Technical Documents
USGS

ISIS Application Documentation


slpmap

Standard View | TOC | Home

Create slope, aspect, or percent slope data cube.

Description
Categories
Groups
History


Description

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:

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:

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.


Categories


Parameter Groups

Files

Name Description
FROM Input cube
TO Output cube

Output Options

Name Description
OUTPUTOutput type: slope, aspect, or percent slope
UNITSUnits of the output image

Scaling Options

Name Description
PIXRESDefines the pixel resolution (width and height)
CONVERSIONConversion from z to spatial units
RESOLUTIONPixel resolution

Files: FROM

Description

Use this parameter to select the input cube.The algorithm is applied to all bands of a multiband cube.

Type cube
File Mode input
Filter *.cub

Files: TO

Description

Use this parameter to define the filename of the resultant slope, aspect, or percent slope cube.

Type cube
File Mode output
Pixel Type real

Output Options: OUTPUT

Description

This specifies the type of output pixels that will be created. The output file will contain either slope, aspect, or, percent slope.

Type string
Default SLOPE
Option List:
Option Brief Description
SLOPECreate slope cube This creates a slope cube.
ASPECTCreate aspect cube This creates an aspect cube. That is, the direction/azimuth of the slope.

Exclusions

  • PIXRES
  • RESOLUTION
  • CONVERSION
PERCENTSLOPECreate percent slope cube This creates a slope cube whose pixel values are percentages (slope/90) instead of angles.

Exclusions

  • UNITS

Output Options: UNITS

Description

Units of the output pixels

Type string
Default DEGREES
Option List:
Option Brief Description
RADIANSOutput pixels in radians The output pixels will be in radians, between 0 and PI/2 for slope and 0 and 2PI for aspect.
DEGREESOutput pixels in degrees The output pixels will be in degrees, between 0 and 90 for slope and 0 and 360 for aspect.

Scaling Options: PIXRES

Description

This determines how the resolution of the input pixels will be defined.

Type string
Default AUTOMATIC
Option List:
Option Brief Description
AUTOMATICAutomatically compute the resolution per pixel using the map projection The program will use the map projection to compute the resolution (X and Y) of each pixel to ensure the slope is computed properly. This option requires that the input cube be a radius file, a cube in which the DN values represent the radius of the target at that point. The cube cannot have negative DN values.

Exclusions

  • RESOLUTION
  • CONVERSION
FILEPixel Resolution of FROM cube's projection. The input cube must be projected if this option is selected. The pixel resolution will come from the mapping group of the input cube. This option should be used when the input cube has elevation values instead of radius.

Exclusions

  • RESOLUTION
USERUser defined pixel resolution If the input cube does not have a map projection, this option can be used to define the resolution, which is assumed to be square. A single resolution is used for the entire image in both the X and Y directions. Note: If the pixel height varies significantly from the width, the slope will not be computed correctly.

Scaling Options: CONVERSION

Description

This parameter is a multiplicative factor for the resolution. It is used to convert the spatial units (pixels) to the correct distance units. Since the slope algorithm depends on cancelling out the units, the conversion factor from the z vertical (input pixel) units to the xy horizontal (spatial) units needs to be considered. For example, if the xy units are in meters and the z units are in kilometers, the unit conversion factor should be 1000 as we are converting z kilometers to xy meters. The default presumes the units are the same.

Type double
Default 1.0

Scaling Options: RESOLUTION

Description

Defines both the X and Y pixel resolution to be used across the entire image. Note that if the pixel height varies significantly from the width, the slope will not be computed correctly.

Type double

History

Brian Peck2006-12-25 Original version
Steven Lambright2008-10-06 Changed slope and aspect algorithms
Jeff Anderson2012-08-02 Changed the slope algorithm to compute the sample and line resolution at each pixel. Previously the algorithm used the resolution at the center of the image. In projected images the resolution varies as you move away from the latitude and/or longitude of true scale. Also, improved the documentation and added user options to output percent slope.
Debbie A. Cook2012-12-10 Removed unused Projection.h include. References #775
Stuart Sides2013-01-30 Backward Compatibility Issue: Changed the default output to be slope rather than percent slope. Backward Compatibility Issue: Removed ability to supply a conversion factor when using the automatic resolution option (CONVERSION=AUTOMATIC). AUTOMATIC, assumes the DNs in the cube have units of meters. Added a test to the CONVERSION=AUTOMATIC option so DNs in the cube with negative values will cause a better error to be shown. Added a BANDBIN group to the output cube labels.
Kimberly Oyama2014-03-28 Added the FILE option to the PIXRES parameter. This allows the user to specify that the pixel resolution from the input cube's projection should be used. Updated the documentation. Fixes #1764.
Lauren Adoram-Kershner and Kaitlyn Lee2020-03-27 Reformatted documentation. Fixes #3562.