RETRO commands


PROGRAM NAME

vslope - Compute Slope and Aspect Images from Elevation Data (K1)

DESCRIPTION

vslope computes the slope and aspect images from an input elevation data.

The slope is always calculated as a positive number and represents the slope in the direction of the gradient at that point. The direction in which the slope is calculated depends only on the direction of the steepest gradient at the point. The slope may be computed in three forms: degrees, radians, and percent rise. Degrees and radians are used to measure the angle between a tangent to the surface at the point the slope is being calculated and a horizontal reference plane. Percent rise is a measure of how much the tangent rises with respect to the horizontal distance. For instance, if the tangent at a point rises 50 meters for every 100 meters horizontally, the slope is 50 percent. The form used for the output slopes is selected using the command line argument '-so'.

The aspect of the elevation image tells which direction the slope is facing. The aspect is reported in the direction of the increasing slope. The aspect may also be calculated in three forms: degrees, radians, and quadrants. Degrees and radians give the clockwise angle between the positive x-axis (right to left on the image and east in geographical terms) and the direction the slope is facing. For instance, if the slope is facing the top of the image (north) then the aspect will be 90 degrees or pi/2 radians. When reported in quadrants, the aspect is given a value that depends on the range the direction it faces. The circle is divided into 24 regions of 15 degrees each, and the region that the aspect falls in determines the value that will be assigned to it. North is always assumed to be at the top of the image, and East is always to the right. A table of the quadrant values is given below:

Aspect Value Range in Degrees Description
1 353 - 7 east facing
2 8 - 22 15 degrees north of east
3 23 - 37 degrees north of east
4 38 - 52 northeast facing
5 53 - 67 30 degrees east of north
6 68 - 82 15 degrees east of north
7 83 - 97 north facing
8 98 - 112 15 degrees west of north
9 113 - 127 30 degrees west of north
10 128 - 142 northwest facing
11 143 - 157 30 degrees north of west
12 158 - 172 15 degrees north of west
13 173 - 187 west facing
14 188 - 202 15 degrees south of west
15 203 - 217 30 degrees south of west
16 218 - 232 southwest facing
17 233 - 247 30 degrees west of south
18 248 - 262 15 degrees west of south
19 263 - 277 south facing
20 278 - 292 15 degrees east of south
21 293 - 307 30 degrees east of south
22 308 - 322 southeast facing
23 323 - 337 30 degrees south of east
24 338 - 352 15 degrees south of east
25 no aspect (flat)

The form of the output aspect is selected using the '-to' command line argument. When the surface has no slope, the aspect is undefined. The value that will be assigned for an undefined aspect is set using the '-z' option on the command line.

The input elevation file must be in viff format, and may be of type byte (VFF_TYP_1_BYTE), short (VFF_TYP_2_BYTE), int (VFF_TYP_4_BYTE), or float (VFF_TYP_FLOAT). The input data will automatically be converted to float, and both the slope and aspect output files will always be type float regardless of the input data type. Any type of map that is not forced (VFF_MAP_FORCE) is allowed on the input file, and the map will be transferred as is to the output. Explicit location data is not allowed in the input file, and will result in an error. The pixels in the input file are assumed to be evenly sampled where the sampling interval is given in the 'pixsizx' and 'pixsizy' fields in the viff header. The units used for the sampling interval are arbitrary but must be the same units that the elevations in the file use. The sampling interval is not allowed to be zero. Finally, the input file is restricted to a single image.

REQUIRED ARGUMENTS

-i
type: infile
desc: input image

OPTIONAL ARGUMENTS

-so
type: integer toggle
desc: slope options
default: 0
allowed values:
-to
type: integer toggle
desc: aspect options
default: 0
allowed values:
-z
type: float
desc: Value for Regions With no Aspect (flat)
default: 0
bounds: no range checking
-s
type: outfile
desc: output slope image
default: {none}
-t
type: outfile
desc: output aspect image
default: {none}

EXAMPLES

vslope -i elevation.image -s slope.image -so 2 -t aspect.image -to 2

This command computes both the slope and the aspect images from the input elevation image. "Elevation.image" is a float type image that is evenly sampled. "Slope.image" is the output slope image. It is type float, and the -so 2 option specifies that the slopes will be given in radians. "Aspect.image" is the output aspect image. It is also type float, and the -to 2 option specifies that the aspects will be given in radians.

SEE ALSO

vsurf(1)

RESTRICTIONS

vslope works on input images with data types byte (VFF_TYP_1_BYTE), short (VFF_TYP_2_BYTE), int (VFF_TYP_4_BYTE), and float (VFF_TYP_FLOAT), but the type of the output image will always be float regardless of the input type. Maps on the input image will be transferred directly to the output image, but forced maps (VFF_MAP_FORCE) are not accepted. Explicit location data is not accepted. The input image is restricted to one image per file.

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.