
vslope(1)                    Khoros                     vslope(1)

PROGRAM
     vslope - Compute slope and aspect images from elevation
     data.

SYNTAX
     vslope

     -i             input image

     [-s]           slope image

     [-t]           aspect image

     [-z]           Value for Regions With no Aspect (flat)

     [-so]          slope options:
                    0 (Output Slope in Degrees),
                    1 (Output Slope in Radians),
                    or 2 (Output Slope in Percent Rise)
                       [default = 0]

     [-to]          aspect options:
                    0 (Output Aspect in Degrees),
                    1 (Output Aspect in Radians),
                    or 2 (Output Aspect in Quadrants)
                       [default = 0]

     [-V]           Gives the version for vslope

     [-U]           Gives the usage for vslope

     [-P]           Prompts for command line options

     [-A [file1]]   Creates the answer file called vslope.ans or
                    file1

     [-a [file1]]   Uses vslope.ans or file1 as the answer file

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 com-
     mand line argument '-os'.

             The aspect of the elevation image tells which direc-
     tion 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 geo-
     graphical 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 con-
     verted 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 transfered 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
     -s     type: outfile
            desc: slope image

     -t     type: outfile
            desc: aspect image

     -z     type: float
            desc: Value for Regions With no Aspect (flat)
            default: 0
            bounds: no range checking

     -so    type: integer
            desc: slope options
            allowed values:
            0 (Output Slope in Degrees),
            1 (Output Slope in Radians),
            or 2 (Output Slope in Percent Rise)

     -to    type: integer
            desc: aspect options
            allowed values:
            0 (Output Aspect in Degrees),
            1 (Output Aspect in Radians),
            or 2 (Output Aspect in Quadrants)

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
     intro(1), verror(3), vgparms(3), vutils(3), lvslope(3)
     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 transfered
     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.

COPYRIGHT
     Copyright 1991, University of New Mexico.  All rights
     reserved.

Khoros                    Release: 1.0                          1

