data.coordinates2gridcellnumber: Search number of gridcell for given coordinates.

View source: R/data.coordinates2gridcellnumber.R

data.coordinates2gridcellnumberR Documentation

Search number of gridcell for given coordinates.

Description

Searches the number of the cell of a given spatial grid by given coordinates (Gauss-Krueger-Coordinates).

Usage

data.coordinates2gridcellnumber(grid, x,y)

Arguments

grid

The grid in which the cell should be searched.

x

The ‘Rechtswert’ of the Gauss-Krueger-Coordinates.

y

The ‘Hochwert’ of the Gauss-Krueger-Coordinates.

Details

Searches the number of the cell of a given spatial grid by given coordinates (Gauss-Krueger-Coordinates).

Value

Returns the cell-number of the grid-cell which is next to the given coordinates.

Author(s)

Daniel Doktor, Maximilian Lange

Examples

  ## load grid containing spatial information
  data(relatedGrid)

  ## search position in grid
  xy <- util.geoco2gk(54.12,10.17,4)
  gridposition <- data.coordinates2gridcellnumber(grid=relatedGrid, 
	x=xy[,1],y=xy[,2])

  gridposition

phenmod documentation built on April 14, 2022, 5:08 p.m.