Group locations by intervals of values in given tiff-file and return geometries of the groups.
Source: R/group.R
gwa_group_locations.RdGroup 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
sfobject (map) to cropgwa-tif- by_feature
logical, should the grouping be done for each geometry (row in sf-object),
TRUEby default (recommended for large objects), ifFALSEthe 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
tiffto aggregation towards x and y directions (seefactparameter interra::aggregatefor 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_sizeargument ins2::s2_snap_to_grid). The default value is1e-5in lon/lat coordinates.- simplify
numeric, tolerance, the minimum distance between nodes in units of the crs (i.e. degrees for long/lat, see
?terra::simplifyGeomfor 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_tifandgis_sfhas a longitude/latitude CRS, or in the units of the coordinate reference system in other cases (typically also meter, see?terra::bufferfor 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.