Learn R Programming

sptemExp (version 0.1.4)

genRaster: Generation of Raster Covering the Side Map

Description

Generaye the raster to cover the study region with the preset resolution.

Usage

genRaster(sideSdf, dx, dy, idStr)

Arguments

sideSdf

The SpatialPolygonDataFrame obejct used to constrain the grid border.

dx

x resolution

dy

y resolution

idStr

id name

Value

PntObj

The SpatialPointDataFrame extracted from the generated raster.

Rst

The raster object covering the study region.

Examples

Run this code
# NOT RUN {
## Use the Shandong province as an example:
data("prnside")
ret=genRaster(prnside,dx=2000,dy=2000,idStr="gid")
raster::plot(ret$Rst)
raster::plot(ret$PntObj)

# }

Run the code above in your browser using DataLab