Token导航 LogoToken导航

Agent Skill · 前端设计

arcgis-geometry-operations(arcgis 几何操作)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

arcgis-geometry-operations 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 3,765。

总安装 1,137周安装 46GitHub Stars 13下载 357核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:arcgis-geometry-operations(arcgis 几何操作)
来源仓库:https://github.com/saschabrunnerch/arcgis-maps-sdk-js-ai-context
仓库路径:skills/arcgis-geometry-operations
安装命令:
npx skills add https://github.com/saschabrunnerch/arcgis-maps-sdk-js-ai-context --skill arcgis-geometry-operations
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/saschabrunnerch/arcgis-maps-sdk-js-ai-context --skill arcgis-geometry-operations

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于几何对象创建和空间运算操作处理。支持缓冲区分析、联合运算等常用 GIS 算法。推荐使用 bufferOperator、unionOperator 等新运算符API。需避免使用已移除的 geometryEngine 模块方法。

arcgis-geometry-operations 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/arcgis-geometry-operations

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/saschabrunnerch/arcgis-maps-sdk-js-ai-context…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

arcgis-geometry-operations 怎么安装?

在终端执行 npx skills add https://github.com/saschabrunnerch/arcgis-maps-sdk-js-ai-context --skill ar…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

arcgis-geometry-operations 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

arcgis-geometry-operations 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

arcgis-geometry-operations 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

arcgis-geometry-operations 用的人多吗?

公开数据是累计安装 1,137 次,近一周安装 46 次,下载 357 次,GitHub 13 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

arcgis-geometry-operations 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
arcgis-geometry-operations

arcgis 几何操作 · 本页

1,13713只读MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

ArcGIS Geometry Operations

Use this skill for creating geometries and performing spatial operations with geometry operators.

Important: The geometryEngine and geometryEngineAsync modules were removed in v5.0 (deprecated since 4.29). Use geometry operators exclusively.

Import Patterns

Direct ESM Imports

import Point from "@arcgis/core/geometry/Point.js";
import Polygon from "@arcgis/core/geometry/Polygon.js";
import bufferOperator from "@arcgis/core/geometry/operators/bufferOperator.js";
import unionOperator from "@arcgis/core/geometry/operators/unionOperator.js";

Dynamic Imports (CDN)

const Point = await $arcgis.import("@arcgis/core/geometry/Point.js");
const [bufferOperator, unionOperator] = await $arcgis.import([
  "@arcgis/core/geometry/operators/bufferOperator.js",
  "@arcgis/core/geometry/operators/unionOperator.js",
]);

Geometry Classes Overview

ClassUse CaseImport Path
PointSingle location (x, y, z, m)geometry/Point.js
PolylineLines and pathsgeometry/Polyline.js
PolygonAreas with ringsgeometry/Polygon.js
MultipointCollection of pointsgeometry/Multipoint.js
ExtentBounding boxgeometry/Extent.js
CircleCircular geometrygeometry/Circle.js
Mesh3D mesh with vertices and facesgeometry/Mesh.js

Creating Geometries

Point

// Using autocast (plain object)
const point = {
  type: "point",
  longitude: -118.80657,
  latitude: 34.02749,
  z: 1000,
  spatialReference: { wkid: 4326 },
};

// Using x, y coordinates (projected)
const point = {
  type: "point",
  x: -13044706,
  y: 4036320,
  spatialReference: { wkid: 102100 },
};

Polyline

const polyline = {
  type: "polyline",
  paths: [
    [
      [-118.821, 34.014],
      [-118.815, 34.014],
      [-118.809, 34.01],
    ],
  ],
  spatialReference: { wkid: 4326 },
};

// Multi-path
const multiPath = {
  type: "polyline",
  paths: [
    [
      [-118.821, 34.014],
      [-118.815, 34.014],
    ],
    [
      [-118.815, 34.022],
      [-118.813, 34.022],
    ],
  ],
};

Polygon

const polygon = {
  type: "polygon",
  rings: [
    // Outer ring (clockwise)
    [
      [-118.818, 34.02],
      [-118.807, 34.02],
      [-118.807, 34.029],
      [-118.818, 34.029],
      [-118.818, 34.02],
    ],
    // Inner ring/hole (counter-clockwise)
    [
      [-118.815, 34.022],
      [-118.81, 34.022],
      [-118.81, 34.026],
      [-118.815, 34.026],
      [-118.815, 34.022],
    ],
  ],
  spatialReference: { wkid: 4326 },
};

