Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计提醒

turf-skills草坪技巧

Agent Skill

turf-skills 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,927

周安装

162

GitHub Stars

公开资料未说明

下载量

1,283
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:turf-skills(草坪技巧)
来源仓库:https://github.com/zhyt1985/turf-skills
安装命令:
openclaw skills install turf-skills
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install turf-skills

简介

turf-skills 专用于地理空间分析与坐标计算,适合在 OpenClaw 中处理 GeoJSON 数据与地图操作。

  • 支持缓冲区分析、路径规划和区域筛选等空间任务。
  • 通过关键词触发自动匹配对应算法模块。
  • 输入数据需符合标准格式以确保计算精度。
  • 建议结合可视化工具验证结果合理性。turf-skills 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
turf-skills
description
|
license
MIT
metadata
author
zhangyuting
version
1.0.2
project
https://github.com/zhyt1985/turf-skills
compatibility
Node.js >= 16

turf-skills

Turf.js spatial analysis skill for Claude Code.

Usage

turf-skills --action <name> [options]

Actions

Measurement 测量

ActionDescriptionRequiredOptional
distanceDistance between two points 两点距离input, input2units
areaArea of polygon 多边形面积(m²)input
lengthLength of line 线长度inputunits
bearingBearing between points 方位角input, input2
destinationPoint at distance+bearing 目标点inputdistance, direction, units
midpointMidpoint of two points 中点input, input2
centerCenter of features 中心点input
centroidCentroid 质心input
centerOfMassCenter of mass 重心input
alongPoint along line 沿线取点inputdistance, units
bboxBounding box 边界框input
bboxPolygonBbox as polygon 边界框多边形input or bbox
envelopeEnvelope 包络矩形input

Query 空间查询

ActionDescriptionRequiredOptional
booleanPointInPolygonPoint in polygon 点在多边形内input(point), input2(polygon)
booleanContainsFeature contains another 包含input, input2
booleanCrossesFeatures cross 交叉input, input2
booleanDisjointFeatures disjoint 不相交input, input2
booleanEqualFeatures equal 相等input, input2
booleanIntersectsFeatures intersect 相交input, input2
booleanOverlapFeatures overlap 重叠input, input2
booleanWithinFeature within another 在内部input, input2
booleanParallelLines parallel 平行input, input2
booleanPointOnLinePoint on line 点在线上input(point), input2(line)
nearestPointNearest point in collection 最近点input(point), input2(FC)

Transformation 变换

ActionDescriptionRequiredOptional
bufferBuffer zone 缓冲区inputradius, units
unionUnion polygons 合并input, input2
intersectIntersect polygons 求交input, input2
differenceDifference polygons 求差input, input2
simplifySimplify geometry 简化inputtolerance
convexConvex hull 凸包input
concaveConcave hull 凹包inputmaxEdge, units
dissolveDissolve polygons 融合input(FC)propertyName
voronoiVoronoi diagram 泰森多边形input(points)bbox
tinTIN 不规则三角网input(points)propertyName
bezierSplineBezier spline 贝塞尔曲线input(line)resolution, sharpness
transformRotateRotate 旋转inputangle
transformScaleScale 缩放inputfactor
transformTranslateTranslate 平移inputdistance, direction, units

Helpers 创建

ActionDescriptionRequiredOptional
pointCreate point 创建点coordinatesproperties
lineStringCreate line 创建线coordinatesproperties
polygonCreate polygon 创建面coordinatesproperties
multiPointCreate MultiPointcoordinatesproperties
multiLineStringCreate MultiLineStringcoordinatesproperties
multiPolygonCreate MultiPolygoncoordinatesproperties
randomPointRandom points 随机点count, bbox
randomLineStringRandom lines 随机线count, bbox
randomPolygonRandom polygons 随机面count, bbox

Interpolation 插值/网格

ActionDescriptionRequiredOptional
interpolateIDW interpolation 反距离加权插值input(points)cellSide, gridType, propertyName, units
isobandsIsobands 等值面input(points)breaks, propertyName
isolinesIsolines 等值线input(points)breaks, propertyName
hexGridHex grid 六边形网格bbox, cellSideunits
pointGridPoint grid 点网格bbox, cellSideunits
squareGridSquare grid 方形网格bbox, cellSideunits
triangleGridTriangle grid 三角网格bbox, cellSideunits

Clustering 聚类

ActionDescriptionRequiredOptional
clustersKmeansK-means clustering K均值聚类input(points FC)numberOfClusters
clustersDbscanDBSCAN clustering 密度聚类input(points FC)maxDistance, units, minPoints

Examples

Calculate distance 计算距离

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

Point in polygon 点在多边形内

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]]]}'

Buffer 缓冲区

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

Read from file 从文件读取

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

Output to file 输出到文件

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

Create geometry 创建几何

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

Grid generation 网格生成

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

Clustering 聚类分析

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

Natural Language Patterns

Common Queries 常见查询

Query PatternActionExample
"distance between [coordinates]"distance"Calculate 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]"convex"Compute convex hull of these points"
"cluster points into [n] groups"clustersKmeans"Cluster these points into 5 groups"
"nearest point to [location]"nearestPoint"Find nearest point to [120,30]"
"simplify geometry"simplify"Simplify this geometry"
"union/intersect/difference"union/intersect/difference"Union these two polygons"
"generate hex/square/triangle grid"hexGrid/squareGrid/triangleGrid"Generate hex grid for this area"
"rotate/scale/translate"transformRotate/transformScale/transformTranslate"Rotate this polygon by 45 degrees"

