Correct Spatial Locations for Geometric Anisotropy

DESCRIPTION:
The input spatial locations are rotated, scaled and rotated back to correct for geometric anisotropy defined by angle of anisotropy and ratio. This function is usually used in the formula for estimating a variogram.

USAGE:
loc(x, y, angle=0, ratio=1)

REQUIRED ARGUMENTS:
x:
numeric vector of x locations, must be the same length as y. Alternatively x can be a two column matrix containing both the x and y locations.

OPTIONAL ARGUMENTS:
y:
numeric vector of y locations, must be the same length as x.
angle:
an angle measured clockwise from North in degrees.
ratio:
a numeric value specifying the ratio of anisotropy at angle to the anisotropy orthogonal to angle.

VALUE:
a two column matrix of class "loc" containing the corrected spatial locations.

DETAILS:
The locations are corrected for geometric anisotropy by multipling each location pair (x[i],y[i]) by the symmetric 2 x 2 matrix A where A[1,1]=cos(angle)^2+ratio*sin(angle)^2, A[1,2]=(1- ratio) * sin(angle) * cos(angle) and A[2,2]=sin(angle)^2+ratio*cos(angle)^2. See Journel and Huijbregts (1978, pp 179-181).

REFERENCES:
Journel, A. G. and Huijbregts, Ch. J. (1978). Mining Geostatistics. Academic Press, New York.

SEE ALSO:
anisotropy.plot , variogram .

EXAMPLES:
variogram(ore ~ loc(easting, northing, angle=0, ratio=2), data=iron.ore)