Extent

const extent = {
  type: "extent",
  xmin: -118.82,
  ymin: 34.01,
  xmax: -118.8,
  ymax: 34.03,
  spatialReference: { wkid: 4326 },
};

Circle

import Circle from "@arcgis/core/geometry/Circle.js";

const circle = new Circle({
  center: [-118.80657, 34.02749],
  radius: 1000,
  radiusUnit: "meters",
  geodesic: true,
  spatialReference: { wkid: 4326 },
});

Multipoint

const multipoint = {
  type: "multipoint",
  points: [
    [-118.821, 34.014],
    [-118.815, 34.014],
    [-118.809, 34.01],
  ],
  spatialReference: { wkid: 4326 },
};

Geometry Operators

Each operator is imported individually for tree-shaking. Some operators require await operator.load() before use.

Buffer Operations

import bufferOperator from "@arcgis/core/geometry/operators/bufferOperator.js";

await bufferOperator.load();

// Simple buffer (distance in meters by default)
const buffered = bufferOperator.execute(point, 1000);

// Buffer with unit
const buffered = bufferOperator.execute(point, 500, { unit: "meters" });

// Geodesic buffer (for geographic coordinates)
import geodesicBufferOperator from "@arcgis/core/geometry/operators/geodesicBufferOperator.js";

await geodesicBufferOperator.load();
const geoBuffered = geodesicBufferOperator.execute(point, 1000, {
  unit: "meters",
});

Spatial Relationships

All relationship operators return a boolean.

import containsOperator from "@arcgis/core/geometry/operators/containsOperator.js";
import withinOperator from "@arcgis/core/geometry/operators/withinOperator.js";
import intersectsOperator from "@arcgis/core/geometry/operators/intersectsOperator.js";
import crossesOperator from "@arcgis/core/geometry/operators/crossesOperator.js";
import overlapsOperator from "@arcgis/core/geometry/operators/overlapsOperator.js";
import touchesOperator from "@arcgis/core/geometry/operators/touchesOperator.js";
import disjointOperator from "@arcgis/core/geometry/operators/disjointOperator.js";
import equalsOperator from "@arcgis/core/geometry/operators/equalsOperator.js";

// Contains - geometry1 completely contains geometry2
containsOperator.execute(polygon, point); // boolean

// Within - geometry1 is completely within geometry2
withinOperator.execute(point, polygon); // boolean

// Intersects - geometries share any space
intersectsOperator.execute(polygon1, polygon2); // boolean

// Crosses, Overlaps, Touches, Disjoint, Equals
crossesOperator.execute(line, polygon);
overlapsOperator.execute(polygon1, polygon2);
touchesOperator.execute(polygon1, polygon2);
disjointOperator.execute(polygon1, polygon2);
equalsOperator.execute(geom1, geom2);

Set Operations

import unionOperator from "@arcgis/core/geometry/operators/unionOperator.js";
import intersectionOperator from "@arcgis/core/geometry/operators/intersectionOperator.js";
import differenceOperator from "@arcgis/core/geometry/operators/differenceOperator.js";
import symmetricDifferenceOperator from "@arcgis/core/geometry/operators/symmetricDifferenceOperator.js";
import clipOperator from "@arcgis/core/geometry/operators/clipOperator.js";

// Union - combine geometries
const combined = unionOperator.execute([polygon1, polygon2, polygon3]);

// Intersection - common area
const common = intersectionOperator.execute(polygon1, polygon2);

// Difference - subtract geometry2 from geometry1
const diff = differenceOperator.execute(polygon1, polygon2);

// Symmetric Difference - areas in either but not both
const symDiff = symmetricDifferenceOperator.execute(polygon1, polygon2);

// Clip - clip geometry by extent
const clipped = clipOperator.execute(polygon, extent);

Measurements

import areaOperator from "@arcgis/core/geometry/operators/areaOperator.js";
import geodeticAreaOperator from "@arcgis/core/geometry/operators/geodeticAreaOperator.js";
import lengthOperator from "@arcgis/core/geometry/operators/lengthOperator.js";
import geodeticLengthOperator from "@arcgis/core/geometry/operators/geodeticLengthOperator.js";
import distanceOperator from "@arcgis/core/geometry/operators/distanceOperator.js";
import geodeticDistanceOperator from "@arcgis/core/geometry/operators/geodeticDistanceOperator.js";

