← Back to all sparks
R

rasterpic

ANALYTICS
Velocity0.0

Convert Images to Spatially Referenced 'SpatRaster' Objects

rasterpic became an S3 generic and picked up stars support; the rest is upkeep

rgeospatialrasterterras3 genericsimages
Current state
rasterpic georeferences ordinary images onto spatial objects, producing terra SpatRasters that can be plotted as basemaps or overlays. The package is small and its job is narrow. The meaningful recent change is 0.5.0, which turned rasterpic_img() into an S3 generic with methods per input class and added support for stars objects alongside sf and terra.
Where it's heading
The direction is broader input-class coverage inside the same single-function design, and tighter integration with the plotting ecosystem downstream. 0.3.0 renamed output layers to r/g/b/alpha specifically to stay compatible with tmap 4.0; 0.5.1 restored the RGB specification on masked and inverted output after it regressed, and moved errors and warnings to cli formatting. Releases are frequent but small.
Prediction
With the generic in place, adding further input classes is now cheap, so that is the likely direction. The 0.5.1 regression on mask/inverse output suggests the RGB-specification path is the fragile part worth watching.

Recent moves

  1. 1mo ago

    cli-formatted messages; RGB specification restored for masked output

    Fixes a regression where rasterpic_img() with mask or inverse set stopped returning a SpatRaster with an RGB specification, breaking the downstream plotting compatibility 0.3.0 was built for. User-facing errors and warnings move to cli alerts with inline markup.

    View source ↗
  2. 2mo ago

    rasterpic_img() becomes an S3 generic with stars support

    The structural change in the recent window: rasterpic_img() is now an S3 generic with methods per supported input class, and stars objects join the accepted inputs. Makes future input-class additions cheap. Bundled with AI-assisted documentation editing seen across the maintainer's other packages the same month.

    View source ↗
  3. 4mo ago

    Vignettes migrated to Quarto

    Vignette migration only, matching the same move across sibling packages. No code change.

    View source ↗
  4. 7mo ago

    New logo; minimum R raised to 4.1.0

    A logo, a minimum R version bump to 4.1.0, minor internal tidying and three dependabot bumps.

    View source ↗
  5. 1y ago

    Output layers renamed r/g/b/alpha for tmap 4.0 compatibility

    Renames the first three output layers to r, g, b and a fourth to alpha, specifically to avoid a tmap 4.0 subset error on non-unique layer names. A small change made entirely to keep a downstream plotting package working.

    View source ↗
  6. 1y ago

    Output declared as RGB raster; unused dependencies removed

    Declares output as an RGB raster via terra::RGB(), the property 0.5.1 later had to restore for masked output, and drops unused dependencies. Establishes the plotting contract the package has maintained since.

    View source ↗