Description Usage Arguments Note Author(s) See Also Examples
Convert SAGA grid file to point (or polygon) shapefile - either completely or only a random sample of grid cells.
1 2 3 4 | rsaga.grid.to.points(in.grids, out.shapefile, in.clip.polygons,
exclude.nodata = TRUE, type = "nodes", env = rsaga.env(), ...)
rsaga.grid.to.points.randomly(in.grid, out.shapefile, freq, ...)
|
in.grids |
Input: names of (possibly several) SAGA GIS grid files to be converted into a point shapefile. |
out.shapefile |
Output: point shapefile (default extension: |
in.clip.polygons |
optional polygon shapefile to be used for clipping/masking an area |
exclude.nodata |
logical (default: |
type |
character string: |
env |
RSAGA geoprocessing environment created by |
... |
Optional arguments to be passed to |
in.grid |
Input: SAGA grid file from which to sample. |
freq |
integer >=1: sampling frequency: on average 1 out of 'freq' grid cells are selected |
These functions use modules Grid Values to Shapes
(pre-2.0.6 name: Grid Values to Points
) and Grid Values to Points (randomly)
in SAGA library shapes_grid
.
The SAGA 2.0.6+ module Grid Values to Shapes
is more flexible than the earlier versions as it allows to create grid cell polygons instead of center points (see argument type
).
Alexander Brenning (R interface), Olaf Conrad (SAGA modules)
rsaga.add.grid.values.to.points
1 2 3 4 5 6 7 | ## Not run:
# one point per grid cell, exclude nodata areas:
rsaga.grid.to.points("dem", "dempoints")
# take only every 20th point, but to not exclude nodata areas:
rsaga.grid.to.points.randomly("dem", "dempoints20", freq = 20)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.