Files
agent-profiles/suites-help/系统使用手册/快速入门.md
T

66 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 快速入门
## 第一步:安装 gis-actions
```bash
curl -sLO https://git.mercator.cn/api/packages/SuiteHub/generic/gis-actions/3.0.2/gis-actions_3.0.2_all.deb
sudo dpkg -i gis-actions_3.0.2_all.deb
```
前提条件:Linux 系统 + Docker。
## 第二步:获取 API Key
访问 https://auth.mercator.cn,创建 API Key`mk_` 开头)。
```bash
export AGENTGIS_API_KEY=mk_xxxxxxxxxxxxx
```
## 第三步:浏览套件
```bash
# 列出所有套件
curl -s https://suites.mercator.cn/api/v1/suites | python3 -m json.tool
# 搜索套件
curl -s "https://suites.mercator.cn/api/v1/suites/search?q=缓冲区"
```
## 第四步:查看参数
```bash
curl -s https://suites.mercator.cn/api/v1/suites/<suite-id> | jq '.params_schema'
```
返回示例:
```json
{
"type": "object",
"required": ["buffer_distance"],
"properties": {
"buffer_distance": {
"type": "number",
"default": 0.5,
"description": "缓冲区距离(度)"
}
}
}
```
## 第五步:执行套件
```bash
agc run /tmp/output --suite-id <suite-id> --input buffer_distance=0.5
```
执行在本地 Docker 容器中完成,数据不上传云端。
## 第六步:查看结果
执行完成后,结果文件写入 `/tmp/output/` 目录。
## 数据安全
**数据永不离开本地。** 你的文件始终在你的机器上处理。