grid.subset: Find the subset of a extent in a grid. 'grid.subset'

View source: R/Func_GIS.R

grid.subsetR Documentation

Find the subset of a extent in a grid. grid.subset

Description

Find the subset of a extent in a grid. grid.subset

Usage

grid.subset(
  ext,
  res,
  ext.sub,
  dx = matrix(res, 2, 1)[1],
  dy = matrix(res, 2, 1)[2],
  x = seq(ext[1] + dx/2, ext[2] - dx/2, by = dx),
  y = seq(ext[3] + dy/2, ext[4] - dy/2, by = dy)
)

Arguments

ext

txtent of the grid

res

resolution of the grid

ext.sub

the extent of subset

x

x coordinates of the grids

y

y coordinates of the grids

Value

list, list(xid, yid, x, y)


SHUD-System/SHUDtoolbox documentation built on Nov. 27, 2024, 5:54 a.m.