@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.
Files changed (36) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +43 -33
  3. package/assets/cesiumjs/SKILL.md +11 -12
  4. package/assets/deck-gl/SKILL.md +10 -9
  5. package/assets/gdal/SKILL.md +10 -44
  6. package/assets/gdal-api/SKILL.md +10 -29
  7. package/assets/geometry-api-java/SKILL.md +10 -17
  8. package/assets/geometry-api-net/SKILL.md +10 -17
  9. package/assets/geopandas/SKILL.md +10 -18
  10. package/assets/geopipe-agent/SKILL.md +10 -20
  11. package/assets/geoserver/SKILL.md +20 -25
  12. package/assets/geoserver-cloud/SKILL.md +14 -24
  13. package/assets/geoserver-rest-api/SKILL.md +10 -20
  14. package/assets/geotools/SKILL.md +11 -21
  15. package/assets/grass-gis/SKILL.md +9 -9
  16. package/assets/jts/SKILL.md +9 -17
  17. package/assets/leaflet/SKILL.md +10 -7
  18. package/assets/mapbox-gl-js/SKILL.md +10 -8
  19. package/assets/mapserver/SKILL.md +9 -7
  20. package/assets/mapsui/SKILL.md +10 -18
  21. package/assets/nettopologysuite/SKILL.md +15 -17
  22. package/assets/opengis-all/SKILL.md +10 -30
  23. package/assets/opengis-daf/SKILL.md +10 -13
  24. package/assets/opengis-utils-for-java/SKILL.md +10 -18
  25. package/assets/opengis-utils-for-net/SKILL.md +10 -10
  26. package/assets/openlayers/SKILL.md +10 -10
  27. package/assets/pdal/SKILL.md +9 -7
  28. package/assets/postgis/SKILL.md +10 -12
  29. package/assets/proj/SKILL.md +9 -20
  30. package/assets/pyqgis/SKILL.md +9 -43
  31. package/assets/qgis-process/SKILL.md +10 -31
  32. package/assets/qgis-server/SKILL.md +9 -20
  33. package/assets/shapely/SKILL.md +10 -18
  34. package/assets/sharpmap/SKILL.md +9 -17
  35. package/package.json +1 -1
  36. package/upstream.json +34 -34
package/CHANGELOG.md CHANGED
@@ -5,6 +5,37 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.3] - 2026-10-20
9
+
10
+ ### Added
11
+
12
+ - Every GIS skill now ends with a `## DeepSeek Harness 使用建议` section covering skill
13
+ loading and reference reads, shell-tool mapping (`pwsh` and `run_code`), version
14
+ probes, artifact verification, and permission/secret handling. Generic "AI 使用建议"
15
+ sections were replaced rather than duplicated, so most skills got shorter.
16
+ - Descriptions rewritten for skill discovery: concrete commands, package coordinates,
17
+ formats, and error symptoms, still starting with "Use when" and within the upstream
18
+ 500-character limit.
19
+
20
+ ### Changed
21
+
22
+ - Synced the vendored GIS skills to opengis-skills commit `4b64b89`; version claims
23
+ re-verified against upstream releases on 2026-10-20.
24
+ - GeoServer (plus `geoserver-rest-api` and the `opengis-all` image tag) 3.0.1 → 3.0.2:
25
+ SourceForge binary URL, Docker tag, Java 17/21 prerequisite, and the 2026-10-19
26
+ security-release note.
27
+ - GeoServer Cloud 3.0.1.1 → 3.0.2 and Helm chart `geoservercloud` 3.0.1 → 3.0.2.
28
+ - GeoTools 35.1 → 35.2 (JDK 17); NetTopologySuite notes now pin IO.GeoJSON 4.0.0,
29
+ IO.Esri.Shapefile 1.2.0, and ProjNet 2.1.0.
30
+
31
+ ### Fixed
32
+
33
+ - QGIS Server guidance probes the installed QGIS version instead of assuming a
34
+ `qgis_mapserver --version` binary; Cesium no longer asserts a 1.150 removal date;
35
+ Mapsui notes that 5.2.0-beta.1 is a prerelease.
36
+ - Escaped inner quotes in rewritten frontmatter descriptions so the strict DSH
37
+ frontmatter parser accepts every skill.
38
+
8
39
  ## [0.1.2] - 2026-10-19
9
40
 
10
41
  ### Added
package/README.md CHANGED
@@ -3,8 +3,9 @@
3
3
  > **English summary** — A DeepSeek Harness bundle that packages the `gis/` skills of
