@dsh-gis/dsh-opengis-skill 0.1.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/README.md +68 -28
  3. package/THIRD_PARTY_NOTICES.md +9 -0
  4. package/adaptations/brutile.md +8 -0
  5. package/adaptations/cesiumjs.md +8 -0
  6. package/adaptations/common.md +19 -0
  7. package/adaptations/deck-gl.md +8 -0
  8. package/adaptations/duckdb-spatial.md +8 -0
  9. package/adaptations/gdal-api.md +8 -0
  10. package/adaptations/gdal.md +8 -0
  11. package/adaptations/geolibre.md +8 -0
  12. package/adaptations/geometry-api-java.md +8 -0
  13. package/adaptations/geometry-api-net.md +8 -0
  14. package/adaptations/geonode.md +8 -0
  15. package/adaptations/geopandas.md +8 -0
  16. package/adaptations/geopipe-agent.md +8 -0
  17. package/adaptations/geoserver-cloud.md +8 -0
  18. package/adaptations/geoserver-rest-api.md +8 -0
  19. package/adaptations/geoserver.md +8 -0
  20. package/adaptations/geotools.md +8 -0
  21. package/adaptations/grass-gis.md +8 -0
  22. package/adaptations/jts.md +8 -0
  23. package/adaptations/kepler-gl.md +8 -0
  24. package/adaptations/leaflet.md +8 -0
  25. package/adaptations/mapbox-gl-js.md +8 -0
  26. package/adaptations/mapserver.md +8 -0
  27. package/adaptations/mapsui.md +8 -0
  28. package/adaptations/nettopologysuite.md +8 -0
  29. package/adaptations/opengis-all.md +9 -0
  30. package/adaptations/opengis-daf.md +9 -0
  31. package/adaptations/opengis-utils-for-java.md +8 -0
  32. package/adaptations/opengis-utils-for-net.md +8 -0
  33. package/adaptations/openlayers.md +8 -0
  34. package/adaptations/pdal.md +8 -0
  35. package/adaptations/postgis.md +8 -0
  36. package/adaptations/proj.md +8 -0
  37. package/adaptations/projnet4geoapi.md +8 -0
  38. package/adaptations/pyqgis.md +8 -0
  39. package/adaptations/qgis-process.md +8 -0
  40. package/adaptations/qgis-server.md +8 -0
  41. package/adaptations/shapely.md +8 -0
  42. package/adaptations/sharpmap.md +8 -0
  43. package/adaptations/spatialite.md +8 -0
  44. package/adaptations/whitebox-tools.md +8 -0
  45. package/assets/brutile/SKILL.md +283 -0
  46. package/assets/cesiumjs/SKILL.md +81 -35
  47. package/assets/deck-gl/SKILL.md +26 -34
  48. package/assets/duckdb-spatial/SKILL.md +363 -0
  49. package/assets/gdal/SKILL.md +55 -33
  50. package/assets/gdal/reference/raster-tools.md +14 -0
  51. package/assets/gdal/reference/vector-tools.md +5 -0
  52. package/assets/gdal-api/SKILL.md +12 -18
  53. package/assets/gdal-api/reference/raster-api.md +7 -0
  54. package/assets/gdal-api/reference/vector-api.md +9 -0
  55. package/assets/geolibre/SKILL.md +357 -0
  56. package/assets/geometry-api-java/SKILL.md +10 -16
  57. package/assets/geometry-api-net/SKILL.md +70 -32
  58. package/assets/geometry-api-net/reference/geometry-types.md +5 -0
  59. package/assets/geonode/SKILL.md +340 -0
  60. package/assets/geopandas/SKILL.md +21 -24
  61. package/assets/geopandas/reference/core-api.md +4 -0
  62. package/assets/geopipe-agent/SKILL.md +29 -31
  63. package/assets/geopipe-agent/reference/steps-reference.md +12 -0
  64. package/assets/geopipe-agent/reference/workflows.md +8 -0
  65. package/assets/geoserver/SKILL.md +10 -15
  66. package/assets/geoserver-cloud/SKILL.md +25 -33
  67. package/assets/geoserver-rest-api/SKILL.md +17 -19
  68. package/assets/geoserver-rest-api/reference/endpoints.md +16 -0
  69. package/assets/geotools/SKILL.md +12 -17
  70. package/assets/geotools/reference/raster-rendering.md +5 -0
  71. package/assets/geotools/reference/vector-io.md +7 -0
  72. package/assets/grass-gis/SKILL.md +26 -33
  73. package/assets/jts/SKILL.md +12 -16
  74. package/assets/jts/reference/geometry-operations.md +13 -0
  75. package/assets/kepler-gl/SKILL.md +306 -0
  76. package/assets/leaflet/SKILL.md +58 -40
  77. package/assets/mapbox-gl-js/SKILL.md +26 -33
  78. package/assets/mapserver/SKILL.md +21 -29
  79. package/assets/mapsui/SKILL.md +109 -63
  80. package/assets/nettopologysuite/SKILL.md +96 -31
  81. package/assets/opengis-all/SKILL.md +91 -289
  82. package/assets/opengis-all/reference/data-stages.md +269 -4
  83. package/assets/opengis-all/reference/workflow-cheatsheets.md +7 -0
  84. package/assets/opengis-daf/SKILL.md +10 -17
  85. package/assets/opengis-utils-for-java/SKILL.md +58 -49
  86. package/assets/opengis-utils-for-java/reference/common-tasks.md +16 -12
  87. package/assets/opengis-utils-for-net/SKILL.md +109 -48
  88. package/assets/opengis-utils-for-net/reference/code-patterns.md +15 -11
  89. package/assets/opengis-utils-for-net/reference/util-classes.md +35 -26
  90. package/assets/openlayers/SKILL.md +81 -28
  91. package/assets/pdal/SKILL.md +25 -27
  92. package/assets/postgis/SKILL.md +80 -35
  93. package/assets/proj/SKILL.md +32 -41
  94. package/assets/projnet4geoapi/SKILL.md +293 -0
  95. package/assets/pyqgis/SKILL.md +33 -30
  96. package/assets/pyqgis/reference/processing-rendering.md +6 -0
  97. package/assets/pyqgis/reference/vector-raster-layers.md +6 -0
  98. package/assets/qgis-process/SKILL.md +75 -33
  99. package/assets/qgis-process/reference/algorithm-cheatsheet.md +6 -0
  100. package/assets/qgis-server/SKILL.md +25 -31
  101. package/assets/shapely/SKILL.md +136 -84
  102. package/assets/shapely/reference/operations-reference.md +12 -0
  103. package/assets/sharpmap/SKILL.md +97 -60
  104. package/assets/spatialite/SKILL.md +358 -0
  105. package/assets/whitebox-tools/SKILL.md +262 -0
  106. package/lib/adaptations.d.ts +53 -0
  107. package/lib/adaptations.js +343 -0
  108. package/lib/catalog.d.ts +7 -1
  109. package/lib/catalog.js +9 -1
  110. package/lib/index.d.ts +10 -1
  111. package/lib/index.js +34 -3
  112. package/lib/skill-file.d.ts +12 -0
  113. package/lib/skill-file.js +133 -18
  114. package/locale/en.json +1 -1
  115. package/locale/zh.json +1 -1
  116. package/package.json +12 -2
  117. package/upstream.json +73 -57
