@dsh-gis/dsh-opengis-skill 0.1.2 → 0.1.3
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.
- package/CHANGELOG.md +31 -0
- package/README.md +43 -33
- package/assets/cesiumjs/SKILL.md +11 -12
- package/assets/deck-gl/SKILL.md +10 -9
- package/assets/gdal/SKILL.md +10 -44
- package/assets/gdal-api/SKILL.md +10 -29
- package/assets/geometry-api-java/SKILL.md +10 -17
- package/assets/geometry-api-net/SKILL.md +10 -17
- package/assets/geopandas/SKILL.md +10 -18
- package/assets/geopipe-agent/SKILL.md +10 -20
- package/assets/geoserver/SKILL.md +20 -25
- package/assets/geoserver-cloud/SKILL.md +14 -24
- package/assets/geoserver-rest-api/SKILL.md +10 -20
- package/assets/geotools/SKILL.md +11 -21
- package/assets/grass-gis/SKILL.md +9 -9
- package/assets/jts/SKILL.md +9 -17
- package/assets/leaflet/SKILL.md +10 -7
- package/assets/mapbox-gl-js/SKILL.md +10 -8
- package/assets/mapserver/SKILL.md +9 -7
- package/assets/mapsui/SKILL.md +10 -18
- package/assets/nettopologysuite/SKILL.md +15 -17
- package/assets/opengis-all/SKILL.md +10 -30
- package/assets/opengis-daf/SKILL.md +10 -13
- package/assets/opengis-utils-for-java/SKILL.md +10 -18
- package/assets/opengis-utils-for-net/SKILL.md +10 -10
- package/assets/openlayers/SKILL.md +10 -10
- package/assets/pdal/SKILL.md +9 -7
- package/assets/postgis/SKILL.md +10 -12
- package/assets/proj/SKILL.md +9 -20
- package/assets/pyqgis/SKILL.md +9 -43
- package/assets/qgis-process/SKILL.md +10 -31
- package/assets/qgis-server/SKILL.md +9 -20
- package/assets/shapely/SKILL.md +10 -18
- package/assets/sharpmap/SKILL.md +9 -17
- package/package.json +1 -1
- package/upstream.json +34 -34
package/assets/shapely/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: shapely
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use when doing computational geometry in Python — shapely.intersection/union/buffer/convex_hull/simplify, STRtree queries, from_wkt/to_wkt/to_geojson, make_valid, GEOS-gated ops (coverage_clean, split); also for TopologyException on self-intersecting polygons or OOP vs function buffer quad_segs mismatch. Shapely 2.2.0 binds GEOS."
|
|
4
4
|
tags:
|
|
5
5
|
- python
|
|
6
6
|
- geometry
|
|
@@ -275,24 +275,16 @@ left_idx, right_idx = tree.query(left_geoms, predicate="intersects")
|
|
|
275
275
|
# left_idx[i] and right_idx[i] are paired matches
|
|
276
276
|
```
|
|
277
277
|
|
|
278
|
-
##
|
|
278
|
+
## DeepSeek Harness 使用建议
|
|
279
279
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
### 关键注意事项
|
|
289
|
-
|
|
290
|
-
- **Z 坐标在分析中被忽略**:所有空间运算仅在 x-y 平面进行
|
|
291
|
-
- **`contains` 不包含边界**:如需边界判断使用 `covers()` 或 `intersects()`
|
|
292
|
-
- **向量化函数 vs OOP 方法**:函数式 API(`shapely.area(geoms)`)释放 GIL,支持 NumPy 广播,性能远优于 OOP(`geom.area`)
|
|
293
|
-
- **`set_precision` 改变顶点顺序**:返回的几何为"温和规范形式",不应依赖顶点顺序
|
|
294
|
-
- **Prepared 状态不持久**:任何操作产生新几何后需重新 `prepare()`
|
|
295
|
-
- **WKB 会丢弃 LinearRing**:WKB 序列化时 LinearRing 变为 LineString
|
|
280
|
+
- **加载与引用**:用 `skill("shapely")` 加载(用户也可输入 `/shapely`);`reference/operations-reference.md` 按需 `read`,路径相对加载结果中的 Base directory;技能目录只读,验证脚本与产物写到会话工作区。
|
|
281
|
+
- **执行环境**:命令交给 dsh 的 shell 工具(Windows 用 `pwsh`,仅暴露 `run_code` 的会话在 `tools.pwsh` 里跑);`python` 不一定是 QGIS/GDAL 自带环境,先 `python -c "import sys; print(sys.executable, sys.version)"`。
|
|
282
|
+
- **先探测版本**:`python -c "import shapely; print(shapely.__version__, shapely.geos_version)"`;本技能按 2.2.0 编写,PyPI wheel 内含 GEOS 3.14.1。GEOS 低版本请按第 11 条降级(如 `coverage_clean` 需 3.14、`shapely.split` 需 3.15)。
|
|
283
|
+
- **验证产物(必做)**:`print(shapely.is_valid(g), shapely.is_valid_reason(g))` 报无效原因;面积/长度做量级断言;序列化回读 `shapely.from_wkt(shapely.to_wkt(g, rounding_precision=-1)).equals(g)`,改过几何后再核对一次 `geom_type` 与 `get_num_geometries()`。
|
|
284
|
+
- **报错先查有效性**:`TopologyException: side location conflict` 基本都是输入几何自相交,先 `shapely.make_valid(g)`(可指定 `method="structure"`)再算,不要直接加 `buffer(0)`。
|
|
285
|
+
- **性能与内存**:批量操作走向量化函数(`shapely.union_all`、`shapely.buffer(geoms, r)`),别逐条 OOP 循环;十万级以上几何先 `STRtree(geoms)` 过滤,再对小集合做精确谓词。
|
|
286
|
+
- **典型误操**:`set_coordinates()`/`shapely.prepare()` 都是原地修改,先 `.copy()`;`shapely.buffer` 默认 `quad_segs=8` 与 `Point.buffer()` 的 16 不同,比较结果前显式传参。
|
|
287
|
+
- **安全**:`pip install shapely` 前先征得用户同意;输出 WKT/坐标前确认数据是否敏感(精确坐标可反推位置),大几何 dump 到文件再分段读,别刷屏。
|
|
296
288
|
|
|
297
289
|
---
|
|
298
290
|
|
package/assets/sharpmap/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sharpmap
|
|
3
|
-
description: "Use when rendering 2D maps in legacy .NET WinForms or ASP.NET WebForms
|
|
3
|
+
description: "Use when rendering 2D maps in legacy .NET Framework 4.7.2 WinForms or ASP.NET WebForms apps with SharpMap 1.2.0 — Map.GetMap() to PNG, ShapeFile/PostGIS providers, VectorLayer with CustomTheme, TileAsyncLayer via BruTile, ProjNet4GeoAPI transforms, or debugging blank output and GDI+ handle leaks. New projects should use Mapsui."
|
|
4
4
|
tags:
|
|
5
5
|
- dotnet
|
|
6
6
|
- csharp
|
|
@@ -278,23 +278,15 @@ map.Layers.Add(new TileAsyncLayer(tileSrc, "OSM"));
|
|
|
278
278
|
map.SRID = 3857;
|
|
279
279
|
```
|
|
280
280
|
|
|
281
|
-
##
|
|
281
|
+
## DeepSeek Harness 使用建议
|
|
282
282
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
2.
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
### 关键注意事项
|
|
292
|
-
|
|
293
|
-
- **新项目建议 Mapsui**:SharpMap 主要面向 .NET Framework,新项目推荐使用 Mapsui(更活跃、跨平台更好)
|
|
294
|
-
- **SRID 一致性**:图层与地图 SRID 必须一致,必要时通过 `CoordinateTransformation` 转换
|
|
295
|
-
- **空间索引**:Shapefile 需预建 `.qix` 索引,PostGIS 用 GiST 索引加速查询
|
|
296
|
-
- **资源释放**:GDI+ `Brush`/`Pen`/`Bitmap` 需及时释放避免内存泄漏
|
|
297
|
-
- **Shapefile 编码**:中文数据需指定 `Encoding.UTF8` 或 `Encoding.GetEncoding("GBK")`
|
|
283
|
+
- **加载与引用**:用 `skill("sharpmap")` 加载(用户也可输入 `/sharpmap`);示例写入会话工作区的 .NET 工程,技能目录只读。
|
|
284
|
+
- **执行环境**:先 `dotnet --list-sdks`;核心包 `SharpMap` 是 netstandard2.0,可被 .NET 8+ 工程引用,但 WinForms 控件 `SharpMap.UI` 只有 .NET Framework 4.7.2,目标框架必须选 net472,不能套 net8.0。
|
|
285
|
+
- **验证产物**:`dotnet build` 后 `map.GetMap()` 取 `System.Drawing.Image` 再 `Save("output.png")`,用 `read_image` 看实际着色与标注;编译通过不代表渲染正确。
|
|
286
|
+
- **依赖风险**:SharpMap 1.2.0(2021-03)的传递依赖含 `NetTopologySuite.Core` 1.15.3、`System.Drawing.Common` 4.6.0、`System.Data.SqlClient` 4.7.0,`dotnet restore` 会报 NU1902/NU1903/NU1904 漏洞告警,需向用户说明而不是静默忽略。
|
|
287
|
+
- **坐标与 SRID**:`map.SRID` 与图层 SRID 必须一致;ProjNet 2.x 不再实现 GeoAPI 接口,坐标变换用 `ProjNet4GeoAPI` 1.4.1。
|
|
288
|
+
- **资源释放**:GDI+ 的 `Brush`/`Pen`/`Bitmap` 必须 `using` 或 `Dispose`,否则长时间运行内存持续上涨。
|
|
289
|
+
- **安全与权限**:新建工程、装包、连接 PostGIS 前先征得用户同意;连接串里的密码不要写进代码或回答。
|
|
298
290
|
|
|
299
291
|
## 相关技能
|
|
300
292
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-gis/dsh-opengis-skill",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "OpenGIS skill pack for DeepSeek Harness: the gis/ skills from opengis-skills (GDAL, QGIS, GeoServer, PostGIS, JTS, CesiumJS, OpenLayers and more), loaded on demand.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
package/upstream.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"repository": "https://github.com/znlgis/opengis-skills",
|
|
4
|
-
"commit": "
|
|
5
|
-
"syncedAt": "2026-10-
|
|
4
|
+
"commit": "4b64b890758af0c0abfaf853f0d5a1f6b287a1df",
|
|
5
|
+
"syncedAt": "2026-10-20T09:25:23.608Z",
|
|
6
6
|
"hashAlgorithm": "sha256",
|
|
7
7
|
"skillCount": 32,
|
|
8
8
|
"skills": [
|
|
@@ -40,63 +40,63 @@
|
|
|
40
40
|
"sharpmap"
|
|
41
41
|
],
|
|
42
42
|
"files": {
|
|
43
|
-
"cesiumjs/SKILL.md": "
|
|
44
|
-
"deck-gl/SKILL.md": "
|
|
45
|
-
"gdal-api/SKILL.md": "
|
|
43
|
+
"cesiumjs/SKILL.md": "a0c6c7de3b27cc5a957e7fa3330a6916f9d4868ba795a98198238328289ee7d5",
|
|
44
|
+
"deck-gl/SKILL.md": "250ff67317699ac17fbe40b64fbaaf178e9b562337bdef5de91ba6888a014b91",
|
|
45
|
+
"gdal-api/SKILL.md": "0177017e7b4d1fee16d8224ed43935d88fa8a2500a189c2573da982168fdfa61",
|
|
46
46
|
"gdal-api/reference/raster-api.md": "c0d4526602bf3e2e3f80abeaa972997c132e3f6fbbabd79347d035a3cd1f1c84",
|
|
47
47
|
"gdal-api/reference/vector-api.md": "5907be299d5e969f294c25a53737454f0e5abcd6d74e0d3831ddd46d9f18d03f",
|
|
48
|
-
"gdal/SKILL.md": "
|
|
48
|
+
"gdal/SKILL.md": "f54b984a2a939162f7cd3966927c45eb1fe41ba01436ef706fd6921f29e2f181",
|
|
49
49
|
"gdal/reference/data-formats.md": "443731a0f13330ab90e7ecc3e8e46d85519fbcd7013861dfa63f693668fdffd3",
|
|
50
50
|
"gdal/reference/raster-tools.md": "a3ed2dbb9571ce59973729e8cea5d68cf039d30bf39c98b614fb523a61541f97",
|
|
51
51
|
"gdal/reference/vector-tools.md": "284b5685f3f72b13865a8da2bef33637eb92820aa0b3cfec57f8c745a1fe3966",
|
|
52
|
-
"geometry-api-java/SKILL.md": "
|
|
53
|
-
"geometry-api-net/SKILL.md": "
|
|
52
|
+
"geometry-api-java/SKILL.md": "c30c019012a88a3a2a9f954348187ccf1027ce69dbadc1d05672810612eb9d05",
|
|
53
|
+
"geometry-api-net/SKILL.md": "434757ea42153b9e828179c06c35e256566f1846b435e4eeaf2fb6d5675e6c7c",
|
|
54
54
|
"geometry-api-net/reference/geometry-types.md": "121e6ef0f5c7fb053b8e14bf42e952629bfb8b0717626fd7744db59ca6cfb4e7",
|
|
55
|
-
"geopandas/SKILL.md": "
|
|
55
|
+
"geopandas/SKILL.md": "18e0434505999642a8b4a342adeb71b749a4ac55919eaa6cfcb6a4f3ba0fb81b",
|
|
56
56
|
"geopandas/reference/core-api.md": "1e233adb18510d7d4788cfc18ac47982b53784b09ce37d2171494e9beba4e05f",
|
|
57
|
-
"geopipe-agent/SKILL.md": "
|
|
57
|
+
"geopipe-agent/SKILL.md": "eae0e251e1c4be6e49b9f3e70a8156c541a3076580683997cf775a1ffc228c27",
|
|
58
58
|
"geopipe-agent/reference/backends.md": "00d7658470e67661d6774eb827f9ab0ccbb2262604b3cb65a0382bf27d2b331f",
|
|
59
59
|
"geopipe-agent/reference/knowledge.md": "63b1d44d6f83d4e33011c35855d08b2c83cd07f2ec21722a120b1e2164685e07",
|
|
60
60
|
"geopipe-agent/reference/pipeline-schema.md": "9b6a7a87002fa2fa53f61441a0f9ace804b970ba9ea6b00b0308e2dba9a77cb6",
|
|
61
61
|
"geopipe-agent/reference/self-extension.md": "552be0bfaef58f3cb7f10567362c3c7328bea520b8ef61bda5f79f84529e16a1",
|
|
62
62
|
"geopipe-agent/reference/steps-reference.md": "3c1adaf5f9960ea9c99919cc61bb065e59ce2b77a6a029aa2a2e9977dc794bf8",
|
|
63
63
|
"geopipe-agent/reference/workflows.md": "e4e0fb32dd83b7f7b27de5a42f6a2d7eea71c4fae7e8c7764d7defe7340e1313",
|
|
64
|
-
"geoserver-cloud/SKILL.md": "
|
|
65
|
-
"geoserver-rest-api/SKILL.md": "
|
|
64
|
+
"geoserver-cloud/SKILL.md": "ea576232fc304779aacaadf362ed81244427d151271f5dbcb7719fa11ca5e6ef",
|
|
65
|
+
"geoserver-rest-api/SKILL.md": "97dab100753151a6793a610a6133aa0649f0e9d31554460a0b884dbf38f8030b",
|
|
66
66
|
"geoserver-rest-api/reference/endpoints.md": "20fbb2ea7ccddcbb34f5ecb227d53127073a8109edbff9ad1bbcae07a3cf1be7",
|
|
67
|
-
"geoserver/SKILL.md": "
|
|
68
|
-
"geotools/SKILL.md": "
|
|
67
|
+
"geoserver/SKILL.md": "a3c3fefa66faab93a074ada02f0f90be81731f60e7e68fbf247d1f708171e73d",
|
|
68
|
+
"geotools/SKILL.md": "08ad035c6bba695e1025e1f9f3584dfaced864f33d274bf2696996109dbe3155",
|
|
69
69
|
"geotools/reference/raster-rendering.md": "3b1876ad39d8c11756b1ff5eac8cda9dab0d94f958f8cafa4f32d9ff5fa6ebd3",
|
|
70
70
|
"geotools/reference/vector-io.md": "2dca5de4e149bc9e79bd5bfcb345c36e45da06a9d86a53bc28869168f55902f1",
|
|
71
|
-
"grass-gis/SKILL.md": "
|
|
72
|
-
"jts/SKILL.md": "
|
|
71
|
+
"grass-gis/SKILL.md": "cb7b1b57c6d97c0f60db2d5b9b3f50bd66c3a8e2fe0b6d42124ff9b97e8ba49f",
|
|
72
|
+
"jts/SKILL.md": "ec27aa318d7df3f5a0502734278248f2064131dfb6712b5ca30018411d01ad96",
|
|
73
73
|
"jts/reference/geometry-operations.md": "a242f1f0185136baa60f632072c041fb734185b844da25c37ef1f4e3b2685124",
|
|
74
|
-
"leaflet/SKILL.md": "
|
|
75
|
-
"mapbox-gl-js/SKILL.md": "
|
|
76
|
-
"mapserver/SKILL.md": "
|
|
77
|
-
"mapsui/SKILL.md": "
|
|
78
|
-
"nettopologysuite/SKILL.md": "
|
|
79
|
-
"opengis-all/SKILL.md": "
|
|
74
|
+
"leaflet/SKILL.md": "0893a1fcba27efe6e98d140b7f475de32f21c76cd3d67ea51254f067aa0fb4db",
|
|
75
|
+
"mapbox-gl-js/SKILL.md": "a0e6b1ef0610448c3099e80a8c9293a7d4b5529c72af9ed4b4f32d60291cfeaa",
|
|
76
|
+
"mapserver/SKILL.md": "79d9a2a7bb891d592747f35954bfce328bfe1dd30627fc86e142dbdb1da43ee0",
|
|
77
|
+
"mapsui/SKILL.md": "472edb3ea1ae8457dfbbb931d7f4734b2d0556fe5392258f752748d82e650fcd",
|
|
78
|
+
"nettopologysuite/SKILL.md": "2df607de5c629aaefbc3c4d10824f8f3893fc2c67a1885d8cbf8ce797bcd9a05",
|
|
79
|
+
"opengis-all/SKILL.md": "716588baeee1f3b2b7cacfdb33882a9864e07fb1a628e423b1e4d535332db269",
|
|
80
80
|
"opengis-all/reference/data-stages.md": "88d0182d8a96469b0ea8857a463517b3b38c1fde72b5599cad3958da7c8cb4ed",
|
|
81
81
|
"opengis-all/reference/workflow-cheatsheets.md": "3bb58ea3b966ab1bd85380cda1253056ff03accb97f37d863f3f96e7ce6dbdb7",
|
|
82
|
-
"opengis-daf/SKILL.md": "
|
|
83
|
-
"opengis-utils-for-java/SKILL.md": "
|
|
82
|
+
"opengis-daf/SKILL.md": "03264b143ec451914b22db082ddf9ccbadb88b50a99127bb88c9e9e4f185ddc0",
|
|
83
|
+
"opengis-utils-for-java/SKILL.md": "1fef2f2ea00de6f8db0469455eff01f4e98008828de4ab300e33ac50776ae3ec",
|
|
84
84
|
"opengis-utils-for-java/reference/common-tasks.md": "a32f2e1181d9c49e1c8cc16bba1345c3d8aca6d42be1cc2afe2a330bd382b47a",
|
|
85
|
-
"opengis-utils-for-net/SKILL.md": "
|
|
85
|
+
"opengis-utils-for-net/SKILL.md": "99755b1526444b35defc8d599d9813d259929dae49be2adfda5d66b1975e4ddd",
|
|
86
86
|
"opengis-utils-for-net/reference/code-patterns.md": "379a6a22e10b291639fa6ee07ad105522523420666ea52a5e588f19fc5c8a064",
|
|
87
87
|
"opengis-utils-for-net/reference/util-classes.md": "111fc1347edb8af6660b0f9614b5ecff4b6654ea19fe1549f6924eb8b3467db2",
|
|
88
|
-
"openlayers/SKILL.md": "
|
|
89
|
-
"pdal/SKILL.md": "
|
|
90
|
-
"postgis/SKILL.md": "
|
|
91
|
-
"proj/SKILL.md": "
|
|
92
|
-
"pyqgis/SKILL.md": "
|
|
88
|
+
"openlayers/SKILL.md": "ed3ded2858df6d32ba676ca0d3ed40081abe1de61e66d2ae90c3fd31b1d6900c",
|
|
89
|
+
"pdal/SKILL.md": "236502dbd4ed7ed8a33d9df95296ae4308d186154ca0f5a7178ed9c73825730d",
|
|
90
|
+
"postgis/SKILL.md": "2c73f71dc1f59207533c90532b22b4601b58614909cbbd64d601e0cc2b1c67a0",
|
|
91
|
+
"proj/SKILL.md": "9614715a733212770ec63079728973b5e06466028178da8eddfd1e242d3fb4ab",
|
|
92
|
+
"pyqgis/SKILL.md": "4af5661e2251fa44317208538ee7eb1a1754ed7146999e2d7483e9996da66872",
|
|
93
93
|
"pyqgis/reference/processing-rendering.md": "138644c36ca3f30e746016bb7457fd3a2d18349c5740f02d1735ba6c59173a3e",
|
|
94
94
|
"pyqgis/reference/vector-raster-layers.md": "fec965918eff2d24c6e8f8c68379c52bb10727892f8d599e6c425760d168cd2d",
|
|
95
|
-
"qgis-process/SKILL.md": "
|
|
95
|
+
"qgis-process/SKILL.md": "8a223874b8cb37225507e21502c176d319bf76ea5d42c875591210e3ef43308d",
|
|
96
96
|
"qgis-process/reference/algorithm-cheatsheet.md": "d88720d80a2d78efefcf1ff9027b451f291bef5ef166fa9befcae484bfa91e8f",
|
|
97
|
-
"qgis-server/SKILL.md": "
|
|
98
|
-
"shapely/SKILL.md": "
|
|
97
|
+
"qgis-server/SKILL.md": "d0749cb2da2be6ca5d5c6418568851497eff547c041fa38035c0f958fd61e9fd",
|
|
98
|
+
"shapely/SKILL.md": "f6c1aceba0a7027cb31614bb49c33de3c1d763feaea6a45d008eb4b10da36984",
|
|
99
99
|
"shapely/reference/operations-reference.md": "a984e9cd84dbfa3bc299284725639520883a85289f67a61d7b296a00665c2714",
|
|
100
|
-
"sharpmap/SKILL.md": "
|
|
100
|
+
"sharpmap/SKILL.md": "f4c27d56c54f9c1574bc81a0a98083258a0b6b4fba2d60ae23a9f4abced537af"
|
|
101
101
|
}
|
|
102
102
|
}
|