| Title: | Superpixels of Spatial Data |
|---|---|
| Description: | Creates superpixels based on input spatial data. This package works on spatial data with one variable (e.g., continuous raster), many variables (e.g., RGB rasters), and spatial patterns (e.g., areas in categorical rasters). It is based on the SLIC algorithm (Achanta et al. (2012) <doi:10.1109/TPAMI.2012.120>), and readapts it to work with arbitrary dissimilarity measures. |
| Authors: | Jakub Nowosad [aut, cre] (ORCID: <https://orcid.org/0000-0002-1057-3721>), Pascal Mettes [ctb] (Author of the initial C++ implementation of the SLIC Superpixel algorithm for image data) |
| Maintainer: | Jakub Nowosad <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.9.3 |
| Built: | 2026-05-24 07:19:45 UTC |
| Source: | https://github.com/nowosad/supercells |
Computes global distance diagnostics for supercells
sc_metrics_global( x, sc, metrics = c("spatial", "value", "combined", "balance"), scale = TRUE, step, compactness, dist_fun = NULL )sc_metrics_global( x, sc, metrics = c("spatial", "value", "combined", "balance"), scale = TRUE, step, compactness, dist_fun = NULL )
x |
The input SpatRaster used to create |
sc |
An sf object returned by |
metrics |
Character vector of metric ideas to return. Options:
|
scale |
Logical. If |
step |
A step value used for the supercells
If missing, uses |
compactness |
A compactness value used for the supercells
If missing, uses |
dist_fun |
A distance function name or function, as in |
Requires sc with metadata columns (supercells, x, y).
If they are missing, they are derived from geometry and row order.
Use outcomes = c("supercells", "coordinates", "values") when calling
sc_slic() or supercells() to preserve original centers and IDs.
Metrics are averaged across supercells (each supercell has equal weight).
When using SLIC0 (set compactness = use_adaptive() in sc_slic()), combined and balance metrics use per-supercell
adaptive compactness (SLIC0), and scaled value distances are computed with the
per-supercell max value distance.
A data.frame with a single row and columns:
Step size used to generate supercells. Returned in meters when
the input used step = use_meters(...), otherwise in cells.
Compactness value used to generate supercells; NA for
adaptive compactness.
Compactness method: "constant" for fixed
compactness, "local_max" for adaptive compactness.
Number of supercells with at least one non-missing pixel.
Mean per-supercell value distance from cells to their
supercell centers, averaged across supercells. Returned as mean_value_dist
(or mean_value_dist_scaled when scale = TRUE). Lower values indicate
more homogeneous supercells.
Mean per-supercell spatial distance from cells to
their supercell centers, averaged across supercells; units are grid cells
(row/column index distance). If the input supercells were created with
step = use_meters(...), distances are reported in meters. Returned as
mean_spatial_dist (or mean_spatial_dist_scaled when scale = TRUE).
Lower values indicate more compact supercells.
Mean per-supercell combined distance, computed from
value and spatial distances using compactness and step, averaged across
supercells. Returned as mean_combined_dist. Lower values indicate lower
overall distance and are mainly useful for ranking.
Mean signed log ratio of scaled value distance to scaled spatial distance (averaged across supercells); 0 indicates balance between value and spatial terms, negative values indicate spatial dominance, and positive values indicate value dominance.
sc_slic(), sc_metrics_pixels(), sc_metrics_supercells()
library(supercells) vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) vol_sc = sc_slic(vol, step = 8, compactness = 7) sc_metrics_global(vol, vol_sc)library(supercells) vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) vol_sc = sc_slic(vol, step = 8, compactness = 7) sc_metrics_global(vol, vol_sc)
Computes per-pixel distance diagnostics from each pixel to its supercell center
sc_metrics_pixels( x, sc, metrics = c("spatial", "value", "combined", "balance"), scale = TRUE, step, compactness, dist_fun = NULL )sc_metrics_pixels( x, sc, metrics = c("spatial", "value", "combined", "balance"), scale = TRUE, step, compactness, dist_fun = NULL )
x |
The input SpatRaster used to create |
sc |
An sf object returned by |
metrics |
Character vector of metrics to return. Options:
|
scale |
Logical. If |
step |
A step value used for the supercells
If missing, uses |
compactness |
A compactness value used for the supercells
If missing, uses |
dist_fun |
A distance function name or function, as in |
If sc lacks supercells, x, or y columns, they are derived from geometry
and row order, which may differ from the original centers.
When using SLIC0 (set compactness = use_adaptive() in sc_slic()), combined and balance metrics use per-supercell
adaptive compactness (SLIC0), and scaled value distances are computed with the
per-supercell max value distance.
A SpatRaster with one or more layers depending on metrics and
scale.
Spatial distance from each pixel to its supercell center in
grid-cell units (row/column index distance). If the input supercells were
created with step = use_meters(...), distances are reported in meters.
Lower values indicate more compact supercells. Returned as
spatial_scaled when scale = TRUE.
Value distance from each pixel to its supercell center in
the raster value space. Lower values indicate more homogeneous supercells.
Returned as value_scaled when scale = TRUE.
Combined distance using compactness and step. Overall
distance; mainly useful for ranking.
Signed log ratio of scaled value distance to scaled spatial
distance. 0 indicates balance; negative values indicate spatial dominance;
positive values indicate value dominance. Always computed from scaled
components.
sc_slic(), sc_metrics_supercells(), sc_metrics_global()
library(supercells) vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) vol_sc = sc_slic(vol, step = 8, compactness = 7) metrics = sc_metrics_pixels(vol, vol_sc, scale = TRUE) terra::panel(metrics, nr = 1)library(supercells) vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) vol_sc = sc_slic(vol, step = 8, compactness = 7) metrics = sc_metrics_pixels(vol, vol_sc, scale = TRUE) terra::panel(metrics, nr = 1)
Computes per-supercell distance diagnostics
sc_metrics_supercells( x, sc, metrics = c("spatial", "value", "combined", "balance"), scale = TRUE, step, compactness, dist_fun = NULL )sc_metrics_supercells( x, sc, metrics = c("spatial", "value", "combined", "balance"), scale = TRUE, step, compactness, dist_fun = NULL )
x |
The input SpatRaster used to create |
sc |
An sf object returned by |
metrics |
Character vector of metric ideas to return. Options:
|
scale |
Logical. If |
step |
A step value used for the supercells
If missing, uses |
compactness |
A compactness value used for the supercells
If missing, uses |
dist_fun |
A distance function name or function, as in |
If sc lacks supercells, x, or y columns, they are derived from geometry
and row order, which may differ from the original centers.
When using SLIC0 (set compactness = use_adaptive() in sc_slic()), combined and balance metrics use per-supercell
adaptive compactness (SLIC0), and scaled value distances are computed with the
per-supercell max value distance.
An sf object with one row per supercell and columns:
Supercell ID.
Mean spatial distance from cells to the supercell
center in grid-cell units (row/column index distance). If the input
supercells were created with step = use_meters(...), distances are
reported in meters. Lower values indicate more compact supercells.
Returned as mean_spatial_dist_scaled when scale = TRUE.
Mean value distance from cells to the supercell
center in value space. Lower values indicate more homogeneous supercells.
Returned as mean_value_dist_scaled when scale = TRUE.
Mean combined distance using compactness and
step to scale value and spatial distances. Overall distance; mainly useful
for ranking.
Signed log ratio of scaled value distance to scaled spatial
distance. 0 indicates balance; negative values indicate spatial dominance;
positive values indicate value dominance.
sc_slic(), sc_metrics_pixels(), sc_metrics_global()
library(supercells) vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) vol_sc = sc_slic(vol, step = 8, compactness = 7) cl = sc_metrics_supercells(vol, vol_sc) head(cl)library(supercells) vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) vol_sc = sc_slic(vol, step = 8, compactness = 7) cl = sc_metrics_supercells(vol, vol_sc) head(cl)
Creates supercells from single- or multi-band rasters using an extended SLIC algorithm.
The function supports either a target number of supercells (k) or a fixed grid
spacing (step), as well as optional custom centers and chunking.
sc_slic( x, step = NULL, compactness, dist_fun = "euclidean", avg_fun = "mean", clean = TRUE, minarea, iter = 10, k = NULL, centers = NULL, outcomes = c("supercells", "coordinates", "values"), chunks = FALSE, verbose = 0 )sc_slic( x, step = NULL, compactness, dist_fun = "euclidean", avg_fun = "mean", clean = TRUE, minarea, iter = 10, k = NULL, centers = NULL, outcomes = c("supercells", "coordinates", "values"), chunks = FALSE, verbose = 0 )
x |
An object of class SpatRaster (terra) or class stars (stars). |
step |
Initial center spacing (alternative is |
compactness |
A compactness value. Use |
dist_fun |
A distance function name or a custom function. Supported names:
"euclidean", "jsd", "dtw", "dtw2d", or any method from |
avg_fun |
An averaging function name or custom function used to summarize values within each supercell. Supported names: "mean" and "median". A custom function must accept a numeric vector and return a single numeric value. |
clean |
Should connectivity of the supercells be enforced? |
minarea |
Minimal size of a supercell (in cells). |
iter |
Number of iterations. |
k |
The number of supercells desired (alternative to |
centers |
Optional sf object of custom centers. Requires |
outcomes |
Character vector controlling which fields are returned.
Allowed values are "supercells", "coordinates", and "values". Default is
full output ( |
chunks |
Chunking option. Use |
verbose |
Verbosity level. |
Use sc_slic() for polygon outputs. For raster or point centers outputs, see
sc_slic_raster() and sc_slic_points().
Evaluation and diagnostic options:
Iteration convergence: use sc_slic_convergence() and plot its output.
Pixel diagnostics: sc_metrics_pixels() for per-pixel spatial, value,
and combined distances.
Cluster diagnostics: sc_metrics_supercells() for per-supercell summaries.
Global diagnostics: sc_metrics_global() for a single-row summary.
An sf object with the supercell polygons and summary statistics.
Information on step, compactness, and compactness_method are attached to
the result as attributes (compactness is NA for adaptive compactness).
Achanta, R., Shaji, A., Smith, K., Lucchi, A., Fua, P., & Süsstrunk, S. (2012). SLIC Superpixels Compared to State-of-the-Art Superpixel Methods. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34(11), 2274–2282. https://doi.org/10.1109/tpami.2012.120
Nowosad, J., Stepinski, T. (2022). Extended SLIC superpixels algorithm for applications to non-imagery geospatial rasters. International Journal of Applied Earth Observation and Geoinformation, https://doi.org/10.1016/j.jag.2022.102935
sc_tune_compactness(), use_meters(), use_adaptive(), sc_slic_raster(), sc_slic_points(), sc_slic_convergence(),
sc_metrics_pixels(), sc_metrics_supercells(), sc_metrics_global()
library(supercells) # One variable vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) vol_slic1 = sc_slic(vol, step = 8, compactness = 1) terra::plot(vol) plot(sf::st_geometry(vol_slic1), add = TRUE, lwd = 0.2)library(supercells) # One variable vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) vol_slic1 = sc_slic(vol, step = 8, compactness = 1) terra::plot(vol) plot(sf::st_geometry(vol_slic1), add = TRUE, lwd = 0.2)
Runs SLIC and returns per-iteration mean combined distance.
The output can be plotted directly with plot().
sc_slic_convergence( x, step = NULL, compactness, dist_fun = "euclidean", avg_fun = "mean", clean = TRUE, minarea, iter = 10, k = NULL, centers = NULL, verbose = 0 )sc_slic_convergence( x, step = NULL, compactness, dist_fun = "euclidean", avg_fun = "mean", clean = TRUE, minarea, iter = 10, k = NULL, centers = NULL, verbose = 0 )
x |
An object of class SpatRaster (terra) or class stars (stars). |
step |
Initial center spacing (alternative is |
compactness |
A compactness value. Use |
dist_fun |
A distance function name or a custom function. Supported names:
"euclidean", "jsd", "dtw", "dtw2d", or any method from |
avg_fun |
An averaging function name or custom function used to summarize values within each supercell. Supported names: "mean" and "median". A custom function must accept a numeric vector and return a single numeric value. |
clean |
Should connectivity of the supercells be enforced? |
minarea |
Minimal size of a supercell (in cells). |
iter |
Number of iterations. |
k |
The number of supercells desired (alternative to |
centers |
Optional sf object of custom centers. Requires |
verbose |
Verbosity level. |
A data frame with class sc_slic_convergence and columns:
Iteration number.
Mean combined distance across assigned cells at each iteration.
library(supercells) vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) conv = sc_slic_convergence(vol, step = 8, compactness = 5, iter = 10) plot(conv)library(supercells) vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) conv = sc_slic_convergence(vol, step = 8, compactness = 5, iter = 10) plot(conv)
sc_slic() parametersReturns key sc_slic() parameters stored as attributes on a supercells object.
sc_slic_get_params(sc)sc_slic_get_params(sc)
sc |
An sf object returned by |
A one-row data.frame with columns:
step, compactness, compactness_method, and dist_fun.
The dist_fun column is character; custom distance functions are stored as
NA.
sc_slic(), sc_slic_set_params()
Runs the SLIC workflow and returns supercell centers as points.
Use iter = 0 to return the initial centers before iterations.
For polygon outputs, use sc_slic(); for raster output, use sc_slic_raster()
By default, returns the same fields as sc_slic():
outcomes = c("supercells", "coordinates", "values").
Use outcomes = "values" for value summaries only.
sc_slic_points( x, step = NULL, compactness, dist_fun = "euclidean", avg_fun = "mean", clean = TRUE, minarea, iter = 10, k = NULL, centers = NULL, outcomes = c("supercells", "coordinates", "values"), chunks = FALSE, verbose = 0 )sc_slic_points( x, step = NULL, compactness, dist_fun = "euclidean", avg_fun = "mean", clean = TRUE, minarea, iter = 10, k = NULL, centers = NULL, outcomes = c("supercells", "coordinates", "values"), chunks = FALSE, verbose = 0 )
x |
An object of class SpatRaster (terra) or class stars (stars). |
step |
Initial center spacing (alternative is |
compactness |
A compactness value. Use |
dist_fun |
A distance function name or a custom function. Supported names:
"euclidean", "jsd", "dtw", "dtw2d", or any method from |
avg_fun |
An averaging function name or custom function used to summarize values within each supercell. Supported names: "mean" and "median". A custom function must accept a numeric vector and return a single numeric value. |
clean |
Should connectivity of the supercells be enforced? |
minarea |
Minimal size of a supercell (in cells). |
iter |
Number of iterations. |
k |
The number of supercells desired (alternative to |
centers |
Optional sf object of custom centers. Requires |
outcomes |
Character vector controlling which fields are returned.
Allowed values are "supercells", "coordinates", and "values". Default is
full output ( |
chunks |
Chunking option. Use |
verbose |
Verbosity level. |
An sf object with supercell center points and summary statistics
library(supercells) vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) # initial centers (only after local minima placement, no iterations) init_pts = sc_slic_points(vol, step = 12, compactness = 1, iter = 0) terra::plot(vol) plot(sf::st_geometry(init_pts), add = TRUE, pch = 3, col = "red") # final supercell centers vol_pts = sc_slic_points(vol, step = 12, compactness = 1) terra::plot(vol) plot(sf::st_geometry(vol_pts), add = TRUE, pch = 16, col = "red")library(supercells) vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) # initial centers (only after local minima placement, no iterations) init_pts = sc_slic_points(vol, step = 12, compactness = 1, iter = 0) terra::plot(vol) plot(sf::st_geometry(init_pts), add = TRUE, pch = 3, col = "red") # final supercell centers vol_pts = sc_slic_points(vol, step = 12, compactness = 1) terra::plot(vol) plot(sf::st_geometry(vol_pts), add = TRUE, pch = 16, col = "red")
Runs the SLIC workflow and returns a raster of supercell IDs
IDs are 1-based and are unique across chunks when chunking is used
For polygon outputs, use sc_slic(); for point centers, use sc_slic_points()
sc_slic_raster( x, step = NULL, compactness, dist_fun = "euclidean", avg_fun = "mean", clean = TRUE, minarea, iter = 10, k = NULL, centers = NULL, outcomes = "supercells", chunks = FALSE, verbose = 0 )sc_slic_raster( x, step = NULL, compactness, dist_fun = "euclidean", avg_fun = "mean", clean = TRUE, minarea, iter = 10, k = NULL, centers = NULL, outcomes = "supercells", chunks = FALSE, verbose = 0 )
x |
An object of class SpatRaster (terra) or class stars (stars). |
step |
Initial center spacing (alternative is |
compactness |
A compactness value. Use |
dist_fun |
A distance function name or a custom function. Supported names:
"euclidean", "jsd", "dtw", "dtw2d", or any method from |
avg_fun |
An averaging function name or custom function used to summarize values within each supercell. Supported names: "mean" and "median". A custom function must accept a numeric vector and return a single numeric value. |
clean |
Should connectivity of the supercells be enforced? |
minarea |
Minimal size of a supercell (in cells). |
iter |
Number of iterations. |
k |
The number of supercells desired (alternative to |
centers |
Optional sf object of custom centers. Requires |
outcomes |
Character vector controlling which fields are returned.
Only |
chunks |
Chunking option. Use |
verbose |
Verbosity level. |
A SpatRaster with supercell IDs.
library(supercells) vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) vol_ids = sc_slic_raster(vol, step = 8, compactness = 1) terra::plot(vol_ids)library(supercells) vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) vol_ids = sc_slic_raster(vol, step = 8, compactness = 1) terra::plot(vol_ids)
sc_slic() parametersWrites key sc_slic() parameters to attributes on a supercells object.
sc_slic_set_params(sc, params)sc_slic_set_params(sc, params)
sc |
An sf object. |
params |
A data.frame, typically from |
The input object with updated attributes.
sc_slic(), sc_slic_get_params()
Estimates a compactness value for a chosen raster scale.
The current implementation supports one tuning metric, "local_variability",
which estimates compactness directly from local value variability.
sc_tune_compactness( raster, step = NULL, dist_fun = "euclidean", metric = "local_variability", k = NULL, centers = NULL )sc_tune_compactness( raster, step = NULL, dist_fun = "euclidean", metric = "local_variability", k = NULL, centers = NULL )
raster |
A |
step |
Initial center spacing (alternative is |
dist_fun |
A distance function name or a custom function. Supported names:
"euclidean", "jsd", "dtw", "dtw2d", or any method from |
metric |
Which compactness metric to return. Currently only
|
k |
The number of supercells desired (alternative to |
centers |
Optional sf object of custom initial centers. Requires |
A one-row data frame with columns step and compactness.
sc_slic(), use_meters(), use_adaptive()
library(terra) vol = rast(system.file("raster/volcano.tif", package = "supercells")) tune = sc_tune_compactness(vol, step = 8) tune$compactnesslibrary(terra) vol = rast(system.file("raster/volcano.tif", package = "supercells")) tune = sc_tune_compactness(vol, step = 8) tune$compactness
Creates supercells by bringing the idea of superpixels into spatial analysis and grouping raster cells into coherent regions. It uses a modified version of the SLIC algorithm by Achanta et al. (2012), allowing specification of a distance function.
supercells( x, k, compactness, dist_fun = "euclidean", avg_fun = "mean", clean = TRUE, iter = 10, transform = NULL, step, minarea, metadata = TRUE, chunks = FALSE, verbose = 0 )supercells( x, k, compactness, dist_fun = "euclidean", avg_fun = "mean", clean = TRUE, iter = 10, transform = NULL, step, minarea, metadata = TRUE, chunks = FALSE, verbose = 0 )
x |
An object of class SpatRaster (terra) or class stars (stars) |
k |
The number of supercells desired by the user (the output number can be slightly different!).
You can use either |
compactness |
A compactness value. Larger values cause supercells to be more compact/even (square).
Use |
dist_fun |
A distance function. Currently implemented distance functions are |
avg_fun |
An averaging function - how the values of the supercells' centers are calculated? The algorithm internally implements common functions |
clean |
Should connectivity of the supercells be enforced? |
iter |
The number of iterations performed to create the output. |
transform |
Transformation to be performed on the input. By default, no transformation is performed. Currently available transformation is "to_LAB": first, the conversion from RGB to the LAB color space is applied, then the supercells algorithm is run, and afterward, a reverse transformation is performed on the obtained results. (This argument is experimental and may be removed in the future). |
step |
Initial center spacing. You can use either |
minarea |
Specifies the minimal size of a supercell (in cells). Only works when |
metadata |
Logical. Controls whether metadata columns ("supercells", "x", "y") are included. |
chunks |
Should the input ( |
verbose |
An integer specifying the level of text messages printed during calculations. 0 means no messages (default), 1 provides basic messages (e.g., calculation stage). |
If you want to use additional arguments for the averaging function (avg_fun), you can create a custom function. For example, if you want to calculate the mean by removing missing values, you can use the following code: my_mean = function(x) mean(x, na.rm = TRUE) and then provide avg_fun = my_mean.
For raster IDs or point centers outputs, see sc_slic_raster() and
sc_slic_points(). For evaluation and diagnostics, see
sc_metrics_pixels(), sc_metrics_supercells(), and sc_metrics_global().
An sf object with several columns: (1) supercells - an id of each supercell, (2) y and x coordinates, (3) one or more columns with average values of given variables in each supercell.
Achanta, R., Shaji, A., Smith, K., Lucchi, A., Fua, P., & Süsstrunk, S. (2012). SLIC Superpixels Compared to State-of-the-Art Superpixel Methods. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34(11), 2274–2282. https://doi.org/10.1109/tpami.2012.120
Nowosad, J. Motif: an open-source R tool for pattern-based spatial analysis. Landscape Ecol (2021). https://doi.org/10.1007/s10980-020-01135-0
library(supercells) # One variable vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) vol_slic1 = supercells(vol, k = 50, compactness = 1) terra::plot(vol) plot(sf::st_geometry(vol_slic1), add = TRUE, lwd = 0.2) # RGB variables # ortho = terra::rast(system.file("raster/ortho.tif", package = "supercells")) # ortho_slic1 = supercells(ortho, k = 1000, compactness = 10, transform = "to_LAB") # terra::plot(ortho) # plot(sf::st_geometry(ortho_slic1), add = TRUE) # # ### RGB variables - colored output # # rgb_to_hex = function(x){ # apply(t(x), 2, function(x) rgb(x[1], x[2], x[3], maxColorValue = 255)) # } # avg_colors = rgb_to_hex(sf::st_drop_geometry(ortho_slic1[4:6])) # # terra::plot(ortho) # plot(sf::st_geometry(ortho_slic1), add = TRUE, col = avg_colors)library(supercells) # One variable vol = terra::rast(system.file("raster/volcano.tif", package = "supercells")) vol_slic1 = supercells(vol, k = 50, compactness = 1) terra::plot(vol) plot(sf::st_geometry(vol_slic1), add = TRUE, lwd = 0.2) # RGB variables # ortho = terra::rast(system.file("raster/ortho.tif", package = "supercells")) # ortho_slic1 = supercells(ortho, k = 1000, compactness = 10, transform = "to_LAB") # terra::plot(ortho) # plot(sf::st_geometry(ortho_slic1), add = TRUE) # # ### RGB variables - colored output # # rgb_to_hex = function(x){ # apply(t(x), 2, function(x) rgb(x[1], x[2], x[3], maxColorValue = 255)) # } # avg_colors = rgb_to_hex(sf::st_drop_geometry(ortho_slic1[4:6])) # # terra::plot(ortho) # plot(sf::st_geometry(ortho_slic1), add = TRUE, col = avg_colors)
Creates a compactness mode object for adaptive compactness.
The "local_max" method corresponds to SLIC0-style local scaling,
where compactness is adapted using local maximum value distances.
use_adaptive(method = "local_max")use_adaptive(method = "local_max")
method |
Adaptive compactness method. Currently only |
An adaptive compactness mode object for compactness arguments.
use_adaptive()use_adaptive()
Creates a units value in meters for use in step arguments.
Use plain numerics for cell units, and use_meters() for map-distance steps.
use_meters(x)use_meters(x)
x |
A single positive numeric value. |
A units::units object in meters (m).
use_meters(100)use_meters(100)