Description Usage Arguments Author(s) See Also Examples
Converts a raster to points, with optional rescaling (combines aggregate and rasterToPoints from package "raster").
1 2 3 |
x |
A Raster* object |
fact |
Integer. Aggregation factor expressed as number of cells in each direction (horizontally and vertically). Or two integers (horizontal and vertical aggregation factor). Default is 2. |
fun |
Function used to aggregate values (default=mean). |
expand |
Logical. If TRUE the output RasterLayer will be larger then the input RasterLayer if a division of the number of columns or rows with factor is not an integer. |
na.rm |
logical. If TRUE, NA cells are removed from calculations. |
filename |
Character. Output filename. |
subset_fun |
Function to select a subset of raster values. |
spatial |
Logical. If TRUE, the function returns a SpatialPointsDataFrame object. |
... |
Additional arguments. |
Jonathan A. Greenberg STARStools@estarcion.net and Robert Hijimans
1 2 3 | tahoe_lidar_bareearth <- raster(system.file("external/tahoe_lidar_bareearth.tif", package="STARStools"))
tahoe_lidar_bareearth_points=rasterToPointsWithScaling(tahoe_lidar_bareearth,fact=8,spatial=TRUE)
spplot(tahoe_lidar_bareearth_points)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.