English

How To: Obtain decimal precision for direction from EUCDIRECTION function or Straight Line tool

Summary

Instructions provided describe how to obtain decimal precision for direction from the EUCDIRECTION function or Straight Line tool. The EUCDIRECTION function calculates the direction, in degrees, that each cell-center is from the cell-center of the closest source. This is the equivalent operation to the Create Direction option of the Spatial Analyst Distance or Straight Line tool. The output in either case is an integer grid.

Some instances may require floating point precision output. The POINTDIST function has an option to calculate direction that returns floating point results.

Procedure

Convert the source raster to a point dataset. Use one of the following methods:

  • GRIDPOINT function in Workstation Grid:

    Code:
    dir_grd = POINTDIST (pnt_data, NONE, <cell size>, DIRECTION)

  • GRIDPOINTSHAPE in the Raster Calculator of Spatial Analyst.

  • Convert > Raster To Features from the Spatial Analyst toolbar.