4
4
  > [opengis-skills](https://github.com/znlgis/opengis-skills) as installable, toggleable skills.
5
5
  > The session catalog lists names and descriptions only; skill bodies and their
6
- > `reference/*.md` files are loaded on demand. Zero runtime dependencies: every asset
7
- > ships inside the npm package.
6
+ > `reference/*.md` files are loaded on demand, and every body carries DeepSeek Harness
7
+ > execution guidance (tool mapping, version probes, verification, permissions). Zero
8
+ > runtime dependencies: every asset ships inside the npm package.
8
9
  >
9
10
  > Compatibility: DeepSeek Harness `>=0.2.0-rc.2 <0.3.0-0`; Node.js `>=22` for development
10
11
  > only. MIT licensed.
@@ -15,9 +16,10 @@ DeepSeek Harness 的 **OpenGIS 技能包插件**:把 [opengis-skills](https://
15
16
 
16
17
  - **覆盖 GIS 全链路**:GDAL、GDAL API、QGIS(qgis_process / PyQGIS / QGIS Server)、GeoServer(含 REST API 与 Cloud)、MapServer、PostGIS、PROJ、PDAL、GRASS GIS、JTS、NetTopologySuite、Esri Geometry API(Java/.NET)、Shapely、GeoPandas、GeoPipeAgent、OpenGisDAF、CesiumJS、OpenLayers、Leaflet、Mapbox GL JS、deck.gl、SharpMap、Mapsui、GeoTools、OpenGIS Utils(Java/.NET),以及 `opengis-all` 全流程索引。
17
18
  - **按需加载**:注册的是 skill provider(`ctx.skills.registerProvider`),发现阶段只读 frontmatter;正文每次加载时读取,参考资料(`reference/*.md`)通过技能目录(resource base)相对解析。
18
- - **零运行时依赖**:只用 Node 内置模块,不 import DSH 内部包;全部资产随 npm 包分发,整个包解包后约 670 KiB。
19
+ - **零运行时依赖**:只用 Node 内置模块,不 import DSH 内部包;全部资产随 npm 包分发,整个包解包后约 720 kB。
19
20
  - **可同步上游**:`npm run sync` 从 opengis-skills 检出复制资产,记录上游 commit 与每个文件的 SHA-256 到 `upstream.json`,并重新生成本文下方技能清单。
20
21
  - **可启停**:单包同时是 bundle 与插件(`dsh.bundle.patch` 插入自身行),在 Plugins 里启用/停用即可。
22
+ - **面向 DSH 的执行建议**:每个技能末尾都有 `## DeepSeek Harness 使用建议`,写明如何按需读 reference、Windows 下如何映射 shell 命令、先跑哪个版本探测命令、如何重新打开产物验证,以及哪些安装/覆盖/凭据操作要先确认。
21
23
 
22
24
  ## 兼容性
23
25
 
@@ -34,38 +36,38 @@ DeepSeek Harness 的 **OpenGIS 技能包插件**:把 [opengis-skills](https://
34
36
  <!-- skills:start -->
35
37
  | Skill | Description (upstream frontmatter) |
36
38
  | --- | --- |
37
- | `cesiumjs` | Use when building browser-based 3D globes, 3D Tiles visualization, time-dynamic geospatial data, or virtual globe applications. CesiumJS: high-performance WebGL 3D geospatial engine for interactive earth visualization. |
38
- | `deck-gl` | Use when visualizing large geospatial or tabular datasets in the browser with GPU rendering — millions of points, GeoJSON polygons, vector tiles, aggregation layers (hexagon, screen grid, heatmap), and overlaying them on a MapLibre/Mapbox GL JS base map via @deck.gl/mapbox. |
39
- | `gdal` | Use when processing geospatial raster/vector data via command line — format conversion (Shapefile to GeoJSON), reprojection, DEM analysis, NDVI calculation, mosaicking. GDAL/OGR CLI: the industry standard for batch geospatial data processing with 50+ command-line tools (ogr2ogr, gdalwarp, gdal_translate, gdal_calc). |
40
- | `gdal-api` | Use when programming against GDAL/OGR in C, C++, Python, Java, or .NET for raster/vector I/O, coordinate transformation, or custom geospatial algorithms. GDAL API: low-level programming interface for reading/writing 70+ geospatial formats. |
41
- | `geometry-api-java` | Use when working with Esri geometry types (Point, Polyline, Polygon, Envelope) in Java — spatial operations, JSON/GeoJSON/WKT I/O, geodesic calculations. Esri Geometry API for Java. |
42
- | `geometry-api-net` | Use when working with Esri geometry types (Point, Polyline, Polygon, Envelope) in .NET/C# — spatial operations, JSON/GeoJSON/WKT I/O, geodesic calculations. Esri Geometry API for .NET. |
43
- | `geopandas` | Use when performing vector spatial data analysis in Python — reading/writing shapefiles, spatial joins, overlay operations, choropleth maps. GeoPandas: extends pandas DataFrames with geometry columns for Pythonic spatial analysis. |
44
- | `geopipe-agent` | Use when building AI-driven GIS data pipelines with YAML-defined steps — format conversion, spatial validation, QC reporting, and self-extending capability gaps. GeoPipe Agent: YAML-driven GIS ETL pipeline agent with a built-in offline GIS knowledge layer. |
45
- | `geoserver` | Use when deploying OGC-compliant map services (WMS, WFS, WMTS, WCS) or configuring SLD styling, security, and tile caching. GeoServer: the leading open-source Java map server for publishing spatial data to the web. |
46
- | `geoserver-cloud` | Use when deploying GeoServer on Kubernetes as cloud-native microservices with auto-scaling, service discovery, and centralized configuration. GeoServer Cloud: break monolithic GeoServer into independently scalable WMS/WFS/WCS services. |
47
- | `geoserver-rest-api` | Use when automating GeoServer management — programmatic workspace, datastore, and layer creation, style upload, service configuration via REST API. GeoServer REST API: manage GeoServer without GUI using curl, Python, or any HTTP client. |
48
- | `geotools` | Use when building Java GIS applications — feature reading/writing, coordinate transformations, map styling, spatial filters, WMS/WFS clients. GeoTools: the Java GIS toolkit and OGC standards reference implementation. |
39
+ | `cesiumjs` | Use when building browser-based 3D globes, 3D Tiles, CZML/time-dynamic data, or glTF models with npm cesium 1.146.0 — Viewer, Cesium3DTileset, Ion token (Cesium.Ion.defaultAccessToken), CESIUM_BASE_URL for Workers/Assets/Widgets, GCJ-02 tile offset, or debugging a black screen after a Vite/Webpack build. |
40
+ | `deck-gl` | Use when visualizing large geospatial datasets in the browser with deck.gl 9.4.0 — ScatterplotLayer/GeoJsonLayer, HexagonLayer/ScreenGridLayer aggregation, MVTLayer/TileLayer, @deck.gl/mapbox MapboxOverlay over MapLibre, or debugging blank canvases, stale data props and mismatched @deck.gl/* subpackage versions. |
41
+ | `gdal` | Use when processing geospatial raster/vector data via GDAL/OGR CLI — ogr2ogr format conversion (Shapefile/GeoPackage/GeoJSON), gdalwarp reprojection, gdal_translate, gdal_calc.py NDVI, COG, mosaicking, DEM contours, gdalinfo -json checks — or diagnosing "not recognized as a supported file format"; also covers the 3.9+ unified gdal raster / gdal vector CLI. |
42
+ | `gdal-api` | Use when programming against GDAL/OGR in C, C++, Python, Java, or .NET — raster/vector I/O, gdal.UseExceptions, OGRSpatialReference transforms, gdal.Translate / gdal.Warp, VRT/COG, or fixing "no driver registered" and UnsatisfiedLinkError; C++ gdal-config, Maven org.gdal:gdal 3.13.0, NuGet MaxRev.Gdal.Core. |
43
+ | `geometry-api-java` | Use when working with Esri geometry types (Point, Polyline, Polygon, Envelope) in Java — GeometryEngine, com.esri.geometry:esri-geometry-api:2.2.4, WKT/WKB/GeoJSON/Esri JSON I/O, geodesic distance; also when GeometryEngine has no intersects or WKB method and you need OperatorFactoryLocal, or when 2.3.1 coordinates fail to resolve on Maven Central. Esri Geometry API for Java. |
44
+ | `geometry-api-net` | Use when working with Esri geometry types (Point, Polyline, Polygon, Envelope) in .NET/C# — GeometryEngine, NuGet OpenGIS.Esri.Geometry.Core 1.0.9, WKT/EWKT, WKB, GeoJSON and Esri JSON I/O, System.Text.Json converters, geodesic distance; also for unclosed polygon rings, Geometry base-class casts after overlay, or the retired Esri/geometry-api-net repo. Esri Geometry API for .NET. |
45
+ | `geopandas` | Use when doing vector spatial analysis in Python — gpd.read_file/to_file via pyogrio (GPKG, Shapefile, GeoParquet), sjoin/sjoin_nearest, overlay, clip, dissolve, to_crs vs set_crs, gdf.plot choropleth; also for CRSError from a missing PROJ data dir, area/distance computed in degrees, or GeoDataFrame geometry-column conflicts. GeoPandas 1.2.0 extends pandas DataFrames with geometry columns. |
46
+ | `geopipe-agent` | Use when building YAML GIS pipelines with GeoPipeAgent — geopipe-agent validate/run, io.read_vector → vector.buffer → io.write_vector chains, 33 built-in steps, qc.geometry_validity/attribute_completeness/topology, native_python\|qgis_process\|gdal_cli backends, $step.output refs; also for validate "not registered" errors, silent when-condition skips, and resolve/knowledge capability gaps. 0.1.0, source install only (not on PyPI). |
47
+ | `geoserver` | Use when deploying GeoServer 3.0.x to publish WMS/WFS/WMTS/WCS/MVT, or configuring SLD/CSS styles, RBAC security, and GeoWebCache seeding. Covers geoserver-3.0.2-bin.zip, docker.osgeo.org/geoserver:3.0.2 on Java 17/21, /rest/about/version.json, blank GetMap from wrong native bounds, and Shapefile charset mojibake. |
48
+ | `geoserver-cloud` | 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. |
49
+ | `geoserver-rest-api` | 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. |
50
+ | `geotools` | 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. |
49
51
  | `grass-gis` | 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. |
50
- | `jts` | Use when performing precise 2D computational geometry in Java — spatial predicates (contains, intersects), overlay operations, buffering, triangulation. JTS (Java Topology Suite): the canonical geometry engine used as blueprint for GEOS, Shapely, and NetTopologySuite. |
51
- | `leaflet` | Use when adding lightweight interactive 2D maps to web pages — tile layers, markers, GeoJSON overlays, layer control, popups. Leaflet: compact, mobile-friendly open-source JavaScript web mapping library. |
52
- | `mapbox-gl-js` | Use when building interactive vector web maps with Mapbox GL JS — WebGL rendering, Style Spec, data-driven expressions, 3D terrain, layer-level events. Note: v2+ is proprietary under Mapbox TOS with an access token requirement; MapLibre GL JS is the open-source API-compatible fork. |
53
- | `mapserver` | Use when publishing spatial data as OGC web services (WMS, WFS, WCS) from a mapfile, styling layers with SLD, or deploying the mapserv CGI/FastCGI. MapServer: the C-based OSGeo open-source map server for the web. |
54
- | `mapsui` | Use when embedding interactive 2D maps in .NET desktop (WinForms/WPF) or mobile (MAUI) applications — tile layers, vector features, map controls. Mapsui: cross-platform .NET map component library. |
55
- | `nettopologysuite` | Use when performing 2D computational geometry in .NET — spatial predicates, overlay operations, buffering, WKT/WKB I/O. NetTopologySuite: the .NET port of JTS, available via NuGet for spatial analysis in C# applications. |
56
- | `opengis-all` | Use when navigating end-to-end GIS workflows — discover the full toolchain from GDAL data processing through GeoServer publishing to CesiumJS/OpenLayers visualization. One-stop index covering the complete open-source GIS data pipeline. |
57
- | `opengis-daf` | Use when building plan-driven GIS data analysis or data quality-check pipelines with OpenGisDAF (.NET 10 / C# 14): define buffer, clip, intersect/containment checks, coordinate transform, field calculator, attribute/geometry QC rules purely in JSON plans, run the daf CLI, chain operators via DAG upstream bindings, output to GeoJSON/Shapefile/PostGIS, or extend with plugin operators loaded via AssemblyLoadContext. |
58
- | `opengis-utils-for-java` | Use when needing common GIS utility functions in Java — CRS utilities, geometry helpers, format converters, spatial validation. OpenGIS Utils for Java: convenience toolkit for Java GIS projects. |
59
- | `opengis-utils-for-net` | Use when needing common GIS utility functions in .NET/C# — CRS utilities, geometry helpers, format converters, spatial validation. OpenGIS Utils for .NET: convenience toolkit for .NET GIS projects. |
60
- | `openlayers` | Use when adding interactive 2D maps to web applications — WMS/WFS/WMTS layers, vector styling, map controls, popups. OpenLayers: the most full-featured open-source JavaScript web mapping library. |
52
+ | `jts` | 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. |
53
+ | `leaflet` | Use when adding lightweight 2D tile maps to web pages with leaflet 1.9.4 — L.map/L.tileLayer, markers, popups, GeoJSON overlays, layer control, [lat, lng] ordering, or debugging blank maps, broken default marker icons after bundling, and sizing fixed by invalidateSize(). |
54
+ | `mapbox-gl-js` | Use when building vector web maps with mapbox-gl 3.33.0 — WebGL rendering, Style Spec layers, data-driven expressions, setTerrain raster-dem, fill-extrusion, or debugging 401 'A valid Mapbox access token is required', 'Style is not done loading', and pk./sk. token handling. Note: v2+ is proprietary under Mapbox TOS and requires a token; MapLibre GL JS is the open-source fork. |
55
+ | `mapserver` | Use when publishing WMS/WFS/WCS/OGC API Features from a MapServer 8.6.6 .map mapfile — MAP/LAYER/CLASS/STYLE objects, STATUS/PROJECTION/EXTENT errors, WEB.METADATA wms_enable_request and wfs_enable_request, SLD binding, FastCGI plus MS_MAP_PATTERN hardening, and blank GetMap / "No query information to decode" symptoms. |
56
+ | `mapsui` | Use when embedding interactive 2D maps in .NET desktop (WPF/WinUI/WinForms) or mobile (MAUI/Avalonia/Blazor) apps with Mapsui 5.1.0 (net8.0/net9.0) — Mapsui.Wpf/Mapsui.Maui packages, Map and Layers, OpenStreetMap.CreateTileLayer, Shapefile/GeoJSON via Mapsui.Nts, SphericalMercator.FromLonLat, or fixing a blank MapControl. |
57
+ | `nettopologysuite` | Use when doing 2D computational geometry in .NET with NuGet NetTopologySuite 2.6.0 — GeometryFactory with SRID, Contains/Intersects predicates, Intersection/Union/Buffer overlays, STRtree, GeometryFixer, WKT/WKB/GeoJSON I/O, Shapefile via IO.Esri, and EF Core spatial queries on SQL Server/Npgsql. |
58
+ | `opengis-all` | Use when navigating end-to-end GIS workflows — GDAL CLI/API (ogr2ogr, gdalwarp, gdal_calc.py), qgis_process and PyQGIS analysis, GeoServer REST publishing, and OpenLayers/CesiumJS visualization. One-stop index covering the complete open-source GIS data pipeline. |
59
+ | `opengis-daf` | Use when building JSON-plan GIS analysis or QC pipelines with OpenGisDAF (.NET 10 / C# 14) — daf validate/run, operators buffer/clip/intersect_check/containment_check/coordinate_transform, DAG upstream bindings, GeoJSON/Shapefile/PostGIS sinks, qcMode QC reports, AssemblyLoadContext plugins; also for "zero tests ran" exit code 5, missing --recurse-submodules GDAL build errors, or PostGIS Layer already exists. Plan-driven ETL. |
60
+ | `opengis-utils-for-java` | Use when needing common GIS utilities in Java — OguLayerUtil layer read/write, GeometryUtil 60+ ops, CrsUtil CGCS2000 (EPSG:4490, 4502-4554), Shapefile/GeoJSON/FileGDB/PostGIS/land TXT I/O, topology validation; also for GDAL UnsatisfiedLinkError on gdal_jni, missing osgeo repo on GeoTools, or resolving com.znlgis.ogu4j:ogu4j:1.0.0 that is not on Maven Central. OGU4J. |
61
+ | `opengis-utils-for-net` | Use when needing common GIS utilities in .NET/C# — OguLayerUtil ReadLayer/WriteLayer/ConvertFormat, GeometryUtil 50+ ops, CrsUtil CGCS2000 transforms, Shapefile/GeoJSON/FileGDB/GeoPackage/KML/PostGIS I/O; also for Unable to load DLL gdal / DllNotFoundException, GBK shapefile mojibake, or ArgumentException from Geojson2Wkt on a whole FeatureCollection. OpenGIS.Utils 1.1.2. |
62
+ | `openlayers` | Use when adding interactive 2D maps to web apps with npm ol 10.11.0 — Map/View, fromLonLat to EPSG:3857, WMS/WMTS/XYZ sources, MVT with featureClass, Draw/Modify/Snap interactions, or debugging blank layers (missing setStyle), offset centers and ol/... module-not-found errors. |
61
63
  | `pdal` | Use when processing point cloud data (LAS/LAZ/BPF/EPT/COPC) via CLI or Python — pipeline JSON workflows, format conversion, reprojection, cropping, outlier removal, ground classification (SMRF), and DEM generation from LiDAR. PDAL (Point Data Abstraction Library) is the point cloud equivalent of GDAL: pdal info/translate/pipeline commands plus pdal.Pipeline Python bindings. |
62
- | `postgis` | Use when extending PostgreSQL with spatial data types, spatial indexes (GiST/SP-GiST), geometry functions (ST_Intersects, ST_Buffer, ST_Transform), and spatial queries. PostGIS: the most widely used open-source spatial database extension. |
63
- | `proj` | Use when performing coordinate reference system (CRS) transformation, reprojection, datum shift or EPSG lookup from the command line — converting coordinates between WGS 84, UTM, Web Mercator and CGCS2000. PROJ: the OSGeo library that powers GDAL/QGIS transformations, with projinfo, cs2cs, proj, cct and the proj.db SQLite database. |
64
- | `pyqgis` | Use when extending QGIS with Python plugins, automating map composition, or scripting QGIS processing algorithms. PyQGIS: QGIS Python API for custom tools, processing scripts, and plugin development. |
65
- | `qgis-process` | Use when running QGIS geoprocessing tools headless from command line or CI/CD — buffer, clip, reproject, raster analysis without GUI. QGIS Processing: batch spatial analysis via qgis_process CLI. |
66
- | `qgis-server` | Use when publishing QGIS projects (.qgs/.qgz) as OGC web services (WMS, WFS, WMTS, OGC API Features) via FastCGI, Docker, or Apache/Nginx, and when tuning QGIS_SERVER_* environment variables. QGIS Server: the C++ map server that renders QGIS Desktop projects over HTTP. |
67
- | `shapely` | Use when performing computational geometry in Python — intersection, union, buffer, convex hull, simplification. Shapely: Python bindings for GEOS, the C++ geometry engine that powers PostGIS. |
68
- | `sharpmap` | Use when rendering 2D maps in legacy .NET WinForms or ASP.NET WebForms applications. SharpMap: an older .NET 2D mapping library. For new projects, prefer Mapsui. |
64
+ | `postgis` | Use when extending PostgreSQL with PostGIS 3.6.4 — geometry/geography/raster types, GiST and KNN <-> indexes, ST_Intersects/ST_Buffer/ST_Transform/ST_AsMVT, shp2pgsql -I and raster2pgsql import, and fixing "Operation on mixed SRID", slow spatial joins, and invalid polygons with ST_MakeValid. |
65
+ | `proj` | Use when transforming coordinates or inspecting CRS definitions from the command line — cs2cs, projinfo -s/-t, proj projection math, cct, EPSG lookup, datum shift with grid files, WKT/PROJJSON export, or debugging "Cannot find proj.db" and latitude-first axis order. PROJ 9.9.0: the OSGeo engine behind GDAL/QGIS, with the proj.db SQLite database. |
66
+ | `pyqgis` | Use when scripting QGIS with Python — QgsApplication standalone init, QgsVectorLayer / QgsRasterLayer loading, processing.run after Processing.initialize(), QgsGeometry / QgsExpression, QgsMapSettings rendering and QgsLayoutExporter PDF/PNG export, qgis._3d, or debugging "import qgis.core" failures. PyQGIS for QGIS 4.2.3 and LTR 3.44.15, Python 3.12. |
67
+ | `qgis-process` | Use when running QGIS geoprocessing headless via qgis_process — native:buffer / native:reprojectlayer / native:clip, qgis_process list / help --json / run --json, .model3 models and .py scripts, batch CI pipelines, or debugging "Algorithm ... not found!"; includes QT_QPA_PLATFORM=offscreen and the qgis/qgis images (stable 4.2, ltr 3.44). |
68
+ | `qgis-server` | Use when publishing QGIS projects (.qgs/.qgz) as OGC web services — WMS GetMap/GetPrint, WFS and WFS-T, WMTS, OGC API Features via qgis_mapserv.fcgi with Apache mod_fcgid, Nginx, or Docker, plus QGIS_SERVER_* tuning (MAX_THREADS, PARALLEL_RENDERING, LOG_STDERR); covers "Service unknown or unsupported" and MAP/GetCapabilities checks. QGIS 4.2.3 and LTR 3.44.15. |
69
+ | `shapely` | 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. |
70
+ | `sharpmap` | 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. |
69
71
  <!-- skills:end -->
70
72
 
71
73
  ## 安装
@@ -105,6 +107,14 @@ dsh plugin --profile <profile> remove @dsh-gis/dsh-opengis-skill
105
107
  - `openlayers` / `cesiumjs` / `deck-gl` — Web 2D/3D 可视化。
106
108
  - 加载结果会给出该技能的 **Base directory**;正文中的 `reference/*.md` 与 `../<其他技能>/SKILL.md` 相对链接都据此解析。因为全部技能资产随同一个包一起分发,跨技能链接不需要额外安装或配置。
107
109
 
110
+ ## DeepSeek Harness 适配
111
+
112
+ - 每个技能正文末尾都有 `## DeepSeek Harness 使用建议`:先加载哪个技能、哪些 `reference/*.md` 值得按需读取、先跑什么版本探测命令、产物怎样重新打开验证、哪些操作要先征得用户同意。
113
+ - 命令统一走 DSH 的 shell 工具:Windows 用 `pwsh`;若当前会话只暴露 `run_code`,则在其中调用 `tools.pwsh`。正文里的 Bash 示例(`sudo`、`/tmp`、heredoc、反引号)按平台改写。
114
+ - 文件与日志优先用 `read` / `grep` / `glob` 分段读取;大输出先落盘,长任务放后台作业。技能目录和运行时是只读资源,脚本与产物写到会话工作区。
115
+ - 技能正文标注的是 2026-10-20 核验的上游版本(例如 GeoServer 3.0.2、GeoTools 35.2、QGIS 4.2.3 / LTR 3.44.15、GDAL 3.13.3)。实际环境版本不同时,先探测版本,再按“低版本降级”或“高版本新增 API”说明差异,不要照搬不存在的命令。
116
+ - 技能只是领域知识与执行约定,不会替你安装工具、绕过沙箱或读取凭据;安装依赖、启动服务、覆盖数据、执行破坏性 SQL 前先向用户确认,命令输出中不要回显密码与 token。
117
+
108
118
  ## 上游同步
109
119
 
110
120
  > 本节只适用于**本仓库的源码开发**。`scripts/` 与 `test/` 不在 npm 发布包内(`package.json` 的 `files` 未包含它们),安装用户无需执行这些命令。
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cesiumjs
3
- description: "Use when building browser-based 3D globes, 3D Tiles visualization, time-dynamic geospatial data, or virtual globe applications. CesiumJS: high-performance WebGL 3D geospatial engine for interactive earth visualization."
3
+ description: "Use when building browser-based 3D globes, 3D Tiles, CZML/time-dynamic data, or glTF models with npm cesium 1.146.0 — Viewer, Cesium3DTileset, Ion token (Cesium.Ion.defaultAccessToken), CESIUM_BASE_URL for Workers/Assets/Widgets, GCJ-02 tile offset, or debugging a black screen after a Vite/Webpack build."
4
4
  tags:
5
5
  - javascript
6
6
  - webgl
@@ -49,7 +49,7 @@ npm install cesium
49
49
  <script src="https://cdn.jsdelivr.net/npm/cesium/Build/Cesium/Cesium.js"></script>
50
50
  ```
51
51
 
52
- > **1.146 变更:** 数学/几何/时间/工具类被拆分为新包 `@cesium/core`。从 `cesium` 主包导入的代码不受影响;直接按子路径引用 `@cesium/engine` 的代码需改从 `@cesium/core` 导入(旧导出将在 1.150 移除)。
52
+ > **1.146 变更:** 数学/几何/时间/工具类被拆分为新包 `@cesium/core`(`cesium@1.146.0` 依赖 `@cesium/core@^0.1.0`)。从 `cesium` 主包导入的代码不受影响;直接按子路径引用 `@cesium/engine` 的代码需改从 `@cesium/core` 导入(旧导出计划在后续版本移除,1.146 仍可用)。
53
53
 
54
54
  ### Vite 集成
55
55
 
@@ -263,17 +263,16 @@ viewer.trackedEntity = entity;
263
263
 
264
264
  ---
265
265
 
266
- ## AI 使用建议
266
+ ## DeepSeek Harness 使用建议
267
267
 
268
-
269
- ### 关键注意事项
270
-
271
- - **Ion Token**:使用 Cesium ion 服务需要设置 `Cesium.Ion.defaultAccessToken`;自托管数据则无需
272
- - **坐标转换**:Cesium 内部使用 Cartesian3(地心地固坐标),通过 `Cesium.Cartesian3.fromDegrees(lon, lat, height)` 将经纬度转为内部坐标
273
- - **Entity vs Primitive**:少量动态要素用 Entity API(简洁),大量静态要素用 Primitive API(高性能)
274
- - **贴地(clampToGround)**:在三维地形上,需要明确设置 `clampToGround: true` 或 `HeightReference.CLAMP_TO_GROUND`
275
- - **资源释放**:不再使用的 `DataSource` 调用 `viewer.dataSources.remove(ds)`,3D Tileset 调用 `tileset.destroy()`
276
- - **静态资源部署**:使用 Webpack/Vite 时,确保 `Assets`、`Workers`、`Widgets` 目录正确复制到输出目录
268
+ - **加载与引用**:用 `skill("cesiumjs")` 加载(用户也可输入 `/cesiumjs`);本技能无 reference 子目录,示例代码直接落到会话工作区的工程里,技能目录只读。
269
+ - **执行环境**:`npm install`、`npm run build` 交给 `pwsh`;Windows 下 `npm` 实为 `npm.cmd`,脚本里写 `cmd /c npm run build` 更稳;装包和大构建用后台作业,输出重定向到文件再分段读。
270
+ - **先探测版本**:`npm ls cesium`(未安装时 `npm view cesium version`)。本技能按 1.146.0 编写:该版本依赖 `@cesium/core@^0.1.0`,数学/几何/时间/工具类已拆到 `@cesium/core`,低于 1.146 的工程不要照搬这条迁移建议。
271
+ - **验证产物**:`npm run build` 通过后用 `npx serve dist` 或 `python -m http.server 5173 -d dist` 起静态服务,用 `curl.exe -I` 检查 `http://localhost:5173/Cesium.js` 与 `.../Cesium/Widgets/widgets.css` 返回 200(404 或 text/html 说明资源没拷贝);DSH 不打开浏览器,把 URL 和预期画面交给用户,有截图再用 `read_image` 核对。
272
+ - **Ion 与部署**:`Cesium.Ion.defaultAccessToken` 从环境变量注入(Vite 用 `import.meta.env.VITE_CESIUM_ION_TOKEN`),不要写进源码或提交;黑屏先查 `window.CESIUM_BASE_URL` 与 `Workers/Assets/Widgets` 是否随构建产物发布。
273
+ - **坐标与性能**:定位一律 `Cesium.Cartesian3.fromDegrees(lon, lat, height)`;大量静态要素用 Primitive,少量动态要素才用 Entity;`clampToGround` 只在需要贴地时开启。
274
+ - **常见症状**:瓦片整体错位是国内底图的 GCJ-02 偏移,需先纠偏;ion 服务 401/403 多为 token 未设置或失效;`tileset.destroy()`、`viewer.dataSources.remove()` 不调用会持续占用显存。
275
+ - **安全与权限**:安装依赖、启动 dev server、改端口前先征得用户同意;日志和回答中不要回显 Ion token。
277
276
 
278
277
  ## 相关技能
279
278
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: deck-gl
3
- description: "Use when visualizing large geospatial or tabular datasets in the browser with GPU rendering — millions of points, GeoJSON polygons, vector tiles, aggregation layers (hexagon, screen grid, heatmap), and overlaying them on a MapLibre/Mapbox GL JS base map via @deck.gl/mapbox."
3
+ description: "Use when visualizing large geospatial datasets in the browser with deck.gl 9.4.0 — ScatterplotLayer/GeoJsonLayer, HexagonLayer/ScreenGridLayer aggregation, MVTLayer/TileLayer, @deck.gl/mapbox MapboxOverlay over MapLibre, or debugging blank canvases, stale data props and mismatched @deck.gl/* subpackage versions."
4
4
  tags:
5
5
  - javascript
6
6
  - web
@@ -439,12 +439,13 @@ map.addControl(overlay);
439
439
  - **leaflet** — 轻量 2D 瓦片地图,适合中小数据量与简单场景:[../leaflet/SKILL.md](../leaflet/SKILL.md)
440
440
  - **cesiumjs** — 三维地球与 3D Tiles 可视化:[../cesiumjs/SKILL.md](../cesiumjs/SKILL.md)
441
441
 
442
- ## AI 使用建议
442
+ ## DeepSeek Harness 使用建议
443
443
 
444
- - **版本对齐**:生成代码时统一使用 `@deck.gl/*` 9.4.0,并提醒用户各子包版本必须同步,避免混用不同大版本
445
- - **导入路径**:`Deck` 来自 `@deck.gl/core`,基础图层来自 `@deck.gl/layers`,聚合图层来自 `@deck.gl/aggregation-layers`,瓦片与 MVT 来自 `@deck.gl/geo-layers`,不要写错包名
446
- - **坐标顺序**:位置一律 `[经度, 纬度]`,与 GeoJSON 一致;半径默认单位为米,像素半径需显式设 `radiusUnits: 'pixels'`
447
- - **数据引用**:示例代码避免在渲染函数内生成新数组,优先用 `useMemo` 或模块级常量缓存
448
- - **拾取默认值**:需要 tooltip 或点击的图层必须显式写 `pickable: true`,其余保持默认关闭
449
- - **底图选择**:用户要求开源或免 token 时用 MapLibre(`maplibregl` + `MapboxOverlay`),需要 Mapbox 专有能力时才用 `mapbox-gl` 并提醒配置 token
450
- - **不虚构 API**:属性名以官方文档为准(如聚合权重用 `getColorWeight` / `getElevationWeight`),不确定时先查 <https://deck.gl/docs/api-reference/layers> 再生成
444
+ - **加载与引用**:用 `skill("deck-gl")` 加载(用户也可输入 `/deck-gl`);本技能无 reference 子目录,示例代码写入会话工作区工程,技能目录只读。
445
+ - **执行环境**:`npm install`、`npm run build` 交给 `pwsh`;子包多、安装输出长,重定向到文件再分段读。
446
+ - **先探测版本**:`npm ls deck.gl @deck.gl/core @deck.gl/layers @deck.gl/geo-layers`;所有 `@deck.gl/*` 必须是同一版本 9.4.0,混版会报 `Cannot read properties of undefined`。本技能按 9.4.0 编写。
447
+ - **验证产物**:`npm run build` 后 `npx serve dist`,`curl.exe -I http://localhost:5173/` 确认入口;WebGL 是否真出图只能由浏览器确认,DSH 不打开浏览器,请用户看画面和控制台,有截图再用 `read_image`。
448
+ - **无 GPU 环境**:无头/CI 环境无法验证 WebGL,构建通过不等于渲染正确,不要据此报告“已渲染”。
449
+ - **数据与坐标**:位置一律 `[经度, 纬度]`;保持 `data` 引用稳定,不要在渲染路径里 `filter`/`map` 生成新数组,否则 GPU 缓冲反复重建。
450
+ - **常见症状**:空白画布先查容器高度与底图;数据变了画面不变用 `updateTriggers`;tooltip 无反应是 `pickable` 默认 false。
451
+ - **安全与权限**:装包、起 dev server 前先征得用户同意;用 Mapbox 底图时提醒 token 与计费。
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: gdal
3
- description: "Use when processing geospatial raster/vector data via command line — format conversion (Shapefile to GeoJSON), reprojection, DEM analysis, NDVI calculation, mosaicking. GDAL/OGR CLI: the industry standard for batch geospatial data processing with 50+ command-line tools (ogr2ogr, gdalwarp, gdal_translate, gdal_calc)."
3
+ description: "Use when processing geospatial raster/vector data via GDAL/OGR CLI — ogr2ogr format conversion (Shapefile/GeoPackage/GeoJSON), gdalwarp reprojection, gdal_translate, gdal_calc.py NDVI, COG, mosaicking, DEM contours, gdalinfo -json checks — or diagnosing \"not recognized as a supported file format\"; also covers the 3.9+ unified gdal raster / gdal vector CLI."
4
4
 
5
5
  tags:
6
6
  - gdal
@@ -415,49 +415,15 @@ gdaltindex -recursive -of GPKG \
415
415
 
416
416
  ---
417
417
 
418
- ## AI 使用建议
419
-
420
- ### 推荐工作流
421
-
422
- 1. **探索数据**:
423
- ```bash
424
- gdalinfo input.tif # 栅格信息
425
- ogrinfo input.shp # 矢量信息
426
- ```
427
-
428
- 2. **检查支持的格式和驱动**:
429
- ```bash
430
- gdalinfo --formats
431
- ogrinfo --formats
432
- ```
433
-
434
- 3. **分步处理**(避免大内存操作):
435
- ```bash
436
- # 不要直接镶嵌所有文件
437
- # 改为逐个处理和合并
438
- ```
439
-
440
- 4. **使用 JSON 输出**(便于解析):
441
- ```bash
442
- gdalinfo -json input.tif | jq '.coordinateSystem'
443
- ogrinfo -json input.shp | jq '.layers[0].featureCount'
444
- ```
445
-
446
- 5. **优化性能**:
447
- ```bash
448
- # 启用多线程、内存缓存、COG 格式
449
- export GDAL_NUM_THREADS=ALL_CPUS
450
- export GDAL_CACHEMAX=2048
451
- ```
452
-
453
- ### 关键注意事项
454
-
455
- - **始终备份**:GDAL 可以就地修改文件(如 `gdal_edit.py`)
456
- - **使用绝对路径**:避免工作目录问题
457
- - **验证坐标系**:重投影前确认源和目标坐标系
458
- - **测试小数据**:在大数据集上运行前,用小样本测试
459
- - **使用 VRT(虚拟数据集)**:避免创建多个副本
460
- - **环境变量**:设置适当的 `GDAL_CACHEMAX` 和 `GDAL_NUM_THREADS`
418
+ ## DeepSeek Harness 使用建议
419
+
420
+ - **加载与引用**:用 `skill("gdal")` 加载(用户也可输入 `/gdal`);`reference/raster-tools.md`、`reference/vector-tools.md`、`reference/data-formats.md` 按需 `read`,路径相对加载结果中的 Base directory;技能目录只读,产物写到会话工作区。
421
+ - **执行环境**:命令交给 dsh 的 shell 工具(Windows 用 `pwsh`;仅暴露 `run_code` 的会话在 `tools.pwsh` 中执行)。正文的 `apt-get`、`sudo`、`export VAR=` 是 Bash 写法:Windows 改为 `$env:GDAL_NUM_THREADS = "ALL_CPUS"`,无 `sudo`/`apt` 时改用 conda-forge 或 `docker run --rm -v "${PWD}:/data" -w /data osgeo/gdal:latest ...`。
422
+ - **先探测版本**:`gdalinfo --version`、`ogrinfo --version`;本技能按 GDAL 3.13.3 编写,低于 3.9 没有 `gdal <command>` 新式 CLI(`gdal vector`/`gdal raster`),须退回 `ogr2ogr`/`gdalwarp`,且 `gdal_calc.py` 等脚本工具还需要 Python 绑定。
423
+ - **验证产物**:栅格用 `gdalinfo -json out.tif` 核对 `driverShortName`、`size`、`coordinateSystem.wkt`、`bands[].noDataValue`;矢量用 `ogrinfo -so out.shp layer`(或 `ogrinfo -json out.gpkg`)核对 `Feature Count`、`Geometry`、字段列表;不要只凭退出码报告成功。
424
+ - **先看错误再改参数**:`ERROR 4: ... not recognized as a supported file format` 先查路径与 `gdalinfo --formats`;`--debug on` 或 `CPL_DEBUG=ON` 看驱动细节;输出很长时重定向到文件再分段 `read`,不要一次打印全文。
425
+ - **批处理与中间产物**:批量循环建议用 Python 生成命令,中间结果用 `gdalbuildvrt` 写 `.vrt` 而不是反复 `gdalwarp`;耗时命令放后台作业,避免一次重投影全部数据。
426
+ - **安全与权限**:`gdal_edit.py`、`ogr2ogr` 写已有目标、`-overwrite`/`-append` 会就地改写或覆盖数据,先备份或换输出名;安装 GDAL、改 `GDAL_DATA`/`PROJ_LIB`、访问 `/vsis3/`(需 `AWS_SECRET_ACCESS_KEY`)前先征得用户同意,回答里不要回显密钥。
461
427
 
462
428
  ---
463
429
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: gdal-api
3
- description: "Use when programming against GDAL/OGR in C, C++, Python, Java, or .NET for raster/vector I/O, coordinate transformation, or custom geospatial algorithms. GDAL API: low-level programming interface for reading/writing 70+ geospatial formats."
3
+ description: "Use when programming against GDAL/OGR in C, C++, Python, Java, or .NET — raster/vector I/O, gdal.UseExceptions, OGRSpatialReference transforms, gdal.Translate / gdal.Warp, VRT/COG, or fixing \"no driver registered\" and UnsatisfiedLinkError; C++ gdal-config, Maven org.gdal:gdal 3.13.0, NuGet MaxRev.Gdal.Core."
4
4
 
5
5
  tags:
6
6
  - gdal
@@ -102,7 +102,7 @@ dotnet add package MaxRev.Gdal.LinuxRuntime.Minimal # Linux
102
102
  dotnet add package MaxRev.Gdal.WindowsRuntime.Minimal # Windows
103
103
  ```
104
104
 
105
- **注意:** 官方 SWIG 绑定命名空间为 `OSGeo.GDAL`、`OSGeo.OGR`、`OSGeo.OSR`。NuGet 包 `MaxRev.Gdal.Core` 是社区维护的跨平台封装。
105
+ **注意:** 官方 SWIG 绑定命名空间为 `OSGeo.GDAL`、`OSGeo.OGR`、`OSGeo.OSR`。NuGet 包 `MaxRev.Gdal.Core` 是社区维护的跨平台封装,2026-10 的最新版为 `3.13.3.583`(对应 GDAL 3.13.3),运行时包需与 `MaxRev.Gdal.Core` 主版本一致。
106
106
 
107
107
  ---
108
108
 
@@ -315,34 +315,15 @@ src_ds = None # 释放数据源
315
315
 
316
316
  ---
317
317
 
318
- ## AI 使用建议
318
+ ## DeepSeek Harness 使用建议
319
319
 
320
- ### 推荐工作流
321
-
322
- 1. **语言选择**:Python 优先(NumPy 集成、语法简洁),性能敏感用 C++,.NET 项目用 C#,Java 项目用 Java
323
- 2. **驱动注册**:任何 GDAL 操作前先调用注册函数(C++: `GDALAllRegister()`, Python 默认已注册)
324
- 3. **探索数据**:先 `gdalinfo`/`ogrinfo` 命令行查数据结构,再编写 API 代码
325
- 4. **异常处理**:Python 脚本开头加 `gdal.UseExceptions()` 启用异常模式
326
- 5. **分块读写**:大栅格使用 `RasterIO` 指定窗口,避免全量加载到内存
327
-
328
- ### 关键注意事项
329
-
330
- - **资源释放**:C++ 用 `GDALClose()`,Python 赋值 `None`,Java 用 `.delete()`,C# 用 `.Dispose()`
331
- - **坐标轴顺序**:GDAL 3.0+ 默认纬度在前,可用 `SetAxisMappingStrategy` 切换
332
- - **Python NumPy 集成**:`ReadAsArray()` 直接返回 NumPy 数组,是 Python 最大优势
333
- - **CS 平台依赖**:C# 需安装对应平台运行时包(Linux/Windows)
334
- - **JA 本地库**:Java 需确保 `gdalalljni` 在 `java.library.path` 中
335
-
336
- ### 各语言适用场景
337
-
338
- | 场景 | Python | C++ | Java | C# |
339
- |------|--------|-----|------|-----|
340
- | 数据处理脚本 | (推荐)首选 | | | |
341
- | 生产级服务 | | (推荐)首选 | (推荐) | (推荐) |
342
- | GIS 桌面插件 | (推荐) | | | |
343
- | .NET 企业应用 | | | | (推荐) |
344
- | Android GIS | | | (推荐) | |
345
- | 嵌入式系统 | | (推荐) | | |
320
+ - **加载与引用**:用 `skill("gdal-api")` 加载(用户也可输入 `/gdal-api`);`reference/raster-api.md`(栅格读写的完整 API)、`reference/vector-api.md`(OGR 图层与 GeoPackage)按需 `read`,路径相对 Base directory;技能目录只读,示例代码与产物写到会话工作区。
321
+ - **执行环境**:编译与运行交给 dsh 的 shell 工具(Windows 用 `pwsh`;仅暴露 `run_code` 的会话在 `tools.pwsh` 中执行)。C++ 用 `gdal-config --cflags --libs` 或 CMake `find_package(GDAL REQUIRED)`;Python 用装好绑定的解释器;Java 的 `gdalalljni`、.NET 的 MaxRev 运行时包必须与平台、架构匹配。
322
+ - **先探测版本**:`ogrinfo --version`、`python -c "from osgeo import gdal; print(gdal.VersionInfo())"`(返回 `3130300` 这类数字)、`mvn -v`、`dotnet --version`;本技能按 GDAL 3.13.3、Java 绑定 3.13.0 编写,低版本缺少新驱动与部分 SWIG 方法,回答里要说明差异。
323
+ - **验证产物**:写完后重新打开核对——`python -c "from osgeo import gdal; ds=gdal.Open('out.tif'); print(ds.GetDriver().ShortName, ds.RasterCount, ds.GetSpatialRef().GetAuthorityCode(None))"`;矢量用 `ogrinfo -al -so out.gpkg` 看要素数与字段;Python 一律先 `gdal.UseExceptions()`,否则错误被静默吞掉。
324
+ - **语言选择**:数据处理脚本优先 Python(`ReadAsArray()` 直通 NumPy);生产服务与嵌入式优先 C++;Java 注意用 `java.util.Vector<String>` 传选项;.NET 用 `OSGeo.GDAL`/`OSGeo.OGR` 命名空间,或 MaxRev 封装 + 对应平台运行时包。
325
+ - **资源与轴序**:Python 置 `ds = None`、C++ `GDALClose()`、Java `.delete()`、C# `.Dispose()` 之后才算落盘;GDAL 3+ 默认纬度在前,需要经度在前时用 `SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER)`,轴序改错是坐标错位最常见的原因。
326
+ - **安全与权限**:以更新模式(`gdal.GA_Update`、`GDALOpen(..., GA_Update)`)打开会直接改原文件;覆盖已有输出前先确认;安装 `libgdal-dev`、`dotnet add package`、写系统目录前先征得用户同意。
346
327
 
347
328
  ## 相关技能
348
329
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: geometry-api-java
3
- description: "Use when working with Esri geometry types (Point, Polyline, Polygon, Envelope) in Java — spatial operations, JSON/GeoJSON/WKT I/O, geodesic calculations. Esri Geometry API for Java."
3
+ description: "Use when working with Esri geometry types (Point, Polyline, Polygon, Envelope) in Java — GeometryEngine, com.esri.geometry:esri-geometry-api:2.2.4, WKT/WKB/GeoJSON/Esri JSON I/O, geodesic distance; also when GeometryEngine has no intersects or WKB method and you need OperatorFactoryLocal, or when 2.3.1 coordinates fail to resolve on Maven Central. Esri Geometry API for Java."
4
4
  tags:
5
5
  - java
6
6
  - geometry
@@ -376,23 +376,16 @@ if (hit) {
376
376
 
377
377
  ---
378
378
 
379
- ## AI 使用建议
379
+ ## DeepSeek Harness 使用建议
380
380
 
381
- ### 推荐工作流
382
-
383
- 1. **创建几何对象**:使用 `Point`、`Polyline`、`Polygon` 等构造函数创建几何
384
- 2. **设置空间参考**:通过 `SpatialReference.create(wkid)` 指定坐标系
385
- 3. **空间运算**:优先使用 `GeometryEngine` 静态方法(线程安全、API 简洁);批量处理使用 `OperatorFactoryLocal` + `GeometryCursor`
386
- 4. **格式转换**:使用 `GeometryEngine.geometryToGeoJson()` / `geometryFromWkt()` 等方法进行 WKT、GeoJSON、Esri JSON 互转;WKB 通过 `OperatorImportFromWkb` / `OperatorExportToWkb` 算子
387
- 5. **大地测量**:经纬度距离使用 `GeometryEngine.geodesicDistanceOnWGS84()`(返回米);椭球面积/长度算子未对外公开,需要时改用 JTS / GeoTools
388
-
389
- ### 关键注意事项
390
-
391
- - **坐标系一致**:进行空间运算前,确保所有几何对象使用相同的 `SpatialReference`
392
- - **简化几何**:导入外部数据后,使用 `GeometryEngine.simplify()` 确保拓扑正确
393
- - **大地测量 vs 平面**:经纬度距离用 `geodesicDistanceOnWGS84()`;椭球面积/长度算子未公开,建议改用 JTS/GeoTools
394
- - **性能优化**:批量操作使用 `OperatorFactoryLocal` + `GeometryCursor`,而非逐个调用 `GeometryEngine` 静态方法
395
- - **线程安全**:`GeometryEngine` 静态方法是线程安全的;`Operator` 实例非线程安全
381
+ - **加载与引用**:用 `skill("geometry-api-java")` 加载(用户也可输入 `/geometry-api-java`);本技能没有 `reference/` 子目录,示例都在正文;技能目录只读,Maven 工程建在会话工作区。
382
+ - **执行环境**:先 `mvn -v` 与 `java -version` 确认工具链(JDK 8+ 即可编译,建议 17/21 运行),Windows 上用 `pwsh` 执行;`%JAVA_HOME%`/`JAVA_HOME` 与 `mvn` 实际使用的 JDK 可能不同,报 `Unsupported class file major version` 时按 `mvn -v` 显示的 JDK 判断。
383
+ - **依赖坐标**:`com.esri.geometry:esri-geometry-api:2.2.4` 是 Maven Central 最新(2020-09 发布);上游 2.3.1(2026-10-09)未发布到 Central。先 `mvn dependency:get -Dartifact=com.esri.geometry:esri-geometry-api:2.2.4` 确认可解析,解析失败时报告“依赖不可下载”,不要自行改成 2.3.1 或别处坐标。
384
+ - **离线与网络**:首次 `mvn` 会拉依赖,无网或私服缺包时报 `Could not resolve dependencies`;不要为绕过它去改 `settings.xml`、加未知仓库或降级版本,先向用户要可用镜像。
385
+ - **验证产物**:写最小 main(或 JUnit)断言三件事——`geometryFromWkt` → `geometryToWkt` 往返等价、`GeometryEngine.buffer(poly, sr, 2.0)` 后 `getEnvelope()` 向外扩张、`geometryToGeoJson` 能被 `geoJsonToGeometry` 重新读入;`mvn -q -DskipTests package` 只证明能编译,不代表几何正确。
386
+ - **编译期陷阱**:`GeometryEngine` 没有 `intersects` 和 WKB 方法,分别用 `OperatorIntersects.local().execute(a, b, sr, null)` 与 `OperatorImportFromWkb`/`OperatorExportToWkb`;面积/长度用 `geometry.calculateArea2D()` / `calculateLength2D()`,不要去找 `getArea()`。
387
+ - **坐标与线程**:参与运算的几何必须带同一 `SpatialReference`;`GeometryEngine` 静态方法可并发调用,`Operator` 实例非线程安全,批量时用 `OperatorFactoryLocal` + `GeometryCursor` 并每线程持有自己的算子。
388
+ - **安全与权限**:`mvn` 会写 `~/.m2` 与工作区 `target/`,属预期行为;执行 `mvn install`/`deploy`、改动共享 `settings.xml` 或写入系统目录前先征得用户同意。
396
389
 
397
390
  ## 相关技能
398
391
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: geometry-api-net
3
- description: "Use when working with Esri geometry types (Point, Polyline, Polygon, Envelope) in .NET/C# — spatial operations, JSON/GeoJSON/WKT I/O, geodesic calculations. Esri Geometry API for .NET."
3
+ description: "Use when working with Esri geometry types (Point, Polyline, Polygon, Envelope) in .NET/C# — GeometryEngine, NuGet OpenGIS.Esri.Geometry.Core 1.0.9, WKT/EWKT, WKB, GeoJSON and Esri JSON I/O, System.Text.Json converters, geodesic distance; also for unclosed polygon rings, Geometry base-class casts after overlay, or the retired Esri/geometry-api-net repo. Esri Geometry API for .NET."
4
4
  tags:
5
5
  - dotnet
6
6
  - geometry
@@ -304,23 +304,16 @@ dotnet run --project samples/OpenGIS.Esri.Geometry.Samples
304
304
 
305
305
  ---
306
306
 
307
- ## AI 使用建议
307
+ ## DeepSeek Harness 使用建议
308
308
 
309
- ### 推荐工作流
310
-
311
- 1. **创建几何对象**:使用 `Point`、`Polyline`、`Polygon` 等构造函数创建几何
312
- 2. **空间运算**:优先使用 `GeometryEngine` 静态方法(API 最简洁);需要精细控制时使用 `Operator.Instance` 单例模式
313
- 3. **格式转换**:使用 `GeometryEngine.GeometryToGeoJson()` / `GeometryFromWkt()` 等方法进行 WKT、WKB、GeoJSON、Esri JSON 互转
314
- 4. **大地测量**:对地理坐标的距离/面积计算,使用 `GeometryEngine.GeodesicDistance()` / `GeodesicArea()`
315
- 5. **序列化集成**:使用 `OpenGIS.Esri.Geometry.Json.Converters` 命名空间的 `System.Text.Json` 转换器
316
-
317
- ### 关键注意事项
318
-
319
- - **Polygon 环必须闭合**:首尾点必须相同
320
- - **返回类型需转换**:集合运算返回 `Geometry` 基类,需根据实际类型做类型转换
321
- - **大地测量基于 WGS84**:`GeodesicDistance` 使用 Vincenty 公式
322
- - **GeoJSON 导出规则**:单路径 Polyline 导出为 `LineString`,多路径导出为 `MultiLineString`
323
- - **Operator 使用 Lazy 单例**:所有 Operator 类通过 `Instance` 属性获取单例实例
309
+ - **加载与引用**:用 `skill("geometry-api-net")` 加载(用户也可输入 `/geometry-api-net`);`reference/geometry-types.md` 按需 `read`,路径相对加载结果中的 Base directory;技能目录只读,示例工程建在会话工作区。
310
+ - **执行环境**:先 `dotnet --version`(库目标 `netstandard2.0`,可被 net6/net8/net9/net10 引用);Windows 上用 `pwsh` 执行 `dotnet` 命令,`dotnet new console -o demo && cd demo` 建最小工程。
311
+ - **依赖坐标**:`dotnet add package OpenGIS.Esri.Geometry.Core --version 1.0.9`(NuGet 最新 1.0.9,2026-09-21),需要 `System.Text.Json` 转换器时再装 `OpenGIS.Esri.Geometry.Json`;还原失败报 `NU1101` 说明源或版本不可用,报告“依赖不可下载”,不要自己编版本号。
312
+ - **验证产物**:最小控制台程序断言三件事——`GeometryEngine.GeometryFromWkt` → `GeometryToWkt` 往返、`GeometryEngine.Contains(polygon, point)` 返回 true、`GeometryEngine.Buffer(point, 5.0).GetEnvelope()` 为 (XMin=5,YMin=15,XMax=15,YMax=25),再 `dotnet run` 看实际输出;`dotnet build` 成功不代表几何结果正确。
313
+ - **构建与测试**:`dotnet build` 编译、`dotnet test` 跑 xUnit、`dotnet run --project samples/OpenGIS.Esri.Geometry.Samples` 跑示例(需在仓库 checkout 内,且该路径存在);输出在 `bin/`、`obj/`,不要提交。
314
+ - **编译期陷阱**:`Polygon.AddRing` 必须闭合(首尾点相同)否则面积/包含判断异常;集合运算返回 `Geometry` 基类,要按 `Point`/`Polygon` 转型后再用;容差 `GeometryConstants.DefaultTolerance`(1e-10)是内部常量,无法外部调整。
315
+ - **大地测量前提**:`GeodesicDistance`/`GeodesicArea` 基于 WGS84(Vincenty),输入必须是经纬度;对投影坐标(如 EPSG:3857 米制)调用会得到无意义结果。
316
+ - **安全与权限**:`dotnet restore` 需访问 NuGet 源,离线时先确认本地缓存;修改全局 `NuGet.config`、安装 SDK 或写入系统目录前先征得用户同意,命令输出里不要回显私有源凭据。
324
317
 
325
318
  ## 常见问题
326
319
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: geopandas
3
- description: "Use when performing vector spatial data analysis in Python — reading/writing shapefiles, spatial joins, overlay operations, choropleth maps. GeoPandas: extends pandas DataFrames with geometry columns for Pythonic spatial analysis."
3
+ description: "Use when doing vector spatial analysis in Python — gpd.read_file/to_file via pyogrio (GPKG, Shapefile, GeoParquet), sjoin/sjoin_nearest, overlay, clip, dissolve, to_crs vs set_crs, gdf.plot choropleth; also for CRSError from a missing PROJ data dir, area/distance computed in degrees, or GeoDataFrame geometry-column conflicts. GeoPandas 1.2.0 extends pandas DataFrames with geometry columns."
4
4
  tags:
5
5
  - python
6
6
  - pandas
@@ -356,24 +356,16 @@ m = gdf.explore(column="population", cmap="viridis",
356
356
  | `DriverError` 无法写入 | 驱动不支持或文件被占用 | 检查驱动名拼写、关闭已打开的文件 |
357
357
  | `align=True` 导致意外 NaN | 二元操作默认按索引对齐 | 传入 `align=False` 或重置索引 |
358
358
 
359
- ## AI 使用建议
359
+ ## DeepSeek Harness 使用建议
360
360
 
361
- ### 推荐工作流
362
-
363
- 1. **读取数据**:使用 `gpd.read_file()` 读取矢量文件,或 `gpd.read_parquet()` 读取 GeoParquet
364
- 2. **检查 CRS**:始终先检查 `gdf.crs`,需要在投影坐标系(非地理坐标系)下进行面积/距离计算
365
- 3. **空间分析**:使用 `gpd.sjoin()` 进行空间连接,`gpd.overlay()` 进行叠加分析,`gpd.clip()` 进行裁剪
366
- 4. **可视化**:使用 `.plot()` 快速静态出图,`.explore()` 生成交互式地图
367
- 5. **输出**:使用 `gdf.to_file()` 或 `gdf.to_parquet()` 保存结果,优先使用 GeoPackage 或 GeoParquet 格式
368
-
369
- ### 关键注意事项
370
-
371
- - **`set_crs()` vs `to_crs()`**:`set_crs()` 仅标记坐标系不转换坐标,`to_crs()` 执行实际坐标变换——切勿混用
372
- - **面积/距离计算前投影**:地理坐标系(EPSG:4326)下面积单位为度²无意义,应使用 `gdf.to_crs(gdf.estimate_utm_crs())` 投影后再计算
373
- - **空间操作前统一 CRS**:确保参与 `sjoin`、`overlay`、`clip` 的所有 GeoDataFrame 使用相同 CRS
374
- - **优先使用 GeoParquet**:比 Shapefile/GeoJSON 读写快 5-10 倍,且无字段名长度限制
375
- - **向量化操作**:避免逐行循环,使用 GeoSeries 的向量化方法(`buffer()`、`intersection()` 等)批量处理
376
- - **空间索引自动构建**:`.sindex` 自动维护 STRtree,`query()` 和 `nearest()` 可大幅加速空间查询
361
+ - **加载与引用**:用 `skill("geopandas")` 加载(用户也可输入 `/geopandas`);`reference/core-api.md` 按需 `read`,路径相对加载结果中的 Base directory;技能目录只读,脚本与产物写到会话工作区。
362
+ - **执行环境**:命令交给 dsh 的 shell 工具(Windows 用 `pwsh`,仅暴露 `run_code` 的会话在 `tools.pwsh` 里跑);不要假设 `python` 是 QGIS/GDAL 自带的解释器,先 `python -c "import sys; print(sys.executable, sys.version)"`。
363
+ - **先探测版本**:`python -c "import geopandas as gpd; print(gpd.__version__, gpd.options.io_engine)"`;本技能按 1.2.0 / Python >= 3.11 编写,低版本会缺 `to_arrow`、`to_parquet(geometry_encoding=...)` 与 1.2 新绘图参数(`tiles=`、`legend_kwds={"colorbar": True}`),回答时说明差异而不是硬写。
364
+ - **检查依赖后端**:`python -c "import pyogrio, pyproj; print(pyogrio.__version__, pyproj.__version__, pyproj.datadir.get_data_dir())"`;PROJ 数据目录缺失时 `to_crs("EPSG:3857")` 抛 `CRSError: Invalid projection`,装 `pyproj`/`pyogrio` 前先征得用户同意。
365
+ - **验证产物(必做)**:写完立即重开核对,`gdf = gpd.read_file("out.gpkg", layer="result"); print(gdf.crs, len(gdf), gdf.is_valid.all(), gdf.total_bounds)`,并确认面积/长度是在投影坐标系下算的。
366
+ - **落图后看图**:`ax = gdf.plot(column="pop", legend=True, figsize=(12, 8)); ax.figure.savefig("map.png", dpi=100)`(需 matplotlib),再用 `read_image("map.png")` 检查范围、图例与空几何,不要只凭退出码报告成功。
367
+ - **典型误操**:`set_crs()` 只标记不改坐标、`to_file()` 默认整表覆盖、`to_postgis(if_exists="replace")` 会删表重建——执行前确认目标路径/表名,Shapefile 字段名超 10 字符会被截断,改用 `.gpkg`。
368
+ - **安全**:数据库连接串里的密码不要回显在命令输出里;`pip install geopandas[all]`、写入系统目录或覆盖生产数据前先得到用户确认。
377
369
 
378
370
  ## 相关技能
379
371