matchextent: function to match the extent of one grid object to that of...

View source: R/matchextent.R

matchextentR Documentation

function to match the extent of one grid object to that of another.

Description

This function preserves the georeferencing of the grid x but shifts its extent (either clipping or adding NA cells) so that it matches that of grid y.

Usage

matchextent(x, y)
match.extent(x, y)  # deprecated

Arguments

x

The grid whose extent is to be modified.

y

The reference grid to which the extent is to be matched.

Details

The grids must have the same cellsize and grid alignment.

Value

A grid with the extent of y containing whatever data in x overlaps that extent.

Note

Non overlapping grids will result in an error.

Author(s)

Ethan Plunkett


ethanplunkett/gridprocess documentation built on Feb. 1, 2024, 2:24 a.m.