返回顶部
t

turf-skills草皮技能

|

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.2
安全检测
已通过
102
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

turf-skills

turf-skills

用于 Claude Code 的 Turf.js 空间分析技能。

使用方法

bash
turf-skills --action <名称> [选项]

操作

Measurement 测量

操作描述必填参数可选参数
distance两点距离input, input2units
area
多边形面积(m²) | input | | | length | 线长度 | input | units | | bearing | 方位角 | input, input2 | | | destination | 目标点 | input | distance, direction, units | | midpoint | 中点 | input, input2 | | | center | 中心点 | input | | | centroid | 质心 | input | | | centerOfMass | 重心 | input | | | along | 沿线取点 | input | distance, units | | bbox | 边界框 | input | | | bboxPolygon | 边界框多边形 | input or bbox | | | envelope | 包络矩形 | input | |

Query 空间查询

操作描述必填参数可选参数
booleanPointInPolygon点在多边形内input(point), input2(polygon)
booleanContains
包含 | input, input2 | | | booleanCrosses | 交叉 | input, input2 | | | booleanDisjoint | 不相交 | input, input2 | | | booleanEqual | 相等 | input, input2 | | | booleanIntersects | 相交 | input, input2 | | | booleanOverlap | 重叠 | input, input2 | | | booleanWithin | 在内部 | input, input2 | | | booleanParallel | 平行 | input, input2 | | | booleanPointOnLine | 点在线上 | input(point), input2(line) | | | nearestPoint | 最近点 | input(point), input2(FC) | |

Transformation 变换

操作描述必填参数可选参数
buffer缓冲区inputradius, units
union
合并 | input, input2 | | | intersect | 求交 | input, input2 | | | difference | 求差 | input, input2 | | | simplify | 简化 | input | tolerance | | convex | 凸包 | input | | | concave | 凹包 | input | maxEdge, units | | dissolve | 融合 | input(FC) | propertyName | | voronoi | 泰森多边形 | input(points) | bbox | | tin | 不规则三角网 | input(points) | propertyName | | bezierSpline | 贝塞尔曲线 | input(line) | resolution, sharpness | | transformRotate | 旋转 | input | angle | | transformScale | 缩放 | input | factor | | transformTranslate | 平移 | input | distance, direction, units |

Helpers 创建

操作描述必填参数可选参数
point创建点coordinatesproperties
lineString
创建线 | coordinates | properties | | polygon | 创建面 | coordinates | properties | | multiPoint | 创建多点 | coordinates | properties | | multiLineString | 创建多线 | coordinates | properties | | multiPolygon | 创建多面 | coordinates | properties | | randomPoint | 随机点 | | count, bbox | | randomLineString | 随机线 | | count, bbox | | randomPolygon | 随机面 | | count, bbox |

Interpolation 插值/网格

操作描述必填参数可选参数
interpolate反距离加权插值input(points)cellSide, gridType, propertyName, units
isobands
等值面 | input(points) | breaks, propertyName | | isolines | 等值线 | input(points) | breaks, propertyName | | hexGrid | 六边形网格 | bbox, cellSide | units | | pointGrid | 点网格 | bbox, cellSide | units | | squareGrid | 方形网格 | bbox, cellSide | units | | triangleGrid | 三角网格 | bbox, cellSide | units |

Clustering 聚类

操作描述必填参数可选参数
clustersKmeansK均值聚类input(points FC)numberOfClusters
clustersDbscan
密度聚类 | input(points FC) | maxDistance, units, minPoints |

示例

计算距离

bash
turf-skills --action distance \
--input {type:Point,coordinates:[120,30]} \
--input2 {type:Point,coordinates:[121,31]} \
--units kilometers

点在多边形内

bash
turf-skills --action booleanPointInPolygon \
--input {type:Point,coordinates:[120.5,30.5]} \
--input2 {type:Polygon,coordinates:[[[120,30],[121,30],[121,31],[120,31],[120,30]]]}

缓冲区

bash
turf-skills --action buffer \
--input {type:Point,coordinates:[120,30]} \
--radius 5 --units kilometers

从文件读取

bash
turf-skills --action area --file polygon.geojson
turf-skills --action booleanContains --file polygon.geojson --file2 point.geojson

输出到文件

bash
turf-skills --action buffer --file point.geojson --radius 10 --output result.geojson

创建几何

bash
turf-skills --action point --coordinates [120,30] --properties {name:test}
turf-skills --action randomPoint --count 100 --bbox [120,30,121,31]

网格生成

bash
turf-skills --action hexGrid --bbox [120,30,121,31] --cellSide 5 --units kilometers

聚类分析

bash
turf-skills --action clustersKmeans --file points.geojson --numberOfClusters 5
turf-skills --action clustersDbscan --file points.geojson --maxDistance 1 --minPoints 3

自然语言模式

常见查询

查询模式操作示例
distance between [coordinates]distanceCalculate distance between [120,30] and [121,31]
area of [polygon]
area | Find area of this polygon | | length of [line] | length | Calculate length of this line in km | | is [point] inside [polygon] | booleanPointInPolygon | Is this point inside the polygon? | | buffer [radius] km/mi around [point]| buffer | Create a 5km buffer around this point | | convex hull of [points]

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 turf-skills-1776078984 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 turf-skills-1776078984 技能

通过命令行安装

skillhub install turf-skills-1776078984

下载

⬇ 下载 turf-skills v1.0.2(免费)

文件大小: 39.25 KB | 发布时间: 2026-4-14 13:24

v1.0.2 最新 2026-4-14 13:24
优化触发描述,增强文档,提升触发准确率至100%

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部