@@ -1,26 +1,19 @@
1
1
  ---
2
2
  name: geoserver-cloud
3
- description: "Use when deploying GeoServer Cloud 3.0.2 on Docker Compose or Kubernetes — gateway serving WMS/WFS/WCS/WPS/GWC microservices under /geoserver/cloud, PgConfig vs datadir backends, RabbitMQ config-bus sync, Helm chart geoservercloud 3.0.2, and diagnosing 502s via actuator/health and Consul registration."
4
- tags:
5
- - java
6
- - server
7
- - wms
8
- - wfs
9
- - wmts
10
- - cloud
11
- - kubernetes
12
- - docker
13
- - microservices
14
- - spring-cloud
3
+ description: "Use when deploying GeoServer Cloud 3.0.2.1 on Docker Compose or Kubernetes — gateway serving WMS/WFS/WCS/WPS/GWC microservices under /geoserver/cloud, PgConfig vs datadir backends, RabbitMQ config-bus sync, Helm chart geoservercloud 3.0.3, and diagnosing 502s via actuator/health and Consul registration."
4
+ license: MIT
5
+ metadata:
6
+ category: gis
7
+ tags: "java, server, wms, wfs, wmts, cloud, kubernetes, docker, microservices, spring-cloud"
15
8
  ---
16
9
 
17
10
  > **项目地址:** <https://github.com/geoserver/geoserver-cloud>
18
11
  >
19
12
  > **官方文档:** <https://geoserver.org/geoserver-cloud/>
20
13
  >
21
- > **Docker Hub:** <https://hub.docker.com/u/geoservercloud>(镜像标签与 GeoServer 主版本对应,如 `3.0.2`)
14
+ > **Docker Hub:** <https://hub.docker.com/u/geoservercloud>(镜像标签形如 `3.0.2.1`,尾段为该版本线的补丁号)
22
15
  >