// Area (polygons)
const area = areaOperator.execute(polygon);
const geoArea = geodeticAreaOperator.execute(polygon, {
  unit: "square-kilometers",
});

// Length (polylines)
const length = lengthOperator.execute(polyline);
const geoLength = geodeticLengthOperator.execute(polyline, {
  unit: "kilometers",
});

// Distance between geometries
const dist = distanceOperator.execute(point1, point2);
const geoDist = geodeticDistanceOperator.execute(point1, point2, {
  unit: "kilometers",
});

Geometry Manipulation

import simplifyOperator from "@arcgis/core/geometry/operators/simplifyOperator.js";
import generalizeOperator from "@arcgis/core/geometry/operators/generalizeOperator.js";
import densifyOperator from "@arcgis/core/geometry/operators/densifyOperator.js";
import offsetOperator from "@arcgis/core/geometry/operators/offsetOperator.js";
import convexHullOperator from "@arcgis/core/geometry/operators/convexHullOperator.js";
import centroidOperator from "@arcgis/core/geometry/operators/centroidOperator.js";
import labelPointOperator from "@arcgis/core/geometry/operators/labelPointOperator.js";

// Simplify - remove self-intersections
const simplified = simplifyOperator.execute(polygon);

// Generalize - reduce vertices
const generalized = generalizeOperator.execute(polyline, {
  maxDeviation: 100,
  unit: "meters",
});

// Densify - add vertices
const densified = densifyOperator.execute(polyline, {
  maxSegmentLength: 100,
  unit: "meters",
});

// Offset - create parallel geometry
const offsetGeom = offsetOperator.execute(polyline, {
  distance: 50,
  unit: "meters",
  joinType: "round",
});

// Convex Hull
const hull = convexHullOperator.execute(polygon);

// Centroid
const center = centroidOperator.execute(polygon);

// Label Point (guaranteed inside polygon)
const label = labelPointOperator.execute(polygon);

Available Operators

CategoryOperators
RelationshipcontainsOperator, crossesOperator, disjointOperator, equalsOperator, intersectsOperator, isNearOperator, overlapsOperator, relateOperator, touchesOperator, withinOperator
Set OperationsclipOperator, cutOperator, differenceOperator, intersectionOperator, symmetricDifferenceOperator, unionOperator
BufferbufferOperator, geodesicBufferOperator, graphicBufferOperator
ShapeautoCompleteOperator, boundaryOperator, convexHullOperator, simplifyOperator, simplifyOGCOperator, alphaShapeOperator, minimumBoundingCircleOperator
MeasurementareaOperator, geodeticAreaOperator, lengthOperator, geodeticLengthOperator, distanceOperator, geodeticDistanceOperator
TransformdensifyOperator, geodeticDensifyOperator, generalizeOperator, offsetOperator, affineTransformOperator, reshapeOperator, extendOperator
AnalysiscentroidOperator, labelPointOperator, proximityOperator, geodesicProximityOperator
ProjectionprojectOperator, shapePreservingProjectOperator
ConversionlinesToPolygonsOperator, multiPartToSinglePartOperator, polygonSlicerOperator, polygonOverlayOperator

Projection (projectOperator)

import projectOperator from "@arcgis/core/geometry/operators/projectOperator.js";

await projectOperator.load();

// Project to new spatial reference
const projected = projectOperator.execute(geometry, { wkid: 4326 });

// With geographic transformation
const projected = projectOperator.execute(
  geometry,
  { wkid: 4326 },
  {
    geographicTransformation: {
      steps: [{ wkid: 108190 }],
    },
  },
);
For details on coordinate systems and transformations, see arcgis-coordinates-projection.

Web Mercator Utilities

import webMercatorUtils from "@arcgis/core/geometry/support/webMercatorUtils.js";

const webMercatorGeom =
  webMercatorUtils.geographicToWebMercator(geographicPoint);
const geoGeom = webMercatorUtils.webMercatorToGeographic(webMercatorPoint);
const canProject = webMercatorUtils.canProject(
  geom1.spatialReference,
  geom2.spatialReference,
);

