ascgen | R Documentation |
ascgen
creates an object of class SpatialPixelsDataFrame
using a set of points contained in an object of class
SpatialPointsDataFrame
.
ascgen(xy, cellsize = NULL, nrcol = NULL, count = TRUE)
xy |
an object inheriting the class |
cellsize |
the cell size (resolution) of the object of class
|
nrcol |
the size of the square raster map to be created (number of rows/columns) |
count |
logical. If |
Returns an object of class SpatialPixelsDataFrame
.
Clement Calenge clement.calenge@ofb.gouv.fr
SpatialPixelsDataFrame-class
for additional
information on objects of class SpatialPixelsDataFrame
and
SpatialPoints-class
for additional information on
objects of class SpatialPoints
.
## generates a random sample of points
xy <- matrix(runif(1000), ncol=2)
## coerce them to SpatialPoints
xy <- SpatialPoints(xy)
plot(xy)
## generate a SpatialPixelsDataFrame
## (and count the number of points)
spd <- ascgen(xy, cellsize=0.1)
image(spd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.