23
- > **最新版本:** 3.0.2(2026-10-20,[GitHub Releases](https://github.com/geoserver/geoserver-cloud/releases))
16
+ > **最新版本:** 3.0.2.1(2026-11-03,截至 2026-11,[GitHub Releases](https://github.com/geoserver/geoserver-cloud/releases));配套 Helm chart `geoservercloud` 3.0.3
24
17
  >
25
18
  > **许可证:** GPL-2.0
26
19
 
@@ -43,7 +36,7 @@ GeoServer Cloud(GS Cloud):
43
36
  | 服务 | 镜像 | 用途 |
44
37
  |------|------|------|
45
38
  | `gateway` | `geoservercloud/geoserver-cloud-gateway` | 网关 |
46
- | `discovery` | `geoservercloud/geoserver-cloud-discovery` | 服务发现(3.x 的官方 compose 改用 `hashicorp/consul`) |
39
+ | `discovery` | —(3.x 不再发布该镜像) | 服务发现:官方 compose/K8s 改用 `hashicorp/consul`,`geoservercloud/geoserver-cloud-discovery` 镜像在 Docker Hub 已 404 |
47
40
  | `config` | `geoservercloud/geoserver-cloud-config` | 配置中心 |
48
41
  | `web-ui` | `geoservercloud/geoserver-cloud-webui` | 管理界面 |
49
42
  | `rest` | `geoservercloud/geoserver-cloud-rest` | REST API |
@@ -98,7 +91,7 @@ PGCONFIG_SCHEMA: "pgconfig" # 启动时自动创建 schema
98
91
  ## Kubernetes(Helm)
99
92
 
100
93
  ```bash
101
- # Chart:camptocamp/helm-geoserver-cloud(chart 名 geoservercloud,最新 3.0.2)
94
+ # Chart:camptocamp/helm-geoserver-cloud(chart 名 geoservercloud,最新 3.0.3)
102
95
  helm repo add geoserver-cloud https://camptocamp.github.io/helm-geoserver-cloud
103
96
  helm repo update
104
97
  ```
@@ -110,7 +103,7 @@ helm repo update
110
103
  > dependencies:
111
104
  > - name: geoservercloud
112
105
  > repository: https://camptocamp.github.io/helm-geoserver-cloud
113
- > version: 3.0.2
106
+ > version: 3.0.3
114
107
  > ```
115
108
  >
116
109
  > ```yaml
@@ -182,7 +175,7 @@ management:
182
175
  ```bash
183
176
  docker run -e SPRING_PROFILES_ACTIVE=datadir \
184
177
  -v /mnt/gsdata:/opt/app/data_directory \
185
- geoservercloud/geoserver-cloud-wms:3.0.2
178
+ geoservercloud/geoserver-cloud-wms:3.0.2.1
186
179
  ```
187
180
 
188
181
  ---
@@ -198,17 +191,6 @@ docker run -e SPRING_PROFILES_ACTIVE=datadir \
198
191
 
199
192
  ---
200
193
 
201
- ## 常见问题
202
-
203
- | 问题 | 解决 |
204
- |------|------|
205
- | 配置不同步 | 检查 RabbitMQ 可达 + `GEOSERVER_BUS_ENABLED=true` |
206
- | Web UI 改了 wms 没生效 | 检查事件订阅 |
207
- | 启动顺序错乱 | `depends_on` + 健康检查;K8s 用 `initContainers` |
208
- | OOM | 调整 `-Xmx`,按服务独立资源 |
209
- | Gateway 502 / 服务不可达 | 检查目标服务健康状态与 Consul 注册(服务名解析:`wms`、`wfs` 等) |
210
- | 瓦片 404 / 缓存未命中 | 确认 gwc 服务已部署、`GEOSERVER_BASE_PATH` 与请求路径一致,必要时重新 seed |
211
-
212
194
  ---
213
195
 
214
196
  ## 典型工作流
@@ -247,15 +229,25 @@ kubectl -n gis get deploy | grep wms
247
229
  kubectl -n gis scale deploy <wms-deployment> --replicas=10
248
230
  ```
249
231
 
250
- ## DeepSeek Harness 使用建议
232
+ ## 常见问题
233
+
234
+ | 问题 | 解决 |
235
+ |------|------|
236
+ | 配置不同步 | 检查 RabbitMQ 可达 + `GEOSERVER_BUS_ENABLED=true` |
237
+ | Web UI 改了 wms 没生效 | 检查事件订阅 |
238
+ | 启动顺序错乱 | `depends_on` + 健康检查;K8s 用 `initContainers` |
239
+ | OOM | 调整 `-Xmx`,按服务独立资源 |
240
+ | Gateway 502 / 服务不可达 | 检查目标服务健康状态与 Consul 注册(服务名解析:`wms`、`wfs` 等) |
241
+ | 瓦片 404 / 缓存未命中 | 确认 gwc 服务已部署、`GEOSERVER_BASE_PATH` 与请求路径一致,必要时重新 seed |
242
+
243
+ ## AI 使用建议
251
244
 
252
- - **加载与引用**:`skill("geoserver-cloud")` 加载;技能目录只读,compose/values 覆写文件写到会话工作区。
253
- - **执行环境**:命令交给 dsh 的 `pwsh`(Windows 无 `wget`,改 `curl.exe -LO`);先用 `docker version`、`helm version`、`kubectl version --client` 确认工具在 PATH。
245
+ - **执行环境**:命令在终端 / shell 中执行(Windows 无 `wget`,改 `curl.exe -LO`);先用 `docker version`、`helm version`、`kubectl version --client` 确认工具在 PATH。
254
246
  - **先探测版本**:`curl.exe -s -u admin:geoserver http://localhost:9090/geoserver/cloud/rest/about/version.json` 读 GeoServer 版本;`curl.exe -s http://localhost:9090/actuator/health` 取 `{"status":"UP"}`(被 profile 关掉时改用 `kubectl -n gis get pods` 判活)。
255
247
  - **验证产物**:部署后逐服务探活,再经网关 `.../rest/workspaces.json` 与一次 WMS `GetMap` 走通全链路;`docker compose ps` 显示 Up 不等于 OGC 服务可用。
256
248
  - **排障顺序**:502 → 查 Consul 注册与目标服务健康(`kubectl -n gis logs deploy/<wms>`);配置不生效 → 查 RabbitMQ 与 `GEOSERVER_BUS_ENABLED`;瓦片 404 → 查 gwc 是否部署、`GEOSERVER_BASE_PATH` 前缀是否一致。
257
249
  - **安全与权限**:`admin:geoserver`、`PGCONFIG_PASSWORD`、RabbitMQ 口令不要回显到报告;`docker compose down -v`、`helm uninstall`、删 PVC 或 PgConfig schema 会丢配置,先向用户确认并备份。
258
- - **先本地复现**:能在 docker compose 复现的问题再上 K8s;镜像标签与 chart 版本保持同一版本号(3.0.2),避免网关与服务错配。
250
+ - **先本地复现**:能在 docker compose 复现的问题再上 K8s;同一套部署里所有 `geoserver-cloud-*` 镜像用同一标签(当前 3.0.2.1);Helm chart 当前为 3.0.3,chart 版本与本仓库镜像标签不必相同,但升级时先查 chart values 默认镜像标签。
259
251
 
260
252
  ## 相关技能
261
253
 
@@ -1,17 +1,10 @@
1
1
  ---
2
2
  name: geoserver-rest-api
3
3
  description: "Use when automating GeoServer 3.0.2 over REST — POST /rest/workspaces, datastores, featuretypes, PUT Shapefile ZIP to file.shp, GeoTIFF to coveragestores, upload SLD as application/vnd.ogc.sld+xml, ?recurse=true deletes. curl -u admin:geoserver, single-key JSON like {\"workspace\":{...}}, 401 on POST but 200 on GET, GWC cache masking style changes."
4
- tags:
5
- - rest
6
- - api
7
- - http
8
- - server
9
- - wms
10
- - wfs
11
- - automation
12
- - curl
13
- - geoserver
14
- - json
4
+ license: MIT
5
+ metadata:
6
+ category: gis
7
+ tags: "rest, api, http, server, wms, wfs, automation, curl, geoserver, json"
15
8
  ---
16
9
 
17
10
  > **项目地址:** <https://github.com/geoserver/geoserver>
@@ -20,7 +13,7 @@ tags:
20
13
  >
21
14
  > **API 参考:** <https://docs.geoserver.org/stable/en/user/rest/api/index.html>
22
15
  >
23
- > **最新版本:** GeoServer 3.0.2(2026-10-19,安全修复版;[官方下载](https://geoserver.org/release/stable/))
16
+ > **最新版本:** GeoServer 3.0.2(2026-10-19 发布,安全修复版;截至 2026-11,[官方下载](https://geoserver.org/release/stable/))
24
17
  >
25
18
  > **许可证:** GPL-2.0
26
19
 
@@ -47,14 +40,19 @@ REST API 的典型用途包括:
47
40
 
48
41
  所有写操作(POST / PUT / DELETE)均需认证。GeoServer 默认使用 HTTP Basic Auth:
49
42
 
43
+ 推荐用 `-u`,curl 自动生成 Basic 头;需要显式传头时用下面的等价写法(`YWRtaW46Z2Vvc2VydmVy` 是 `admin:geoserver` 的 base64):
44
+
50
45
  ```bash
51
- # curl 方式
52
- curl -u admin:geoserver ...
46
+ # 方式 1:curl -u(推荐)
47
+ curl -u admin:geoserver http://localhost:8080/geoserver/rest/about/version.json
53
48
 
54
- # HTTP Header 方式
55
- Authorization: Basic YWRtaW46Z2Vvc2VydmVy
49
+ # 方式 2:显式 Authorization 头
50
+ curl -H "Authorization: Basic YWRtaW46Z2Vvc2VydmVy" \
51
+ http://localhost:8080/geoserver/rest/about/version.json
56
52
  ```
57
53
 
54
+ > 凭据务必用环境变量传入(`curl -u "$GS_USER:$GS_PASS"`),不要写进脚本或提交到仓库。
55
+
58
56
  ---
59
57
 
60
58
  ## API 端点一览
@@ -354,10 +352,10 @@ await workspaceService.CreateWorkspaceAsync("myws");
354
352
 
355
353
  ---
356
354
 
357
- ## DeepSeek Harness 使用建议
355
+ ## AI 使用建议
358
356
 
359
- - **加载与引用**:`skill("geoserver-rest-api")` 加载;完整端点清单按需 `read` [reference/endpoints.md](reference/endpoints.md)(路径相对技能 Base directory),不要整份通读。
360
- - **执行环境**:示例交给 dsh 的 `pwsh`(显式 `curl.exe`,Windows 的 `curl` 是别名、参数不同);`\` 续行在 pwsh 无效,压成单行;请求体先写成 `body.json`,用 `curl.exe --data "@body.json"` 传,避开各 shell 的引号差异。
357
+ - **本技能的组织**:主文件给高频用法,完整参数表与高级示例在 `reference/endpoints.md`,需要时再展开;示例工程与生成的数据写到工作目录,不要改动技能目录本身。
358
+ - **执行环境**:示例在终端 / shell 中执行(显式 `curl.exe`,Windows 的 `curl` 是别名、参数不同);`\` 续行在 PowerShell 无效,压成单行;请求体先写成 `body.json`,用 `curl.exe --data "@body.json"` 传,避开各 shell 的引号差异。
361
359
  - **先探测版本**:`curl.exe -s -u admin:geoserver http://localhost:8080/geoserver/rest/about/version.json`,确认是 3.0.2 并顺带看到组件版本;返回 401 是凭据/安全规则问题,不是版本问题。
362
360
  - **验证产物**:写操作后立刻 GET 回读同一资源(`.../rest/workspaces/myws.json`、`.../rest/layers/myws:roads.json`),再发一次 WMS `GetMap` 取 `image/png` 确认非空图;不要只凭 201 或退出码报告成功。
363
361
  - **幂等与坑**:同名资源重复 POST 会报已存在(重跑脚本前先 GET 判断或改 PUT);改了样式记得清 GWC 缓存,否则瓦片还是旧的。
@@ -1,5 +1,21 @@
1
1
  # GeoServer REST API 端点清单
2
2
 
3
+ ## Contents
4
+
5
+ - 系统管理
6
+ - 工作空间 (Workspaces)
7
+ - 命名空间 (Namespaces)
8
+ - 数据存储 (Data Stores) — 矢量数据
9
+ - 要素类型 (Feature Types) — 矢量图层资源
10
+ - 覆盖存储 (Coverage Stores) — 栅格数据
11
+ - 覆盖 (Coverages) — 栅格图层资源
12
+ - 图层 (Layers)
13
+ - 图层组 (Layer Groups)
14
+ - 样式 (Styles)
15
+ - OGC 服务设置
16
+ - 安全管理 (Security)
17
+ - GeoWebCache 集成
18
+
3
19
  > 这是 [../SKILL.md](../SKILL.md) 的补充文件,收录 GeoServer REST API 全部端点分组清单(系统管理、工作空间、命名空间、数据存储、要素类型、覆盖存储、覆盖、图层、图层组、样式、OGC 服务设置、安全、GeoWebCache)。
4
20
 
5
21
  **基础 URL:** `http://{host}:{port}/geoserver/rest`
@@ -1,24 +1,17 @@
1
1
  ---
2
2
  name: geotools
3
3
  description: "Use when building Java GIS apps on GeoTools 35.2 (JDK 17) — org.geotools:gt-main / gt-shapefile / gt-geopkg / gt-epsg-hsql from repo.osgeo.org (not Maven Central), CQL/ECQL filters, CRS.decode plus JTS.transform reprojection, StreamingRenderer PNG output, and disposing DataStore/SimpleFeatureIterator."
4
- tags:
5
- - java
6
- - gis
7
- - ogc
8
- - wms
9
- - wfs
10
- - vector
11
- - raster
12
- - crs
13
- - rendering
14
- - jts
4
+ license: MIT
5
+ metadata:
6
+ category: gis
7
+ tags: "java, gis, ogc, wms, wfs, vector, raster, crs, rendering, jts"
15
8
  ---
16
9
 
17
10
  > **项目地址:** <https://github.com/geotools/geotools>
18
11
  >
19
12
  > **Maven GroupId:** `org.geotools`
20
13
  >
21
- > **最新版本:** 35.2(2026-10-16,[OSGeo Maven 仓库](https://repo.osgeo.org/repository/release/))
14
+ > **最新版本:** 35.2(2026-10-16,截至 2026-11,[OSGeo Maven 仓库](https://repo.osgeo.org/repository/release/))
22
15
  >
23
16
  > **许可证:** LGPL 2.1
24
17
  >
@@ -36,7 +29,9 @@ GeoTools 是一个成熟、模块化的开源 Java GIS 工具库,由 OSGeo 基
36
29
  - **OGC Web 服务**:WMS / WFS / WCS 客户端
37
30
  - **几何运算**:基于 JTS Topology Suite 的全套几何计算
38
31
 
39
- **环境要求:** JDK 8(GeoTools ≤ 28);JDK 11(GeoTools 29–33);JDK 17(GeoTools 34+,当前 35.x)
32
+ **环境要求:** GeoTools 34+(当前 35.x)要求 **JDK 17**,35.x 官方构建文档另列出可选 JDK 21;更早分支的历史矩阵为 ≤28 用 JDK 8、29–33 用 JDK 11,具体以官方安装文档为准。
33
+
34
+ > 官方构建要求(实测 <https://docs.geotools.org/stable/userguide/build/install/index.html>):"Java Development Kit 17 (JDK 17)",可选 JDK 21;PR 同时用 JDK 17 与 21 测试。
40
35
 
41
36
  ---
42
37
 
@@ -386,15 +381,15 @@ store.dispose();
386
381
 
387
382
  ---
388
383
 
389
- ## DeepSeek Harness 使用建议
384
+ ## AI 使用建议
390
385
 
391
- - **加载与引用**:`skill("geotools")` 加载;完整示例在 [reference/vector-io.md](reference/vector-io.md) 与 [reference/raster-rendering.md](reference/raster-rendering.md),按需 `read`(路径相对技能 Base directory)。
392
- - **执行环境**:命令交给 dsh 的 `pwsh`;先 `java -version` 与 `mvn -v` 确认 JDK 17,35.x 在 JDK 8/11 下编译即失败。
386
+ - **本技能的组织**:主文件给高频用法,完整参数表与高级示例在 `reference/raster-rendering.md`、`reference/vector-io.md`,需要时再展开;示例工程与生成的数据写到工作目录,不要改动技能目录本身。
387
+ - **执行环境**:命令在终端 / shell 中执行;先 `java -version` 与 `mvn -v` 确认 JDK 17,35.x 在 JDK 8/11 下编译即失败。
393
388
  - **先探测版本**:`mvn dependency:tree -Dincludes=org.geotools` 确认解析到 35.2 且未被其他依赖压回旧版;`pom.xml` 里必须有指向 `repo.osgeo.org/repository/release/` 的 `<repository>`。
394
389
  - **验证产物**:`mvn -q -DskipTests package` 后跑最小读图层程序(`FileDataStoreFinder` → `getFeatures()` → 打印 count 与 CRS)或 `mvn -q test`;`CRS.decode("EPSG:4326")` 抛异常说明缺 `gt-epsg-hsql`。
395
390
  - **常见失败信号**:`getDataStore()` 返回 null 或报找不到工厂,是 SPI 模块没进 classpath;出现 `com.vividsolutions.jts` 是包名没升级(GeoTools 20+ 用 `org.locationtech.jts`)。
396
391
  - **安全与权限**:测试别全量加载要素到内存(用 `Query` 限制属性与 bbox);连接串/密码不要回显,对生产库批量写入前先向用户确认。
397
- - **按需读文件**:本 SKILL 较长,先按章节标题定位,再用 `read` 的 offset/limit 只取相关段,避免整篇占满上下文。
392
+ - **按需读文件**:本 SKILL 较长,先按章节标题定位,再按行区间分段读取,避免整篇占满上下文。
398
393
 
399
394
  ## 相关技能
400
395
 
@@ -1,5 +1,10 @@
1
1
  # GeoTools Raster and Rendering Reference
2
2
 
3
+ ## Contents
4
+
5
+ - 栅格数据(GeoTIFF)
6
+ - 地图渲染
7
+
3
8
  > 这是 [../SKILL.md](../SKILL.md) 的补充文件,收录 GeoTIFF 栅格处理与地图渲染输出示例。
4
9
 
5
10
  ---
@@ -1,5 +1,12 @@
1
1
  # GeoTools Vector I/O Reference
2
2
 
3
+ ## Contents
4
+
5
+ - 矢量数据读取
6
+ - 矢量数据写入
7
+ - GeoJSON 读写
8
+ - WKT / WKB 格式转换
9
+
3
10
  > 这是 [../SKILL.md](../SKILL.md) 的补充文件,收录矢量数据读写(Shapefile / GeoPackage / PostGIS)与 GeoJSON、WKT/WKB 格式示例。
4
11
 
5
12
  ---
@@ -1,16 +1,10 @@
1
1
  ---
2
2
  name: grass-gis
3
3
  description: "Use when doing GIS geoprocessing with GRASS GIS headlessly — grass --exec and --tmp-project for servers and CI, g.region computational region management, r.* raster, v.* vector, r3.* 3D raster and t.* temporal modules, r.import/v.import data import, or Python scripting with grass.script, grass.script.array and grass.tools."
4
- tags:
5
- - gis
6
- - raster
7
- - vector
8
- - python
9
- - cli
10
- - headless
11
- - temporal
12
- - automation
13
- - qgis
4
+ license: MIT
5
+ metadata:
6
+ category: gis
7
+ tags: "gis, raster, vector, python, cli, headless, temporal, automation, qgis"
14
8
  ---
15
9
 
16
10
  > **项目地址:** <https://github.com/OSGeo/grass>
@@ -19,7 +13,7 @@ tags:
19
13
  >
20
14
  > **手册入口:** <https://grass.osgeo.org/grass-stable/manuals/>
21
15
  >
22
- > **最新版本:** 8.5.0(截至 2026-10,GitHub Releases;8.4 系列最新补丁 8.4.2)
16
+ > **最新版本:** 8.5.0(截至 2026-11,GitHub Releases;8.4 系列最新补丁 8.4.2)
23
17
  >
24
18
  > **许可证:** GPL-2.0
25
19
 
@@ -33,7 +27,7 @@ GRASS GIS(Geographic Resources Analysis and Support System)是 OSGeo 创始
33
27
  - **计算区域独立管理**:栅格模块在 `g.region` 定义的窗口上运算,与地图本身范围解耦。
34
28
  - **无头执行**:`grass --exec` / `--tmp-project` / `--tmp-mapset` 支持服务器与 CI 场景。
35
29
  - **时空框架**:`t.*` 模块管理 strds / str3ds / stvds 时空数据集。
36
- - **Python 接口**:`grass.script`(命令封装)、`grass.script.array`(NumPy 读写栅格)、`grass.tools`(8.4+ 面向对象工具调用)、`grass.jupyter`(笔记本集成)。
30
+ - **Python 接口**:`grass.script`(命令封装)、`grass.script.array`(NumPy 读写栅格)、`grass.tools`(8.5+ 面向对象工具调用)、`grass.jupyter`(笔记本集成)。
37
31
 
38
32
  ## 环境准备
39
33
 
@@ -46,9 +40,9 @@ sudo apt update && sudo apt install grass
46
40
  # Conda / mamba / pixi(conda-forge 提供 Linux、macOS、Windows 64 位包)
47
41
  conda install -c conda-forge grass
48
42
 
49
- # Docker(官方镜像;下载页同时以 osgeo/grass-gis 名称与 releasebranch_8_5-* 标签发布)
50
- docker pull osgeo/grass
51
- docker run --rm osgeo/grass grass --version
43
+ # Docker(官方镜像名是 osgeo/grass-gis;标签形如 8.5.0-ubuntu / releasebranch_8_5-ubuntu)
44
+ docker pull osgeo/grass-gis:latest
45
+ docker run --rm osgeo/grass-gis grass --version
52
46
  ```
53
47
 
54
48
  Windows 可通过 OSGeo4W 安装器安装,之后在 "OSGeo4W Shell" 中使用 `grass` 命令。
@@ -231,7 +225,7 @@ elev_ft.write(mapname="elev_ft", overwrite=True)
231
225
  elev3d = garray.array3d(mapname="elev3d")
232
226
  ```
233
227
 
234
- 8.4+ 提供面向对象的工具调用接口 `grass.tools`(模块名中的点替换为下划线,支持 numpy 输入输出):
228
+ 8.5+ 提供面向对象的工具调用接口 `grass.tools`(模块名中的点替换为下划线,支持 numpy 输入输出);8.4.x 及更早版本没有该模块,只能用 `grass.script`:
235
229
 
236
230
  ```python
237
231
  from grass.tools import Tools
@@ -310,16 +304,14 @@ grass $HOME/grassdata/ndvi_project/PERMANENT --exec sh -c '
310
304
  | Docker 中结果文件属主为 root | 运行时加 `--user=$(id -u):$(id -g)` 与 `--env HOME=/data/` |
311
305
  | `t.*` 报时空数据库错误 | 时空数据库按地图集独立且自动创建;确认在正确地图集内运行并检查 `t.connect -p` 状态 |
312
306
 
313
- ## 参考资源
307
+ ## AI 使用建议
314
308
 
315
- - **GRASS GIS 源码:** <https://github.com/OSGeo/grass>
316
- - **官方文档:** <https://grass.osgeo.org/>
317
- - **模块手册(grass-stable):** <https://grass.osgeo.org/grass-stable/manuals/>
318
- - **grass 启动器说明:** <https://grass.osgeo.org/grass-stable/manuals/grass.html>
319
- - **Python 脚本 API:** <https://grass.osgeo.org/grass-stable/manuals/libpython/>
320
- - **时空框架介绍:** <https://grass.osgeo.org/grass-stable/manuals/temporalintro.html>
321
- - **Docker 镜像说明:** <https://grass.osgeo.org/download/docker/>
322
- - **官方示例数据:** <https://grass.osgeo.org/sampledata/north_carolina/nc_basic_spm_grass7.zip>
309
+ - **执行环境**:命令在终端 / shell 中执行(Windows 用 PowerShell)。正文里 `grass ... --exec sh -c '...'` 的多行引用在 PowerShell 下不可靠,改为把模块序列写进 `.py` 脚本(首行 `#!/usr/bin/env python3`),再 `grass --tmp-project EPSG:3857 --exec python3 analysis.py`。
310
+ - **先探测版本**:`grass --version`(应为 8.5.0,LTR 8.4.2)、`grass --tmp-project EPSG:3857 --exec g.region -p`;`grass.tools` 自 8.5.0 起提供,8.4.x/LTR 上 Python 脚本改用 `gs.run_command`。
311
+ - **验证产物**:`--tmp-project` 内的地图最后必须导出——`r.out.gdal input=slope output=/work/slope.tif format=GTiff`,随后 `gdalinfo -json slope.tif` 核对 CRS 与范围;会话内核对用 `g.region -p format=json`、`g.list type=raster`。
312
+ - **区域语义优先**:栅格模块只处理计算区域内的像元,结果范围不对先看 `g.region -p`;重复运行加 `--overwrite`,否则模块报地图已存在并非零退出。
313
+ - **错误识别**:GRASS 模块的失败以 `ERROR:` 开头并返回非零码(如 `Raster map <x> not found`),据此区分地图名、区域为空还是输出已存在问题,不要只读最后一行日志。
314
+ - **安全与权限**:`g.remove`、`--overwrite`、`t.connect` 会改/删地图集数据;`--tmp-project`/`--tmp-mapset` 结束即删除目录,结果必须先导出;启动 Docker 或改文件属主(`--user=$(id -u):$(id -g)`)前先确认写入路径。
323
315
 
324
316
  ## 相关技能
325
317
 
@@ -328,12 +320,13 @@ grass $HOME/grassdata/ndvi_project/PERMANENT --exec sh -c '
328
320
  - **geopandas** — Python 矢量数据分析:[../geopandas/SKILL.md](../geopandas/SKILL.md)
329
321
  - **pyqgis** — QGIS Python 绑定:[../pyqgis/SKILL.md](../pyqgis/SKILL.md)
330
322
 
331
- ## DeepSeek Harness 使用建议
323
+ ## 参考资源
332
324
 
333
- - **加载与引用**:用 `skill("grass-gis")` 加载(用户也可输入 `/grass-gis`);本技能没有 reference 子目录,模块参数用 `r.univar --help` 或官网手册核对;技能目录只读,脚本与导出结果写到会话工作区。
334
- - **执行环境**:命令交给 dsh 的 shell 工具(Windows 用 `pwsh`;仅暴露 `run_code` 的会话在 `tools.pwsh` 中执行)。正文里 `grass ... --exec sh -c '...'` 的多行引用在 pwsh 下不可靠,改为把模块序列写进 `.py` 脚本(首行 `#!/usr/bin/env python3`),再 `grass --tmp-project EPSG:3857 --exec python3 analysis.py`。
335
- - **先探测版本**:`grass --version`(应为 8.5.0,LTR 8.4.2)、`grass --tmp-project EPSG:3857 --exec g.region -p`;8.4 之前没有 `grass.tools`,Python 脚本改用 `gs.run_command`。
336
- - **验证产物**:`--tmp-project` 内的地图最后必须导出——`r.out.gdal input=slope output=/work/slope.tif format=GTiff`,随后 `gdalinfo -json slope.tif` 核对 CRS 与范围;会话内核对用 `g.region -p format=json`、`g.list type=raster`。
337
- - **区域语义优先**:栅格模块只处理计算区域内的像元,结果范围不对先看 `g.region -p`;重复运行加 `--overwrite`,否则模块报地图已存在并非零退出。
338
- - **错误识别**:GRASS 模块的失败以 `ERROR:` 开头并返回非零码(如 `Raster map <x> not found`),据此区分地图名、区域为空还是输出已存在问题,不要只读最后一行日志。
339
- - **安全与权限**:`g.remove`、`--overwrite`、`t.connect` 会改/删地图集数据;`--tmp-project`/`--tmp-mapset` 结束即删除目录,结果必须先导出;启动 Docker 或改文件属主(`--user=$(id -u):$(id -g)`)前先确认写入路径。
325
+ - **GRASS GIS 源码:** <https://github.com/OSGeo/grass>
326
+ - **官方文档:** <https://grass.osgeo.org/>
327
+ - **模块手册(grass-stable):** <https://grass.osgeo.org/grass-stable/manuals/>
328
+ - **grass 启动器说明:** <https://grass.osgeo.org/grass-stable/manuals/grass.html>
329
+ - **Python 脚本 API:** <https://grass.osgeo.org/grass-stable/manuals/libpython/>
330
+ - **时空框架介绍:** <https://grass.osgeo.org/grass-stable/manuals/temporalintro.html>
331
+ - **Docker 镜像说明:** <https://grass.osgeo.org/download/docker/>
332
+ - **官方示例数据:** <https://grass.osgeo.org/sampledata/north_carolina/nc_basic_spm_grass7.zip>
@@ -1,24 +1,17 @@
1
1
  ---
2
2
  name: jts
3
3
  description: "Use when doing precise 2D computational geometry in Java with org.locationtech.jts:jts-core 1.20.0 — GeometryFactory construction, contains/intersects predicates, overlay via OverlayNGRobust, buffer, STRtree and PreparedGeometry speedups, WKT/WKB/GeoJSON I/O, and fixing TopologyException or unclosed rings."
4
-
5
- tags:
6
- - java
7
- - geometry
8
- - topology
9
- - spatial
10
- - de9im
11
- - wkt
12
- - wkb
13
- - geojson
14
- - gis
4
+ license: MIT
5
+ metadata:
6
+ category: gis
7
+ tags: "java, geometry, topology, spatial, de9im, wkt, wkb, geojson, gis"
15
8
  ---
16
9
 
17
10
  > **项目地址:** <https://github.com/locationtech/jts>
18
11
  >
19
12
  > **Maven Central:** `org.locationtech.jts:jts-core`
20
13
  >
21
- > **最新版本:** 1.20.0(截至 2026-10,[Maven Central](https://central.sonatype.com/artifact/org.locationtech.jts/jts-core))
14
+ > **最新版本:** 1.20.0(截至 2026-11,[Maven Central](https://central.sonatype.com/artifact/org.locationtech.jts/jts-core))
22
15
  >
23
16
  > **许可证:** Eclipse Public License 2.0 / Eclipse Distribution License 1.0(BSD 风格)
24
17
  >
@@ -56,7 +49,7 @@ JTS Topology Suite(简称 JTS)是 LocationTech 项目组下的开源 Java
56
49
  </dependency>
57
50
  ```
58
51
 
59
- 如需 GeoJSON 等 I/O 支持:
52
+ 如需 GeoJSON 等 I/O 支持(注意 groupId 是 `org.locationtech.jts.io`,与 jts-core 的 `org.locationtech.jts` 不同):
60
53
 
61
54
  ```xml
62
55
  <dependency>
@@ -66,6 +59,8 @@ JTS Topology Suite(简称 JTS)是 LocationTech 项目组下的开源 Java
66
59
  </dependency>
67
60
  ```
68
61
 
62
+ `jts-io-common` 的 `GeoJsonWriter` 在运行期还依赖 `com.googlecode.json-simple:json-simple`(Maven/Gradle 会自动带入);手工拼 classpath 时漏掉它会在写出 GeoJSON 时抛 `NoClassDefFoundError: org/json/simple/JSONAware`。
63
+
69
64
  ### Gradle
70
65
 
71
66
  ```groovy
@@ -247,14 +242,15 @@ String geoJson = new GeoJsonWriter().write(buffered);
247
242
  | 批量空间查询慢 | 用 `STRtree` 建索引;重复关系判断用 `PreparedGeometry`;大量合并用 `UnaryUnionOp` |
248
243
  | 多线程复用 Reader/Writer 出错 | `GeometryFactory` 与 `Geometry` 线程安全;`WKTReader` / `WKTWriter` 等非线程安全,每线程独立创建 |
249
244
  | 叠加运算抛 TopologyException | 优先用 `OverlayNGRobust.overlay()`,比传统叠加引擎更鲁棒 |
245
+ | 写 GeoJSON 抛 `NoClassDefFoundError: org/json/simple/JSONAware` | 手工 classpath 缺 `json-simple`,用 Maven/Gradle 引入 `jts-io-common` 让其传递依赖生效 |
250
246
  | 旧代码升级后 import 报错 | JTS 1.15+ 包名由 `com.vividsolutions.jts` 迁移为 `org.locationtech.jts` |
251
247
 
252
248
  ---
253
249
 
254
- ## DeepSeek Harness 使用建议
250
+ ## AI 使用建议
255
251
 
256
- - **加载与引用**:`skill("jts")` 加载;完整运算示例在 [reference/geometry-operations.md](reference/geometry-operations.md),按需 `read`(路径相对技能 Base directory)。
257
- - **执行环境**:命令交给 dsh 的 `pwsh`;JTS 只依赖 `jts-core`,Maven Central 直接可解析,不需要额外仓库,JDK 8+ 即可。
252
+ - **本技能的组织**:主文件给高频用法,完整参数表与高级示例在 `reference/geometry-operations.md`,需要时再展开;示例工程与生成的数据写到工作目录,不要改动技能目录本身。
253
+ - **执行环境**:命令在终端 / shell 中执行;JTS 只依赖 `jts-core`,Maven Central 直接可解析,不需要额外仓库,JDK 8+ 即可。
258
254
  - **先探测版本**:`mvn dependency:tree -Dincludes=org.locationtech.jts` 确认解析到 1.20.0;同时确认 classpath 里没有遗留的 `com.vividsolutions.jts` 旧包。
259
255
  - **验证产物**:`mvn -q test`,或最小 main 做 WKT 往返 + `geom.isValid()` + `buffer(0)` 断言;导出 GeoJSON 后用 `GeoJsonReader` 读回比对坐标数,别只看日志。
260
256
  - **失败信号**:`TopologyException` 改用 `OverlayNGRobust.overlay()`;`isValid()` 为 false 先 `GeometryFixer.fix()`;结果为空多半是把坐标写成了 `(lat, lon)`。
@@ -1,5 +1,18 @@
1
1
  # JTS Geometry Operations and Index Reference
2
2
 
3
+ ## Contents
4
+
5
+ - 空间关系判断
6
+ - 集合运算
7
+ - 几何分析
8
+ - 几何简化
9
+ - 精度模型
10
+ - 格式读写
11
+ - 空间索引
12
+ - PreparedGeometry(加速重复判断)
13
+ - 线性参考
14
+ - 仿射变换
15
+
3
16
  > 这是 [../SKILL.md](../SKILL.md) 的补充文件,收录空间关系、集合运算、几何分析、格式读写与空间索引的完整参考。
4
17
 
5
18
  ---