makeSPDFfromDT: Make SpatialPixelDataFrame from a data.table

View source: R/export-methods.R

makeSPDFfromDTR Documentation

Make SpatialPixelDataFrame from a data.table

Description

Converts a data.table (or data.frame) to a SpatialPixelsDataFrame, using the columns "Lon and "Lat" to provide the spatial information. Mostly is called by promoteToRaster, but can be useful in and of itself.

Usage

makeSPDFfromDT(
  input.data,
  layers = "all",
  tolerance = 0.01,
  grid.topology = NULL
)

Arguments

input.data

data.table or data.frame, with columns "Lon" and "Lat" which specify the spatial data

layers

The columns to be selected included in the final SpatialPixelsDataFrame object. Use NULL or "all" if all layers are required.

tolerance

Tolerance (in fraction of gridcell size) for unevenly spaced lon and lats

grid.topology

A GridTopology defining the grid topology for the SpatialPixelsDataFrame object

Value

A SpatialPixelDataFrame

Author(s)

Matthew Forrest matthew.forrest@senckenberg.de


MagicForrest/DGVMTools documentation built on Aug. 23, 2024, 8:05 a.m.