Learn R Programming

wflo (version 1.9)

GK2Index: Converts Gauss-Kruger coordinates to FarmData indices.

Description

This function accepts Gauss-Kruger (GK) coordinates that are within the FarmData space and converts them to a pair of indices that point to locations within the FarmData matrices.

Usage

GK2Index(X, Y)

Value

Returns index values between 1 and 3,250 for X and between 1 and 4,400 for Y.

Arguments

X

a numeric value for the 'right' value in the GK coordinate system.

Y

a numeric value for the 'top' value in the GK coordinate system.

Author

Carsten Croonenbroeck

Details

Assumes that the GK zone is EPSG 31467. References to indices valid if the full data set is loaded, see FarmData and AcquireData.

See Also

Index2GK for the inverse.

Examples

Run this code
GK2Index(3280000, 5230000) # Will return c(1, 4400), the lower left point.
GK2Index(3929800, 6109800) # Will return c(3250, 1), the top right point.

Run the code above in your browser using DataLab