Computes new rasters from existing CARTO rasters using pixel-by-pixel expressions, band math, and spectral indices (NDVI, NDWI, NBR). Supports BigQuery and Snowflake via Analytics Toolbox or Workflows component.
Ships in carto-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Computes a new raster by evaluating an expression pixel by pixel over one or more RaQuet raster tables. Two ways to run it, same engine and rules:
RASTER_ALGEBRA (SQL CALL), up to 26 inputs.carto.rasteralgebra, group Raster Operations), up to 4 inputs.Providers: BigQuery (including CARTO Data Warehouse) and Snowflake only. Minimum Analytics Toolbox: 1.26.0 on BigQuery, 1.28.0 on Snowflake. The output is a RaQuet v0.5.0 raster table.
Prerequisites: carto-explore-datawarehouse to find the rasters; carto-query-datawarehouse to run SQL (the CALL creates a table, so use the async/job path); carto-create-workflow to build a workflow.
| Reference | Contents |
|---|---|
| references/expressions.md | Full syntax, output names, nodata rules, recipes, common errors |
| references/running.md | Getting v0.5.0 rasters, options, SQL per provider, the Workflows node, reading the output |
SELECT metadata FROM `project.dataset.raster` WHERE block = 0
On Snowflake the columns are usually upper case (METADATA, BLOCK). Record per input: version, each band's name, type, nodata, scale, offset and description, plus tiling.block_width, tiling.max_zoom, bounds, time and compression.
Success: You know which band holds which variable, and each input's grid.
If any check fails, stop and tell the user what to fix. The procedure rejects these cases anyway.
file_format is raquet and version is 0.5.x. Earlier RaQuet versions and legacy CARTO rasters fail with "RaQuet v0.5.0 is required". Rasters imported into CARTO before RaQuet v0.5.0 was enabled for the organization are in the earlier version: import them again (see references/running.md).block_width, block_height and max_zoom for every input. Rasters are not resampled: re-import them at a common resolution.time dimension, and jpeg or webp compression. CARTO imports RGB images this way: to analyze one, the source file must be imported again without its color tags (see references/running.md).Success: The inputs are compatible, or the user knows what to re-import.
Inputs are $a, $b, ... in the order passed (in Workflows, the order connected). Bands are $a.band_1 (by name) or $a[1] (by 1-based index); a bare $a works only for a single-band input. Full syntax and recipes: references/expressions.md.
$a, $b, ... in order, without gaps.; (line breaks don't separate them). name = expr names an output; unnamed ones are band_1, band_2, ... Names must be unique ignoring case, can't be block or metadata, and can't end in _count, _min, _max, _sum, _mean or _stddev.if(), so nodata can't be filled inside the expression.scale/offset are converted (value * scale + offset) before evaluating. Turn this off to work on stored values.Success: Every input is used and every band name exists in its metadata.
| Need | Setting |
|---|---|
| Indices, ratios, deltas | Defaults: float32, all zoom levels |
| Masks, classes | An integer type such as uint8. Integer types reserve their max (unsigned) or min (signed) value as nodata, e.g. 255 for uint8, so a result equal to it becomes nodata |
| Result only feeds more analysis | overviews: none (native resolution only, cheaper) |
output_nodata and compression exist only in the procedure, not in the component. Details: references/running.md.
SQL on BigQuery (on Snowflake, use ARRAY_CONSTRUCT(...) and the toolbox's <database>.<schema>):
CALL `carto-un`.carto.RASTER_ALGEBRA(
['project.dataset.coverage_before', 'project.dataset.coverage_after'],
'delta = $b - $a; gained = $b >= -100 and $a < -100',
'project.dataset.coverage_delta',
NULL
);
carto-un is the US one.In Workflows: one source node per raster, then Raster Algebra, then native.saveastable. Node shape and CLI limits: references/running.md.
Success: The output table exists and its metadata row lists the output bands.
block = 0): each band has STATISTICS_* values (min, max, mean, stddev, valid percent) at native resolution.<band>_count, _min, _max, _sum, _mean and _stddev give cheap aggregates without decoding pixels. Filter to native-resolution blocks first, because overview blocks repeat the data (references/running.md).overviews: evaluate, overview pixels are computed from the inputs' overview pixels, so non-linear results (ratios, thresholds) are approximate at low zooms. Native-resolution pixels are exact either way.Return value is not an ARRAY when a whole tile of the result is empty, for example where a threshold excludes every pixel.What SKILL.md sets; muted values are Claude Code's defaults
/carto-skills:carto-raster-algebrafrom carto-skills
npx claudepluginhub cartodb/agent-skills --plugin carto-skills24 skills in this plugin
/carto-arcgis-migrationEnd-to-end ArcGIS Portal / AGOL → CARTO migration. Triggers when the user wants to migrate ArcGIS content to CARTO, plan a migration, asks "what's in my Portal", names a Portal/AGOL URL, or asks to migrate the datasets / web maps / simple apps. Runs three phases — discover (enumerate items + write MIGRATION_MANIFEST.md), migrate-data (Hosted Feature Layers / Tables → CARTO tables), migrate-maps (Web Maps + simple Dashboards / Web Experiences / Web Mapping Apps → CARTO Builder maps). Default mode is batch; migrated maps are always tagged `From ArcGIS` and created as private./carto-basicsStart here for first-time CARTO use. Orients on the two parallel access paths into the CARTO platform — the MCP server (the primary path for inline, in-conversation work in chat hosts, including creating and editing maps and Workflows) and the CLI (for scripting, CI/CD, headless and bulk/cross-org work, and deeper administration and auditing such as usage-log queries) — and which skills cover each. Also covers CLI install, authentication, profiles, JSON output, and async job patterns./carto-composite-scoringGuides the user through building composite score workflows when they ask about composite scores, indexes, multi-variable scores, ranking areas, site scoring, market potential, resilience indexes, risk indexes, weighted scores, PCA, or supervised/unsupervised scoring.Other plugins' skills for the same job