arcgis-coordinates-projection
Skill1 starsChanged 6 months agoMITView on GitHub
Handle coordinate systems and reprojection with the ArcGIS Maps SDK for JavaScript 5.1: SpatialReference and WKIDs (incl. Colombia's EPSG 9377), projectOperator (load + execute/executeMany), datum transformations with geographicTransformationUtils, and webMercatorUtils for WGS84 ↔ web mercator. Use this skill whenever the user reprojects geometry, works with WKIDs or datums, or aligns data across coordinate systems.
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-core-mapsSkill
- arcgis-core-utilitiesSkill
- arcgis-custom-renderingSkill
- arcgis-editingSkill
- arcgis-embeddable-mapsSkill
- arcgis-feature-effectsSkill
- arcgis-geometry-operationsSkill
- arcgis-imagerySkill
- arcgis-interactionSkill
- arcgis-knowledge-graphsSkill
- arcgis-layersSkill
- arcgis-map-toolsSkill
- arcgis-parquetSkill
- arcgis-performanceSkill
- arcgis-popup-templatesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 38
Every geometry has a spatial reference.
- Very specific: line 114
When the datums differ, execute applies a default equation-based transformation on its own (measured: the result with no options equals …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Coordinates & Projection
When to use: Activate this skill whenever the user reprojects geometry, deals with WKIDs / spatial references, or aligns data across coordinate systems.
Overview
Every geometry has a spatial reference; mixing systems requires reprojection.
- Problem it solves: correct coordinate handling and reprojection.
- Who it serves: developers integrating data in different coordinate systems.
- Pattern it teaches: WKIDs,
projectOperator.load()+execute, and webMercatorUtils shortcuts. - What it does NOT cover: geometry overlay (see
arcgis-geometry-operations).
Quick Start
import * as projectOperator from "@arcgis/core/geometry/operators/projectOperator.js";
import SpatialReference from "@arcgis/core/geometry/SpatialReference.js";
import Point from "@arcgis/core/geometry/Point.js";
if (!projectOperator.isLoaded()) await projectOperator.load();
const bogota = new Point({ longitude: -74.0761, latitude: 4.5981 }); // x = lon, y = lat
// MAGNA-SIRGAS / Origen-Nacional, Colombia's official plane system since 2020
const plano = projectOperator.execute(bogota, new SpatialReference({ wkid: 9377 }));Decision Tree
- Only WGS84 (4326) ↔ Web Mercator (3857/102100)?
- Yes →
webMercatorUtils(synchronous, no load). It does not check the datum: see Pitfall 2.
- Yes →
- Any other system (national grids, UTM, another datum)?
- Yes →
projectOperator.load()once, thenexecute/executeMany.
- Yes →
- Different datums (Bogotá 1975, NAD27, PSAD56…)?
- Yes → choose the transformation:
geographicTransformationUtils.getTransformations(in, out, aoi)and pass it as{ geographicTransformation }. Grid-based transformations are not supported.
- Yes → choose the transformation:
- Comparing or overlaying geometries?
- Bring them to one spatial reference first: the operators do not reproject for you.
Default: projectOperator with an explicit target; webMercatorUtils only for the WGS84 pair.
Import Patterns
Direct ESM (recommended for npm/Vite/Webpack)
import * as projectOperator from "@arcgis/core/geometry/operators/projectOperator.js";Dynamic Imports (CDN)
const SpatialReference = await $arcgis.import("@arcgis/core/geometry/SpatialReference.js");Map Components (recommended for new projects)
// Reproject geometries you read from the component view before mixing systems.
import "@arcgis/map-components/components/arcgis-map";Key Concepts
Concept 1: SpatialReference & WKID
A SpatialReference identifies the coordinate system by wkid: 4326 (WGS84), 3857/102100 (Web
Mercator), 4686 (MAGNA-SIRGAS geographic), 9377 (MAGNA-SIRGAS / Origen-Nacional, Colombia's single
official plane system: IGAC resolutions 471 and 529 of 2020, EPSG code fixed in 2021; it replaces
the five zones such as 3116 "Bogota zone"). Every geometry carries its own spatialReference.
In a Point, x is the longitude and y the latitude.
Concept 2: projectOperator (load once)
projectOperator needs its engine: if (!projectOperator.isLoaded()) await projectOperator.load().
Measured with 5.1.27: calling execute before that throws p is not a function, a message that
does not say "load". The geodetic operators (geodeticDistanceOperator, geodesicBufferOperator…)
have the same load(). executeMany projects an array that shares one spatial reference: a
geometry in another SR comes back null, without an error. Z values pass through (measured), but a
change of vertical coordinate system throws.
Concept 3: Datum transformations are chosen, not assumed
When the datums differ, execute applies a default equation-based transformation on its own
(measured: the result with no options equals getTransformation(in, out)). The default is one of
many: from Bogotá 1975 (4218) to WGS84 there are 27, and they disagree by up to 22 m in Bogotá.
Pick the one for your area with getTransformations(in, out, areaOfInterestExtent) and pass it
explicitly; document which one you used.
Concept 4: webMercatorUtils shortcut
geographicToWebMercator / webMercatorToGeographic are synchronous and need no load, but they
only know WGS84 ↔ Web Mercator and do not validate their input (see the pitfalls).
Common Pitfalls (Top 3)
Pitfall 1: Calling execute before load
// ❌ Anti-pattern
projectOperator.execute(geom, outSR); // engine not loaded yet// ✅ Correct
if (!projectOperator.isLoaded()) await projectOperator.load();
projectOperator.execute(geom, outSR);Impact: measured with 5.1.27: it throws p is not a function, which does not point at the
missing load().
Pitfall 2: Overlaying geometries in different spatial references
// ❌ Anti-pattern
intersectsOperator.execute(poly4326, poly3857);// ✅ Correct
if (!projectOperator.isLoaded()) await projectOperator.load();
const same = projectOperator.execute(poly4326, poly3857.spatialReference)!;
intersectsOperator.execute(same, poly3857);Impact: measured: for the very same polygon in 4326 and in 3857, intersectsOperator returns
false with no error. Every spatial test on mixed systems is silently wrong.
Pitfall 3: Relabelling coordinates instead of transforming the datum
// ❌ Anti-pattern: coordinates in Bogotá 1975 (4218) stamped as WGS84
const p = new Point({ x: -74.0761, y: 4.5981, spatialReference: { wkid: 4326 } });// ✅ Correct
const src = new Point({ x: -74.0761, y: 4.5981, spatialReference: { wkid: 4218 } });
const t = geographicTransformationUtils.getTransformation(src.spatialReference, SpatialReference.WGS84, aoi);
const p = projectOperator.execute(src, SpatialReference.WGS84, { geographicTransformation: t });Impact: measured: 492 m off in Bogotá. Old Colombian cartography (and NAD27, PSAD56, SAD69 data elsewhere) has to be transformed, not relabelled.
When to Read references/
| If you need... | Read |
| SpatialReference / projectOperator signatures | references/api-detail.md |
| Reprojection examples | references/examples.md |
| More pitfalls (5+ extended) | references/pitfalls.md |
Related Skills
arcgis-geometry-operations— operate after projectingarcgis-core-maps— view spatial referencearcgis-layers— layers in various coordinate systems
Reference Samples
Changelog
- 0.2.0 (2026-10-27): SDK 5.1. Measured:
executebeforeload()throwsp is not a function;intersectsOperatoron mixed systems returnsfalsesilently (the anti-pattern used the deprecatedgeometryEngine);executeapplies a default datum transformation by itself, 27 exist for Bogotá 1975 and differ by 22 m, relabelling instead of transforming moves 492 m;executeManyreturnsnullfor a geometry in another SR;webMercatorUtilsneither checks the datum nor clamps the poles. Colombia's 9377 replaces 3116. Run intests/runtime/casos/arcgis-coordinates-projection.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.

