df_to_raster: Convert columns of metrics in a data.frame to rasters,...

View source: R/df_to_raster.R

df_to_rasterR Documentation

Convert columns of metrics in a data.frame to rasters, requires

Description

<Delete and Replace>

Usage

df_to_raster(
  df,
  colsxy = c("center_x", "center_y"),
  cols2Raster = c(colsSomeX),
  format = ".img",
  dirOut = "E:\\projects\\2017_NAIP\\rasters\\",
  crs = NA,
  nProc = 10,
  doDebug = F
)

Arguments

df

a dataframe with xy and columns to use in making a rasters

colsxy

names of xy columns

cols2Raster

which columns to grab

format

raster formate e.g. .tif , .img etc

dirOut

where to export rasters

crs

proj4 string or other crs notation used by raster package (see writeRaster)

nProc

number of cores to use in converting to raster

doDebug

run in debug mode and only read 50k rows?

Details

<Delete and Replace>

This program is free software but it is provided WITHOUT WARRANTY and with ABSOLUTELY NO GUARANTEE of fitness or functionality for any purpose; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.


Revision History

1.0 3/16/2020 Function created

Value

<Delete and Replace>

Author(s)

Jacob Strunk <Jstrunk@fs.fed.us>

See Also

rasterFromXYZ
writeRaster

Examples

 <Delete and Replace>


jstrunk001/RSForInvt documentation built on April 18, 2022, 11:03 p.m.