bound.angle {asbio}R Documentation

Angle of azimuth to a boundary.

Description

The function calculates the angle of azimuth from a Cartesian coordination given in X and Y to a nearest neighbor coordinate given by nX and nY. The nearest neighbor coordinates can be obtained using the function near.bound.

Usage

bound.angle(X, Y, nX, nY)

Arguments

X

Cartesian X coordinate of interest.

Y

Cartesian Y coordinate of interest.

nX

Cartesian X coordinate of nearest neighbor point on a boundary.

nY

Cartesian Y coordinate of nearest neighbor point on a boundary.

Details

The function returns the nearest neighbor angles (in degrees) with respect to a four coordinate system ala ARC-GIS Near(Analysis). Output angles range from -180^{\circ} to 180^{\circ}: 0^{\circ} to the East, 90^{\circ} to the North, 180^{\circ} (or -180^{\circ}) to the West, and -90^{\circ} to the South.

Value

Returns a vector of nearest neighbor angles.

Author(s)

Ken Aho

See Also

near.bound, prp

Examples

bX<-seq(0,49)/46
bY<-c(4.89000,4.88200,4.87400,4.87300,4.88000,4.87900,4.87900,4.90100,4.90800,
4.91000,4.93300,4.94000,4.91100,4.90000,4.91700,4.93000,4.93500,4.93700,
4.93300,4.94500,4.95900,4.95400,4.95100,4.95800,4.95810,4.95811,4.95810,
4.96100,4.96200,4.96300,4.96500,4.96500,4.96600,4.96700,4.96540,4.96400,
4.97600,4.97900,4.98000,4.98000,4.98100,4.97900,4.98000,4.97800,4.97600,
4.97700,4.97400,4.97300,4.97100,4.97000)

X<-c(0.004166667,0.108333333,0.316666667,0.525000000,0.483333333,0.608333333,
0.662500000,0.683333333,0.900000000,1.070833333)
Y<-c(4.67,4.25,4.26,4.50,4.90,4.10,4.70,4.40,4.20,4.30)
nn<-near.bound(X,Y,bX,bY)

bound.angle(X,Y,nn[,1],nn[,2])

[Package asbio version 1.9-7 Index]