Learn R Programming

sptemExp (version 0.1.4)

points2Raster: Generation of Grid Surface Using the predicted/Interpolated Values

Description

This combines the predicted values's output with the corresponding spatial point data frame to generate the grid surface. Please use this function with the output spatial point data frame generated by genRaster

Usage

points2Raster(spoints, tarVar, dx = 2000, dy = 2000)

Arguments

spoints

Spatial point data frame. This data frame is based on the output by the function, genRaster with its predicted or interpolated value field.

tarVar

Field name such as pollutant concentration used to make the grid.

dx

Size of resolution along x coordinate

dy

Size of resolution along y coordinate

Value

Convert the points into Raster

Examples

Run this code
# NOT RUN {
  data("spointspre")
  praster=points2Raster(spointspre,"pre_m",dx=2000,dy=2000)
  raster::plot(praster)
# }

Run the code above in your browser using DataLab