gs_rasterize: Rasterize polygon layer

Description Usage Arguments Value Author(s)

Description

This function creates a raster layer that adopts values from a defined field in a polygon layer, using rasterize from the raster package. This function also converts values to binary if desired, where all zero values are recorded as zero, and all non-zero values are recorded as one. This function also saves the output raster in the working directory.

Usage

1
2
3
gs_rasterize(input_features, output_raster, template_raster,
  binary = FALSE, field = "ID", overwrite = FALSE,
  format = "GTiff")

Arguments

input_features

SpatialPolygons* object. Name of input shapefile layer. Should be a SpatialPolygons object.

output_raster

Character. Desired name of output raster layer.

template_raster

Raster* object. Raster with desired characteristics (resolution, extent) of output raster.

binary

logical. If TRUE, any non-zero values will be converted to one.

field

character. Name of variable that output raster should inherit.

overwrite

logical. Defines whether to overwrite if output_raster already exists.

format

character. Desired format of output raster file.

Value

Vector of values representing the stratum that occurs most often within a given subset of the raster.

Author(s)

Forrest R. Stevens, forrest.stevens@louisville.edu


gridsample documentation built on May 1, 2019, 10:52 p.m.