UW Home GIS@UW Search GIS@UW


The LineSlope Analyst ArcView 3.x Extension

Overview
Requirements
Loading
Running
Algorithm


Overview

The LineSlope Analyst Extension is an ArcView 3.2 Extension. The extension calculates percent slope for each line in a line theme, based on a grid Z value theme.

 

Requirements

The LineSlope Analyst has several minimum requirements:

 

Loading the LineSlope Analyst

    1. Download the extension (lineslope.avx).
      1. Place the extension in the ArcView samples extension directory, $AVHOME/samples/ext (if you ARE using the sample extensions directory. If you are not sure whether you are using sample extensions, look in ArcView Help for the topic USEREXT).
      2. Place the extension in the main ArcView extensions directory, $AVHOME/ext32 (if you are NOT using the sample extensions directory).

    2. From the File > Extensions menu, find the LineSlope Analyst Extension:



    3. Check the checkbox for the extension. Note that the About box describes a little about the extension.

    4. The extension will add a single button to the View GUI, which has a popup description . The button will be greyed out and unavailable if the view does not contain a line theme and either a grid theme or a TIN theme.

      The status bar at the lower left of the ArcView application window will also display a little more help.

           

    5. You must also have the 3D and/or the Spatial Analyst extension(s) loaded.


 

Running the LineSlope Analyst Extension

  1. Load a line theme whose table is editable.



  2. Load a grid or TIN theme. This theme will serve as the Z value source for calulating slope. When you have these themes loaded, the LineSlope button will be available.



  3. Click the LineSlope button .

  4. Select the line theme for which you want to calculate slope values.



    If the line theme table cannot be edited, you will see the error message box:



  5. Select the surface theme. Both grid themes and TIN themes will be displayed.



  6. After you click OK, the process will progress. ArcView's application window title bar will show the progress:


         
              

  7. The title bar will indicate when the process is complete:

                   

  8. The theme table will have a new field added (Line_slope) and the value per record calculated as described below. If either line endpoint falls outside the surface, the line slope will be calculated as -99.99.



    Here is a view with road lines displayed in a graduated color classification based on calculated slope (higher slopes are deeper red):

 

The LineSlope Analyst Algorithm

The LineSlope Analyst algorithm is simple. For each line:

    1. Line length is calculated with the aShape.ReturnLength request.
    2. The start and end point is obtained with the aPolyLine.Along (aPercentage) for the percentages 0 and 100, respectively.
      1. Each point's Z value is obtained using either the aSurface.Elevation (aPoint) or the aGrid.CellValue (aPoint, aPrj) request, depending on whether the Z theme is a TIN or a grid.
      2. The absolute value of the difference between the minimum and maximum Z values.
    3. Slope is calculated as (Zdifference / length * 100%), which in generic mathematical terms is ((rise / run) * 100%).
    4. If either end point has no calculated Z value (i.e., the point is outside of the Z theme data extent), the slope is given the "no data" value of -99.99.

Phil Hurvitz, GIS Specialist
phurvitz@u.washington.edu

Copyright © Phil Hurvitz, 1998-2007