gxgy.to.hectindex {CTFS}R Documentation

Converts GX GY Coordinates to a Hectare Number

Description

This function takes an x, y plot location and identifies the hectare number. The far edges of the plot is considered out-of-bounds. The same results can be obtained by using a gridsize of 100 by 100 with the function gxgy.to.index.

Usage

gxgy.to.hectindex(gx, gy, plotdim = c(1000, 500))

Arguments

gx tree x coordinate
gy tree y coordinate
plotdim dimensions of the plot: east-west 1000m and north-south 500m

Details

The function should work for any 4 sided plot, square or rectangular. The convention is to number the hectares starting in the southwest corner and going northward up a "column" of 5, and returning to the southern border for 6-10, etc.

Value

Returns a vector, the hectare number (default values range from 1 to 50). Returns a -1 when an invalid gx or gy value is given.

Author(s)

Rick Condit, Suzanne Lao and Pamela Hall

See Also

CTFS.quadfunctions

Examples

## Not run: 
tst.gy=c(0,499,0,499)
tst.gx=c(0,0,999,999)
gxgy.to.hectindex(tst.gx,tst.gy)

# the same values can be obtained using gxgy.to.index with a gridsize 
of 100
gxgy.to.hectindex(783,456)

gxgy.to.index(783,456,gridsize=100)
## End(Not run)

[Package CTFS version 1.00 Index]