Group locations by intervals of values in given tiff
-file and return geometries of the groups.
Source: R/group.R
gwa_group_locations.Rd
Group locations by intervals of values in given tiff
-file and return geometries of the groups.
Arguments
- gwa_tif
tiff-file (terra-object)
- gis_sf
optional
sf
object (map) to cropgwa-tif
- by_feature
logical, should the grouping be done for each geometry (row in sf-object),
TRUE
by default (recommended for large objects), ifFALSE
the geometries will be merged into one.- ID
character, identification column of the sf-object. If provided, geometries will be merged by IDs.
- int
numeric, intervals of values for grouping locations
- aggregate_tif
(optional) integer, number of pixels in
tiff
to aggregation towards x and y directions (seefact
parameter interra::aggregate
for details). The default value is0
(no aggregation).- snap_to_grid
(optional) numeric size of grid. If positive, geometries will be adjusted to the closest grid (see
grid_size
argument ins2::s2_snap_to_grid
). The default value is1e-5
in lon/lat coordinates.- simplify
numeric, tolerance, the minimum distance between nodes in units of the crs (i.e. degrees for long/lat, see
?terra::simplifyGeom
for details). Default value is 0.1. To skip this step set the value to 0.- buffer
numeric. If positive, buffer will be added to every geometry. Unit is meter if
gwa_tif
andgis_sf
has a longitude/latitude CRS, or in the units of the coordinate reference system in other cases (typically also meter, see?terra::buffer
for details). The default value is 100. Set to 0 to skip this step.- drop_crumps
logical, if TRUE, small geometries will be dropped.
- verbose
logical, should the process be reported.
- plot_process
logical, plot the process of creation of geometries.