返回顶部
s

supermap-wasi-geo SuperMap几何分析

使用SuperMap WebAssembly 进行几何分析,支持缓冲区、凸包、相交、合并、擦除、裁剪等 20+ 种几何操作

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

supermap-wasi-geo

SuperMap WASI 几何分析技能

基于 SuperMap WebAssembly 的高性能几何分析工具。支持 20 余种几何分析操作,包括缓冲区分析、拓扑运算、距离计算等。

安装

bash

进入项目目录


cd C:\supermap-wasi-geo

安装为全局命令(可选)

npm link

安装后可以直接使用 wasi-geo 命令,否则需要使用 node bin/supermap-wasi-geo.js。

支持的操作

单几何操作

操作说明参数
buffer缓冲区分析--input, --radius
convex-hull
凸包计算 | --input | | resample | 重采样分析 | --input, --tolerance | | smooth | 线要素光滑 | --input, --smoothness | | geodesic-distance | 测地线距离 | --input, [--major-axis], [--flatten] | | geodesic-area | 测地线面积 | --input, [--major-axis], [--flatten] | | parallel | 计算平行线 | --input, --distance |

双几何操作

操作说明参数
intersect相交分析--input1, --input2
union
合并分析 | --input1, --input2 | | erase | 擦除分析 | --input1, --input2 | | xor | 异或分析 | --input1, --input2 | | clip | 裁剪分析 | --input1, --input2 | | has-intersection | 判断是否相交 | --input1, --input2, [--tolerance] | | has-touch | 判断边界是否接触 | --input1, --input2, [--tolerance] | | is-identical | 判断是否相等 | --input1, --input2, [--tolerance] | | distance | 计算两几何距离 | --input1, --input2 |

点线关系分析

操作说明参数
is-left点是否在线左侧--point, --line-start, --line-end
is-right
点是否在线右侧 | --point, --line-start, --line-end | | is-point-on-line | 点是否在线段上 | --point, --line-start, --line-end, [--extended] | | is-parallel | 两线是否平行 | --line1-start, --line1-end, --line2-start, --line2-end | | distance-to-line | 点到线段距离 | --point, --line-start, --line-end |

使用方式

Windows 命令行 (CMD)

cmd

基本用法:操作名 + 参数


node bin\supermap-wasi-geo.js buffer --input {\type\:\Point\,\coordinates\:[120,30]} --radius 2

显示帮助

node bin\supermap-wasi-geo.js --help

显示特定操作帮助

node bin\supermap-wasi-geo.js buffer --help

Windows PowerShell

powershell

基本用法(使用单引号包裹)


node bin/supermap-wasi-geo.js buffer --input {type:Point,coordinates:[120,30]} --radius 2

管道输入

echo {type:Point,coordinates:[120,30]} | node bin/supermap-wasi-geo.js buffer --radius 2

通用参数

参数说明
--input <json>GeoJSON 字符串输入
--input-file <path>
从文件读取 GeoJSON | | --output | 输出到文件(默认 stdout) | | --pretty | 美化 JSON 输出 | | --help, -h | 显示帮助信息 | | --version, -v | 显示版本信息 |

示例

1. 缓冲区分析 (Windows CMD)

cmd
rem 点缓冲区
node bin\supermap-wasi-geo.js buffer --input {\type\:\Point\,\coordinates\:[120,30]} --radius 2 --pretty

rem 线缓冲区
node bin\supermap-wasi-geo.js buffer --input {\type\:\LineString\,\coordinates\:[[0,0],[10,0]]} --radius 0.5 --pretty

rem 多边形缓冲区
node bin\supermap-wasi-geo.js buffer --input {\type\:\Polygon\,\coordinates\:[[[0,0],[1,0],[1,1],[0,1],[0,0]]]} --radius 0.1 --pretty

2. 距离计算 (Windows CMD)

cmd
rem 两点距离
node bin\supermap-wasi-geo.js distance --input1 {\type\:\Point\,\coordinates\:[0,0]} --input2 {\type\:\Point\,\coordinates\:[3,4]}

rem 输出: {type:Result,distance:5}

3. 相交判断 (Windows CMD)

cmd
node bin\supermap-wasi-geo.js has-intersection --input1 {\type\:\Point\,\coordinates\:[0,0]} --input2 {\type\:\Point\,\coordinates\:[1,1]}

rem 输出: {type:Result,hasIntersection:false}

4. 点线关系 (Windows CMD)

cmd
rem 判断点是否在线左侧
node bin\supermap-wasi-geo.js is-left --point [0,1] --line-start [0,0] --line-end [1,0]

rem 判断点是否在线段上
node bin\supermap-wasi-geo.js is-point-on-line --point [0.5,0] --line-start [0,0] --line-end [1,0]

rem 计算点到线段距离
node bin\supermap-wasi-geo.js distance-to-line --point [0,1] --line-start [0,0] --line-end [1,0]

5. 测地线计算 (Windows CMD)

cmd
rem 测地线距离(单位:米)
node bin\supermap-wasi-geo.js geodesic-distance --input {\type\:\LineString\,\coordinates\:[[0,0],[1,1]]}

rem 测地线面积(单位:平方米)
node bin\supermap-wasi-geo.js geodesic-area --input {\type\:\Polygon\,\coordinates\:[[[0,0],[1,0],[1,1],[0,1],[0,0]]]}

6. 文件输入输出

cmd
rem 从文件读取,输出到文件
node bin\supermap-wasi-geo.js buffer --input-file input.geojson --radius 2 --output buffer.geojson

rem 双几何操作
node bin\supermap-wasi-geo.js intersect --input1-file polygon1.geojson --input2-file polygon2.geojson --output intersect.geojson

7. PowerShell 示例

powershell

缓冲区分析


node bin/supermap-wasi-geo.js buffer --input {type:Point,coordinates:[120,30]} --radius 2 --pretty

距离计算

node bin/supermap-wasi-geo.js distance --input1 {type:Point,coordinates:[0,0]} --input2 {type:Point,coordinates:[3,4]}

管道操作

echo {type:Point,coordinates:[0,0]} | node bin/supermap-wasi-geo.js buffer --radius 1

支持的几何类型

  • - Point - 点
  • LineString - 线
  • Polygon - 多边形
  • MultiPoint - 多点
  • MultiLineString - 多线
  • MultiPolygon - 多多边形

快速测试

cmd
cd e:\wasi_test

rem 显示帮助
node bin\supermap-wasi-geo.js --help

rem 测试缓冲区
node bin\supermap-wasi-geo.js buffer --input {\type\:\Point\,\coordinates\:[120,30]} --radius

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 supermap-wasi-geo-1776023777 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 supermap-wasi-geo-1776023777 技能

通过命令行安装

skillhub install supermap-wasi-geo-1776023777

下载

⬇ 下载 supermap-wasi-geo v1.1.0(免费)

文件大小: 614.29 KB | 发布时间: 2026-4-13 12:13

v1.1.0 最新 2026-4-13 12:13
No file changes detected between version 1.0.0 and 1.1.0.
- No updates, fixes, or new features included in this release.
- Package contents and documentation remain the same as previous version.

Archiver·手机版·闲社网·闲社论坛·智能体自动化市场· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2026 闲社网·AI智能体论坛·AI自动化解决方案·http://xianshe.com

p2p_official_large
返回顶部