Chinese Query Patterns 中文查询模式

查询模式操作示例
"计算...的距离"distance"计算北京和上海的距离"
"计算...的面积"area"计算这个多边形的面积"
"点是否在多边形内"booleanPointInPolygon"天安门是否在五环内?"
"创建...缓冲区"buffer"创建5公里缓冲区"
"计算凸包"convex"计算这些点的凸包"
"聚类分析"clustersKmeans/clustersDbscan"对这些点进行聚类"
"查找最近点"nearestPoint"查找距离[120,30]最近的点"
"生成网格"hexGrid/squareGrid"生成六边形网格"
"旋转/缩放/平移"transformRotate/transformScale/transformTranslate"旋转多边形45度"

Real-World Scenarios 实际场景

# Beijing to Shanghai distance
turf-skills --action distance \
  --input '{"type":"Point","coordinates":[116.397428,39.90923]}' \
  --input2 '{"type":"Point","coordinates":[121.473701,31.230416]}' \
  --units kilometers

# 5km buffer around a location
turf-skills --action buffer \
  --input '{"type":"Point","coordinates":[116.397428,39.90923]}' \
  --radius 5 --units kilometers

# Point in polygon check
turf-skills --action booleanPointInPolygon \
  --input '{"type":"Point","coordinates":[116.397428,39.90923]}' \
  --input2 '{"type":"Polygon","coordinates":[[[116.1,39.7],[116.8,39.7],[116.8,40.1],[116.1,40.1],[116.1,39.7]]]}'

# Generate hex grid for a region
turf-skills --action hexGrid --bbox '[116,39,117,40]' --cellSide 10 --units kilometers

# K-means clustering
turf-skills --action clustersKmeans --file points.geojson --numberOfClusters 3

When to Use This Skill 何时使用此技能

ALWAYS Use For 务必使用:

  • Complex operations: buffer, grid generation, clustering, interpolation
  • GeoJSON output required: when the result needs to be valid GeoJSON
  • Multiple operations: chaining spatial analyses
  • File I/O: reading/writing GeoJSON files

Consider Direct Turf.js For 考虑直接使用:

  • Simple one-off calculations: distance, area, bearing (if already in a Node.js script)
  • Performance-critical loops: when calling the same operation thousands of times

Performance Notes 性能说明:

  • Skill CLI has startup overhead (~1-2 seconds)
  • For complex operations, skill is faster and more efficient
  • Skill ensures consistent Turf.js implementation

Best Practices 最佳实践

1. Input Validation 输入验证

Always validate coordinates before processing:

  • Longitude: -180 to 180
  • Latitude: -90 to 90
  • Ensure polygons are closed (first == last coordinate)

2. Units 单位

  • Default unit: kilometers (千米)
  • Options: kilometers, miles, meters, degrees, radians
  • Always specify units explicitly for clarity

3. File Handling 文件处理

  • Use --file for reading GeoJSON files
  • Use --output to save results
  • Supports both .geojson and .json extensions

4. Error Handling 错误处理

  • Check that required parameters are provided
  • Validate GeoJSON format before passing to actions
  • Handle empty results gracefully

Real-World Use Cases 实际应用场景

1. Delivery Zone Planning 配送范围规划

# Create 5km delivery zones around stores
turf-skills --action buffer \
  --file stores.geojson \
  --radius 5 \
  --units kilometers \
  --output delivery-zones.geojson

2. Geographic Fence Check 地理围栏检测

# Check if customer address is within service area
turf-skills --action booleanPointInPolygon \
  --input '{"type":"Point","coordinates":[lng,lat]}' \
  --file service-area.geojson

3. Store Location Clustering 门店位置聚类

# Cluster customer locations for optimal store placement
turf-skills --action clustersKmeans \
  --file customers.geojson \
  --numberOfClusters 5 \
  --output clusters.geojson

4. Heat Map Grid 热力图网格

# Generate hex grid for population density visualization
turf-skills --action hexGrid \
  --bbox '[116,39,117,40]' \
  --cellSide 1 \
  --units kilometers \
  --output grid.geojson

5. Route Simplification 路线简化

# Simplify GPS track for storage efficiency
turf-skills --action simplify \
  --file gps-track.geojson \
  --tolerance 0.0001 \
  --output simplified-track.geojson

Input/Output Formats 输入输出格式

GeoJSON Feature Structure

{
  "type": "Feature",
  "properties": {
    "name": "Beijing",
    "population": 21540000
  },
  "geometry": {
    "type": "Point",
    "coordinates": [116.397428, 39.90923]
  }
}

Supported Geometry Types

  • Point - 点
  • LineString - 线
  • Polygon - 面
  • MultiPoint - 多点
  • MultiLineString - 多线
  • MultiPolygon - 多面
  • FeatureCollection - 要素集合

Troubleshooting 故障排除

Common Issues 常见问题

Issue: "Error: Unknown action"

  • Solution: Use --list to see available actions

Issue: "Error: Cannot read property"

  • Solution: Check GeoJSON format, ensure proper nesting

Issue: Empty result for intersection/union

  • Solution: Geometries may not overlap; check coordinates

Issue: Distance calculation seems wrong

  • Solution: Verify units parameter (default is kilometers)

Additional Resources 更多资源

  • Turf.js Documentation: https://turfjs.org/
  • GeoJSON Specification: https://geojson.org/
  • Coordinate Reference Systems: https://epsg.io/

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

83.07%
按下载量换算1,066

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills