align_with_target_grid: Aligns 'grid_from' with 'grid_to' for certain cells

Description Usage Arguments Value

View source: R/Spatial_Functions.R

Description

Aligns grid_from with grid_to for certain cells

Usage

1
align_with_target_grid(grid_from, coords, grid_to, crs_to = NULL)

Arguments

grid_from

A raster::RasterLayer object.

coords

A matrix of x and y coordinates, or a sp::SpatialPoints object indicating which cells of projected grid_from will be used.

grid_to

A raster::RasterLayer object.

crs_to

A sp::CRS object or NULL in which case it will be extracted from grid_to.

Value

A list with two elements

x

A raster::RasterLayer object. Cells values are NA or 1 if they contain points of coords.

index

An integer vector. The cell numbers of x that correspond to coords.


Burke-Lauenroth-Lab/rSFSW2 documentation built on Aug. 14, 2020, 5:20 p.m.