horizon

IPW User Command
Category - Topographic Calculations


NAME

horizon - find angles to local horizon along rows of elevation file

SYNOPSIS

horizon -a azimuth [ -d delta ] [ -z zen ] [ -u cos ]
      [image]

DESCRIPTION

Horizon is part of a suite of radiation, solar, and topographic geometry tools that are part of the IPW system

Horizon computes the local horizon angles toward the direction azimuth, where azimuth=0 is toward the south and positive angles are counter-clockwise.

horizon reads elevations from image (default: standard input) and writes to the standard output an image whose pixels encode the local horizon angles in the direction azimuth degrees (ranging from -180 to 180) from south (positive east). The value of each output pixel is the cosine of the angle from the zenith to the pixel's horizon in the forward (increasing sample coordinates) direction. (Note than this value is also the sine of the angle from true horizontal to the pixel's horizon.)

OPTIONS

-a azimuth
The direction of forward azimuth (i.e. increasing samples along a line) is azimuth degrees east of south (-180..180).

-d delta
grid spacing (default: get grid spacing from the "geo" header or set to 1 if no "geo" header). Must be greater than 0. The units should be the same as for the elevations.
-P nthreads
number of threads to use, default=1 (parallel processing)

The following options change the output from linearly quantized

cosines to a 1-bit mask in which 1's indicate horizon angles

greater than a specified threshold. They are typically used to

specify a solar zenith angle, the output being a mask of pixels

where the sun is visible.

-z zen
mask horizon angles with greater than zen degrees (0..90).

-u cos
mask horizon angles with cosines greater than cos.

OPERANDS

[image]
elevation image (stdin)

EXAMPLES

To compute northwest horizons:

	horizon -a -135

To produce a mask of all northwest horizon angles greater than 45 degrees:

	horizon -a -135 -z 45

(i.e., any pixels that would be shadowed by adjacent terrain at this solar zenith and azimuth would be masked as 0.)

FILES

     $WORKDIR/horizonNNNNN
     	temporary command file, removed when horizon exits

DIAGNOSTICS

spacing in geodetic header ignored

The -d option overrides any pixel spacing information in the input image.

both -u and -z specified, -z over-ridden

If both -u and -z are specified then -z is ignored.

input file has nbands bands

The input image must have only 1 band.

only 1 line in input image only 1 samp in input image

The input image must have at least 2 lines and 2 samples.

input file has no LQH, raw values used no geodetic header, spacing set to 1.0

These deficiencies in the input image will introduce linear errors into the horizon calculations.

RESTRICTIONS

horizon is a shell script than skews and/or transposes the input image to orient its scan lines in the direction azimuth, then calls hor1d to perform the actual horizon calculations.

HISTORY

Jul 1990
Written by James Frew, UCSB. Base IPW routine (Frew, 1990)

BUGS

None that we know of

SEE ALSO

IPW
General:
skew, transpose

Watershed Scale Modeling:
solar geometry: solar, sunang, sunlight, sunweights
terrain processing: gradient, hor1d, shade, viewcalc, viewf
solar radiation: elevrad, toporad, toporad.24, topquad, twostream
thermal radiation: tcloud, thermin, topotherm, trad, vptr
radiation over snow: albedo, glob.alb, salbedo, selevrad, stoporad

Global Scale Modeling:
solar geometry: gsunlight
terrain processing: ggradient, ghorizon, gshade, gviewf, gviewf-mp
solar radiation: gelevrad, gtoporad, gtoporad.24, gtopquad

Marks 1979, Dozier 1980, Dozier Bruno 1981, Dozier 1990, Dubayah 1990, Frew 1990, Marks 1991


IPW documentation / Last revised 9 November 2015 / IPW web site