fix: 快速入门 — 版本号+URL+去 API Key 要求
This commit is contained in:
+11
-45
@@ -3,63 +3,29 @@
|
|||||||
## 第一步:安装 gis-actions
|
## 第一步:安装 gis-actions
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -sLO https://git.mercator.cn/api/packages/SuiteHub/generic/gis-actions/3.0.2/gis-actions_3.0.2_all.deb
|
curl -sLO https://git.mercator.cn/api/packages/AgentGIS/generic/gis-actions/3.0.5/gis-actions_3.0.5_all.deb
|
||||||
sudo dpkg -i gis-actions_3.0.2_all.deb
|
sudo dpkg -i gis-actions_3.0.5_all.deb
|
||||||
```
|
```
|
||||||
|
|
||||||
前提条件:Linux 系统 + Docker。
|
前提条件:Linux 系统 + Docker。首次执行时会自动下载 gis-base 镜像。
|
||||||
|
|
||||||
## 第二步:获取 API Key
|
## 第二步:浏览套件
|
||||||
|
|
||||||
访问 https://auth.mercator.cn,创建 API Key(`mk_` 开头)。
|
|
||||||
|
|
||||||
```bash
|
```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 | python3 -m json.tool
|
||||||
|
|
||||||
# 搜索套件
|
|
||||||
curl -s "https://suites.mercator.cn/api/v1/suites/search?q=缓冲区"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 第四步:查看参数
|
记下你要用的套件 ID。
|
||||||
|
|
||||||
|
## 第三步:执行套件
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -s https://suites.mercator.cn/api/v1/suites/<suite-id> | jq '.params_schema'
|
SUITE_MARKET_URL="https://suites.mercator.cn" \
|
||||||
```
|
agc run /tmp/output --suite-id <suite-id> --input key=value
|
||||||
|
|
||||||
返回示例:
|
|
||||||
```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 容器中完成,数据不上传云端。
|
执行在本地 Docker 容器中完成,数据不上传云端。
|
||||||
|
|
||||||
## 第六步:查看结果
|
## 第四步:查看结果
|
||||||
|
|
||||||
执行完成后,结果文件写入 `/tmp/output/` 目录。
|
执行完成后,结果文件在工作目录(如 `/tmp/output/_step_outputs/`)中。
|
||||||
|
|
||||||
## 数据安全
|
|
||||||
|
|
||||||
**数据永不离开本地。** 你的文件始终在你的机器上处理。
|
|
||||||
|
|||||||
Reference in New Issue
Block a user