Skip to contents

supercells 2.0.0

  • Named dist_fun values are now limited to the curated list of measures returned by sc_list_distances(). Other measures can still be supplied as functions.
  • The curated set includes the new "cosine_distance" definition.
  • Added "wasserstein1" for probability profiles stored as ordered, equal-width raster layers.
  • "dtw2d" now rejects an odd number of layers instead of ignoring the final layer.
  • Renamed the first argument of sc_tune_compactness() from raster to x.
  • sc_tune_compactness() now applies measure-specific dimensional scaling across the curated measures.
  • sc_tune_compactness() now accepts stars rasters consistently with the SLIC functions.
  • Fixed sc_tune_compactness() with stat = NULL and a step in meters.

supercells 1.9.8

  • Invalid k values are now rejected before code is run.
  • Fixed R/C++ raster-index conversion for custom centers and metrics; metrics now preserve fractional center positions.
  • Initial center values are now read from the locally adjusted center cells.
  • use_meters() now warns explicitly that non-square cells use x resolution for both axes and therefore give approximate map-unit steps.
  • Fixed ID offsets and empty-result handling when combining chunked polygon outputs.
  • Balance metrics now return NA when either scaled distance component is zero.
  • Cluster assignments are now recomputed each iteration; valid cells outside local center windows are assigned to the nearest current center.
  • sc_slic_convergence() now skips connectivity cleaning and warns when clean = TRUE is requested.
  • Median summaries now average the two middle values for even-sized supercells.

supercells 1.9.5

  • Fixed integer overflow in vector indexing inside the C++ part of the code: C++ code now uses 64-bit arithmetic for array indices (std::size_t) instead of 32-bit integers when accessing raster data. This prevents silent data corruption or crashes when processing large rasters (>100M cells with multiple bands). The fix should have no performance impact. (Thanks to Lucas De Oto)

supercells 1.9

supercells 1.8

  • compactness = "auto" enables locally adaptive compactness
  • Metrics now support local-window adaptive compactness (pixels/supercells/global)
  • sc_tune_compactness() returns only step + one compactness, selected by metrics = "global" or "local"
  • Chunked raster IDs now use a consistent center-count offset strategy

supercells 1.7

  • Added sc_tune_compactness() to estimate compactness from a short SLIC run
  • Metrics API cleanup: renamed sc_metrics_clusters() to sc_metrics_supercells(), unified metric names, _scaled suffix for scaled outputs
  • Balance metrics now use absolute log ratio of scaled value/spatial distances
  • iter = 0 only works for point outputs; polygons/rasters error with guidance
  • sc_slic()/sc_slic_points()/sc_slic_raster() dropped the transform argument; legacy supercells() keeps transform = "to_LAB"
  • New step_unit supports map-unit step sizes
  • Chunking improvements: conservative memory estimates, options(supercells.chunk_mem_gb), chunk sizes align to step, deterministic ID offsets with file-backed merge
  • Verbose argument moved to the end in R and C++ APIs
  • Empty-cluster handling now consistent across cleanup
  • Removed future-based parallel chunking

supercells 1.6

  • Spatial distance uses precise (fractional) center positions; neighborhood search still uses rounded centers (minor output differences are expected vs 1.5)
  • More robust center handling (custom centers, empty centers) and safer cleanup for small regions
  • Local-minimum search improved
  • Tests standardized via tests/testthat/setup.R and updated expectations

supercells 1.5

  • Major C++ SLIC refactor (clearer data flow, diagnostics support) with supporting utility cleanup
  • Standardized sc_slic(), sc_slic_points(), sc_slic_raster() with consistent options/metadata/chunking; sc_slic() is now the main entry point
  • Added diagnostics API (sc_metrics_pixels(), sc_metrics_clusters(), sc_metrics_global()) and iter_diagnostics + sc_plot_iter_diagnostics()
  • Centralized internal helpers for validation, chunking, and normalization
  • Expanded regression and metrics tests

supercells 1.0.3

  • C++ code improvements (Avoid implicit conversion from sexp to double, see #39)
  • Improves documentation of the fun_avg argument (see #41)

supercells 1.0.2

  • Fixes centroid coordinates (see #32)

supercells 1.0.0

CRAN release: 2024-02-11

  • Added a NEWS.md file to track changes to the package.
  • This version is a stable one as described in Nowosad and Stepinski (2022)