getlonlat: Getting Grid Information from a Raster Object

Description Usage Arguments Value Author(s) Examples

Description

Returns the grid specification of a raster object.

Usage

1
2
## Basic usage
getlonlat( x )

Arguments

x

RasterLayer or RasterStack object.

Value

Returns a list object containing the following information: - lons/lats: vector of unique longitude and latitude points - dx/dy: coordinate increments in x/y direction (grid spacing) - nx/ny: number of grid points in x/y direction

Author(s)

Reto Stauffer

Examples

1
2
3
4
5
library("raster")
# Create an empty demo RasterLayer object
test <- raster(xmn=9.5,xmx=20.5,ymn=19.5,ymx=30.5,ncols=11,nrows=11)
# Getting grid information
getlonlat( test )

retostauffer/Rcost documentation built on May 7, 2019, 9:43 p.m.