arcgis-imagery
Skill1 starsChanged 6 months agoMITView on GitHub
Display and analyze raster imagery with the ArcGIS Maps SDK for JavaScript 5.1: ImageryLayer (server-processed) and ImageryTileLayer (client-processed tiles and COGs), raster functions with rasterFunctionUtils (NDVI and other indices with 0-based band ids), mosaic rules and queryRasters. Use this skill whenever the user adds satellite/elevation imagery, computes an index, applies a raster function, or controls a mosaic dataset.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- GeoDaoyu/arcgis-maps-sdk-js-ai-contexttheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- GeoDaoyu/arcgis-maps-sdk-js-ai-context★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository73 other files it gives its agents.
- skills/arcgis-3d-layers/AGENTS.mdAGENTS.md
- skills/arcgis-advanced-layers/AGENTS.mdAGENTS.md
- skills/arcgis-ai-components/AGENTS.mdAGENTS.md
- skills/arcgis-arcade/AGENTS.mdAGENTS.md
- skills/arcgis-authentication/AGENTS.mdAGENTS.md
- skills/arcgis-charts/AGENTS.mdAGENTS.md
- skills/arcgis-cim-symbols/AGENTS.mdAGENTS.md
- skills/arcgis-coding-components/AGENTS.mdAGENTS.md
- skills/arcgis-coordinates-projection/AGENTS.mdAGENTS.md
- skills/arcgis-core-maps/AGENTS.mdAGENTS.md
- skills/arcgis-core-utilities/AGENTS.mdAGENTS.md
- skills/arcgis-custom-rendering/AGENTS.mdAGENTS.md
- skills/arcgis-editing/AGENTS.mdAGENTS.md
- skills/arcgis-embeddable-maps/AGENTS.mdAGENTS.md
- skills/arcgis-feature-effects/AGENTS.mdAGENTS.md
- skills/arcgis-geometry-operations/AGENTS.mdAGENTS.md
- skills/arcgis-imagery/AGENTS.mdAGENTS.md
- skills/arcgis-interaction/AGENTS.mdAGENTS.md
- skills/arcgis-knowledge-graphs/AGENTS.mdAGENTS.md
- skills/arcgis-layers/AGENTS.mdAGENTS.md
- skills/arcgis-map-tools/AGENTS.mdAGENTS.md
- skills/arcgis-parquet/AGENTS.mdAGENTS.md
- skills/arcgis-performance/AGENTS.mdAGENTS.md
- skills/arcgis-popup-templates/AGENTS.mdAGENTS.md
- skills/arcgis-portal-content/AGENTS.mdAGENTS.md
- skills/arcgis-rest-services/AGENTS.mdAGENTS.md
- skills/arcgis-scene-environment/AGENTS.mdAGENTS.md
- skills/arcgis-smart-mapping/AGENTS.mdAGENTS.md
- skills/arcgis-spatial-analysis/AGENTS.mdAGENTS.md
- skills/arcgis-starter-app/AGENTS.mdAGENTS.md
- skills/arcgis-tables-forms/AGENTS.mdAGENTS.md
- skills/arcgis-time-animation/AGENTS.mdAGENTS.md
- skills/arcgis-utility-networks/AGENTS.mdAGENTS.md
- skills/arcgis-visualization/AGENTS.mdAGENTS.md
- skills/arcgis-widgets-advanced/AGENTS.mdAGENTS.md
- skills/arcgis-widgets-ui/AGENTS.mdAGENTS.md
- skills/hello-world/AGENTS.mdAGENTS.md
- arcgis-3d-layersSkill
- arcgis-advanced-layersSkill
- arcgis-ai-componentsSkill
- arcgis-arcadeSkill
- arcgis-authenticationSkill
- arcgis-chartsSkill
- arcgis-cim-symbolsSkill
- arcgis-coding-componentsSkill
- arcgis-coordinates-projectionSkill
- arcgis-core-mapsSkill
- arcgis-core-utilitiesSkill
- arcgis-custom-renderingSkill
- arcgis-editingSkill
- arcgis-embeddable-mapsSkill
- arcgis-feature-effectsSkill
- arcgis-geometry-operationsSkill
- arcgis-interactionSkill
- arcgis-knowledge-graphsSkill
- arcgis-layersSkill
- arcgis-map-toolsSkill
- arcgis-parquetSkill
- arcgis-performanceSkill
- arcgis-popup-templatesSkill
- The first 60 shown.
The file
Files
Imagery
When to use: Activate this skill whenever the user adds raster imagery, applies a raster function (NDVI, hillshade), or controls a mosaic dataset.
Overview
Imagery layers stream raster data; raster functions process it on the fly without altering the source.
- Problem it solves: displaying and analyzing satellite/elevation imagery.
- Who it serves: developers building remote-sensing and analysis apps.
- Pattern it teaches: ImageryLayer vs ImageryTileLayer; chainable raster functions; mosaic rules.
- What it does NOT cover: vector layers (see
arcgis-layers) or 3D meshes (seearcgis-3d-layers).
Quick Start
import ImageryLayer from "@arcgis/core/layers/ImageryLayer.js";
import * as rasterFunctionUtils from "@arcgis/core/layers/support/rasterFunctionUtils.js";
const layer = new ImageryLayer({
url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Toronto/ImageServer", // Blue, Green, Red, NIR
rasterFunction: rasterFunctionUtils.bandArithmeticNDVI({ redBandId: 2, nirBandId: 3 }), // 0-based
});Measured with 5.1.27: identify returns 0.0148 over Queen's Park and -0.263 over the harbour,
the same as (NIR − R) / (NIR + R) computed by hand from the raw pixels.
Decision Tree
- An ArcGIS ImageServer (dynamic, mosaic datasets)?
- Yes →
ImageryLayer; processing runs on the server (rasterFunction,mosaicRule).
- Yes →
- A tiled imagery service or a cloud raster (COG / CRF)?
- Yes →
ImageryTileLayer; it also takes arasterFunction, processed in the client.
- Yes →
- An index (NDVI, NDWI, NBR, SAVI, EVI...)?
rasterFunctionUtils.bandArithmeticNDVI(...)and friends: true values, 0-based band ids.
Default: rasterFunction + rasterFunctionUtils; renderingRule is the 4.x name.
Import Patterns
Direct ESM (recommended for npm/Vite/Webpack)
import ImageryLayer from "@arcgis/core/layers/ImageryLayer.js";
import * as rasterFunctionUtils from "@arcgis/core/layers/support/rasterFunctionUtils.js";Dynamic Imports (CDN)
const rasterFunctionUtils = await $arcgis.import("@arcgis/core/layers/support/rasterFunctionUtils.js");Map Components (recommended for new projects)
// Add the imagery layer to the component's map.
import "@arcgis/map-components/components/arcgis-map";Key Concepts
Concept 1: ImageryLayer vs ImageryTileLayer
ImageryLayer asks an ImageServer for each image; the server applies the raster function and the
mosaic rule. ImageryTileLayer reads tiles (or a COG/CRF) and renders and processes them in the
browser: it accepts rasterFunction too (measured: it keeps it), so "tiles are pre-rendered, raster
functions are ignored" is false.
Concept 2: Raster functions and band ids
rasterFunctionUtils (since 4.28) builds the RasterFunction for you: band arithmetic
(bandArithmeticNDVI, NDWI, NBR, SAVI, EVI, custom), stretches, colormap, threshold.
Band ids are 0-based indexes into the service's bands: for Blue, Green, Red, NIR it is red 2 and
NIR 3; for Landsat 8 (Coastal, Blue, Green, Red, NIR, ...) it is red 3 and NIR 4. Read the order
from layer.serviceRasterInfo before writing the ids. Chain functions by passing one as the
raster of the next.
Concept 3: Mosaic rules and catalog queries
mosaicRule orders the overlapping rasters of a mosaic dataset (by attribute, date, lock-to-raster).
To list the scenes themselves, layer.queryRasters({ geometry, outFields }) returns a FeatureSet
of catalog items; pixel values come from identify, getSamples or fetchPixels.
Common Pitfalls (Top 3)
Pitfall 1: Reading the server NDVI function as -1..1
// ❌ Anti-pattern
const rf = new RasterFunction({ functionName: "NDVI", functionArguments: { VisibleBandID: 2, InfraredBandID: 3 } });
// identify → 101: "NDVI > 0.3 means vegetation" never matches// ✅ Correct
const rf = rasterFunctionUtils.bandArithmeticNDVI({ redBandId: 2, nirBandId: 3 }); // identify → 0.0148Impact: measured on the same pixel: the classic "NDVI" raster function returns 101 (and
74 over water), the scaled 0–200 integer output (100 × (1 + NDVI)); bandArithmeticNDVI returns
0.0148 and -0.263. Thresholds written for real NDVI silently select nothing or everything.
Pitfall 2: Counting bands from 1
// ❌ Anti-pattern
rasterFunctionUtils.bandArithmeticNDVI({ redBandId: 4, nirBandId: 5 }); // Landsat 8 band numbers// ✅ Correct
rasterFunctionUtils.bandArithmeticNDVI({ redBandId: 3, nirBandId: 4 }); // Landsat 8, 0-basedImpact: with sensor band numbers you compute the index on the wrong bands. Measured on the 4-band Toronto service: green instead of red gives 85 instead of 101 (no error). An out-of-range id, or no arguments at all, gave the default result, so a wrong id is not always visible either.
Pitfall 3: renderingRule from 4.x
// ❌ Anti-pattern
new ImageryLayer({ url, renderingRule: { functionName: "NDVI" } });// ✅ Correct
new ImageryLayer({ url, rasterFunction: rasterFunctionUtils.bandArithmeticNDVI({ redBandId: 2, nirBandId: 3 }) });Impact: renderingRule is not in the 5.1 typings (TypeScript fails). Measured untyped: it does
not populate rasterFunction (it stays null).
When to Read references/
| If you need... | Read |
| ImageryLayer / RasterFunction signatures | references/api-detail.md |
| NDVI / hillshade / mosaic examples | references/examples.md |
| More pitfalls (5+ extended) | references/pitfalls.md |
Related Skills
arcgis-layers— vector data layersarcgis-visualization— renderers for raster symbologyarcgis-3d-layers— elevation/mesh in 3D
Reference Samples
Changelog
- 0.2.0 (2026-10-27): SDK 5.1. Measured with identify on a public 4-band service: the classic
"NDVI"raster function returns a scaled 0–200 value (101), not -1..1;rasterFunctionUtils.bandArithmeticNDVIreturns real NDVI and is now the default. Band ids are 0-based (Landsat 8 red/NIR = 3/4). Pitfall 1 was false:ImageryTileLayertakes raster functions (client side).renderingRuleis gone from the 5.1 typings. AddedqueryRasters. Run intests/runtime/casos/arcgis-imagery.ts. - 0.1.0 (2026-05-31): Initial release.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