Mesh (3D Geometry)

import Mesh from "@arcgis/core/geometry/Mesh.js";

const box = Mesh.createBox(location, {
  size: { width: 100, height: 100, depth: 50 },
  material: { color: "red" },
});

const sphere = Mesh.createSphere(location, {
  size: 50,
  material: { color: "blue" },
});

const cylinder = Mesh.createCylinder(location, {
  size: { width: 50, height: 100 },
  material: { color: "green" },
});

// Load from glTF/GLB
const mesh = await Mesh.createFromGLTF(location, "model.glb");

JSON Utilities

import jsonUtils from "@arcgis/core/geometry/support/jsonUtils.js";

// Create geometry from JSON
const geometry = jsonUtils.fromJSON({
  rings: [
    [
      [-118.8, 34.0],
      [-118.7, 34.0],
      [-118.7, 34.1],
      [-118.8, 34.1],
      [-118.8, 34.0],
    ],
  ],
  spatialReference: { wkid: 4326 },
});

// Get JSON from geometry
const json = geometry.toJSON();

Common Patterns

Check if Point is in Polygon

import containsOperator from "@arcgis/core/geometry/operators/containsOperator.js";

function isPointInPolygon(point, polygon) {
  return containsOperator.execute(polygon, point);
}

Buffer and Query

import geodesicBufferOperator from "@arcgis/core/geometry/operators/geodesicBufferOperator.js";

async function queryWithinDistance(point, distance, layer) {
  await geodesicBufferOperator.load();
  const bufferGeom = geodesicBufferOperator.execute(point, distance, {
    unit: "meters",
  });
  const query = layer.createQuery();
  query.geometry = bufferGeom;
  query.spatialRelationship = "contains";
  return await layer.queryFeatures(query);
}

Calculate Total Area

import unionOperator from "@arcgis/core/geometry/operators/unionOperator.js";
import geodeticAreaOperator from "@arcgis/core/geometry/operators/geodeticAreaOperator.js";

function calculateTotalArea(polygons) {
  const combined = unionOperator.execute(polygons);
  return geodeticAreaOperator.execute(combined, { unit: "square-kilometers" });
}

Common Pitfalls

  1. Spatial reference mismatch: Always ensure geometries are in the same spatial reference before operations: import projectOperator from "@arcgis/core/geometry/operators/projectOperator.js"; await projectOperator.load(); if (!geom1.spatialReference.equals(geom2.spatialReference)) {geom2 = projectOperator.execute(geom2, geom1.spatialReference);}
  2. Geodesic vs planar: Use geodesic operators for geographic coordinates (WGS84/4326). Use planar operators for projected coordinate systems: const bufferOp = geometry.spatialReference.isGeographic? geodesicBufferOperator: bufferOperator;
  3. Ring orientation: Outer rings must be clockwise, holes counter-clockwise. Use simplifyOperator if unsure.
  4. Self-intersecting polygons: Use simplifyOperator.execute(polygon) before operations on user-drawn polygons.
  5. Forgetting to load operators: Some operators require await operator.load() before calling .execute(). Check operator documentation.
  6. Using removed geometryEngine: The geometryEngine and geometryEngineAsync modules were removed in 5.0. Use individual operators instead.

Reference Samples

  • ge-geodesicbuffer - Geodesic buffer operations
  • gx-geodesicbuffer - Geodesic buffer (alternate)
  • geometry-operator-centroid - Computing geometry centroids
  • geometry-operator-offset-visualizer - Visualizing geometry offsets
  • geometry-operator-proximity - Proximity analysis with geometry operators
  • geometry-operator-worker - Running geometry operations in a web worker
  • geometry-mesh-primitives - 3D mesh primitive creation
  • geometry-mesh-elevation - 3D mesh with elevation

Related Skills

  • See arcgis-coordinates-projection for coordinate systems, projection details, and coordinate formatting.
  • See arcgis-rest-services for server-side geometry operations via geometry service.
  • See arcgis-spatial-analysis for analysis objects and feature reduction.

平台分布

OpenCode

31.62%
按下载量换算113

trae

22.62%
按下载量换算81

Codex

17.49%
按下载量换算62

Claude Code

13.67%
按下载量换算49

Antigravity

7.79%
按下载量换算28

Gemini CLI

3.29%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills