@dsh-gis/dsh-opengis-skill 0.2.0 → 0.4.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.
- package/CHANGELOG.md +126 -1
- package/README.md +51 -25
- package/adaptations/brutile.md +6 -6
- package/adaptations/cesiumjs.md +6 -6
- package/adaptations/common.md +20 -13
- package/adaptations/deck-gl.md +6 -6
- package/adaptations/duckdb-spatial.md +6 -6
- package/adaptations/gdal-api.md +6 -6
- package/adaptations/gdal.md +6 -6
- package/adaptations/geolibre.md +6 -6
- package/adaptations/geometry-api-java.md +6 -6
- package/adaptations/geometry-api-net.md +6 -6
- package/adaptations/geonode.md +6 -6
- package/adaptations/geopandas.md +6 -6
- package/adaptations/geopipe-agent.md +6 -6
- package/adaptations/geos.md +8 -0
- package/adaptations/geoserver-cloud.md +6 -6
- package/adaptations/geoserver-rest-api.md +6 -6
- package/adaptations/geoserver.md +6 -6
- package/adaptations/geotools.md +6 -6
- package/adaptations/grass-gis.md +6 -6
- package/adaptations/jts.md +6 -6
- package/adaptations/kepler-gl.md +6 -6
- package/adaptations/leaflet.md +6 -6
- package/adaptations/mapbox-gl-js.md +6 -6
- package/adaptations/maplibre-gl-js.md +8 -0
- package/adaptations/maplibre-native.md +8 -0
- package/adaptations/mapserver.md +6 -6
- package/adaptations/mapsui.md +6 -6
- package/adaptations/nettopologysuite.md +6 -6
- package/adaptations/opendronemap.md +8 -0
- package/adaptations/opengis-all.md +7 -6
- package/adaptations/opengis-daf.md +7 -6
- package/adaptations/opengis-utils-for-java.md +6 -6
- package/adaptations/opengis-utils-for-net.md +6 -6
- package/adaptations/openlayers.md +6 -6
- package/adaptations/pdal.md +6 -6
- package/adaptations/postgis.md +6 -6
- package/adaptations/proj.md +6 -6
- package/adaptations/projnet4geoapi.md +6 -6
- package/adaptations/pyqgis.md +6 -6
- package/adaptations/qgis-process.md +6 -6
- package/adaptations/qgis-server.md +6 -6
- package/adaptations/shapely.md +6 -6
- package/adaptations/sharpmap.md +6 -6
- package/adaptations/spatialite.md +6 -6
- package/adaptations/stac-cog-titiler.md +8 -0
- package/adaptations/whitebox-tools.md +6 -6
- package/assets/brutile/SKILL.md +6 -12
- package/assets/cesiumjs/SKILL.md +14 -18
- package/assets/deck-gl/SKILL.md +9 -15
- package/assets/duckdb-spatial/SKILL.md +41 -25
- package/assets/gdal/SKILL.md +11 -18
- package/assets/gdal/reference/raster-tools.md +14 -0
- package/assets/gdal/reference/vector-tools.md +5 -0
- package/assets/gdal-api/SKILL.md +8 -16
- package/assets/gdal-api/reference/raster-api.md +7 -0
- package/assets/gdal-api/reference/vector-api.md +9 -0
- package/assets/geolibre/SKILL.md +11 -17
- package/assets/geometry-api-java/SKILL.md +5 -10
- package/assets/geometry-api-net/SKILL.md +5 -11
- package/assets/geometry-api-net/reference/geometry-types.md +5 -0
- package/assets/geonode/SKILL.md +8 -15
- package/assets/geopandas/SKILL.md +46 -17
- package/assets/geopandas/reference/core-api.md +55 -0
- package/assets/geopipe-agent/SKILL.md +7 -14
- package/assets/geopipe-agent/reference/steps-reference.md +12 -0
- package/assets/geopipe-agent/reference/workflows.md +8 -0
- package/assets/geos/SKILL.md +372 -0
- package/assets/geoserver/SKILL.md +6 -13
- package/assets/geoserver-cloud/SKILL.md +12 -21
- package/assets/geoserver-rest-api/SKILL.md +5 -12
- package/assets/geoserver-rest-api/reference/endpoints.md +16 -0
- package/assets/geotools/SKILL.md +5 -12
- package/assets/geotools/reference/raster-rendering.md +5 -0
- package/assets/geotools/reference/vector-io.md +7 -0
- package/assets/grass-gis/SKILL.md +36 -18
- package/assets/jts/SKILL.md +5 -12
- package/assets/jts/reference/geometry-operations.md +13 -0
- package/assets/kepler-gl/SKILL.md +10 -16
- package/assets/leaflet/SKILL.md +19 -23
- package/assets/mapbox-gl-js/SKILL.md +11 -16
- package/assets/maplibre-gl-js/SKILL.md +478 -0
- package/assets/maplibre-native/SKILL.md +383 -0
- package/assets/mapserver/SKILL.md +12 -16
- package/assets/mapsui/SKILL.md +29 -18
- package/assets/nettopologysuite/SKILL.md +5 -11
- package/assets/opendronemap/SKILL.md +309 -0
- package/assets/opengis-all/SKILL.md +14 -19
- package/assets/opengis-all/reference/data-stages.md +7 -0
- package/assets/opengis-all/reference/workflow-cheatsheets.md +7 -0
- package/assets/opengis-daf/SKILL.md +5 -13
- package/assets/opengis-utils-for-java/SKILL.md +7 -11
- package/assets/opengis-utils-for-java/reference/common-tasks.md +4 -0
- package/assets/opengis-utils-for-net/SKILL.md +5 -10
- package/assets/opengis-utils-for-net/reference/code-patterns.md +4 -0
- package/assets/opengis-utils-for-net/reference/util-classes.md +10 -0
- package/assets/openlayers/SKILL.md +16 -20
- package/assets/pdal/SKILL.md +15 -13
- package/assets/postgis/SKILL.md +21 -26
- package/assets/proj/SKILL.md +5 -12
- package/assets/projnet4geoapi/SKILL.md +6 -12
- package/assets/pyqgis/SKILL.md +5 -10
- package/assets/pyqgis/reference/processing-rendering.md +6 -0
- package/assets/pyqgis/reference/vector-raster-layers.md +6 -0
- package/assets/qgis-process/SKILL.md +5 -12
- package/assets/qgis-process/reference/algorithm-cheatsheet.md +6 -0
- package/assets/qgis-server/SKILL.md +7 -13
- package/assets/shapely/SKILL.md +29 -14
- package/assets/shapely/reference/operations-reference.md +42 -0
- package/assets/sharpmap/SKILL.md +5 -11
- package/assets/spatialite/SKILL.md +15 -16
- package/assets/stac-cog-titiler/SKILL.md +420 -0
- package/assets/whitebox-tools/SKILL.md +28 -19
- package/lib/adaptations.d.ts +18 -0
- package/lib/adaptations.js +164 -7
- package/lib/catalog.d.ts +7 -1
- package/lib/catalog.js +9 -1
- package/lib/index.d.ts +9 -0
- package/lib/index.js +48 -3
- package/lib/skill-file.d.ts +12 -0
- package/lib/skill-file.js +107 -16
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +8 -3
- package/upstream.json +74 -64
package/assets/cesiumjs/SKILL.md
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cesiumjs
|
|
3
|
-
description: "Use when building browser-based 3D globes, 3D Tiles, CZML/time-dynamic data, or glTF models with npm cesium 1.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
- 3d-tiles
|
|
9
|
-
- gltf
|
|
10
|
-
- earth
|
|
11
|
-
- map
|
|
12
|
-
- web
|
|
13
|
-
- visualization
|
|
3
|
+
description: "Use when building browser-based 3D globes, 3D Tiles, CZML/time-dynamic data, or glTF models with npm cesium 1.147.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
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
category: gis
|
|
7
|
+
tags: "javascript, webgl, 3d, 3d-tiles, gltf, earth, map, web, visualization"
|
|
14
8
|
---
|
|
15
9
|
|
|
16
10
|
> **项目地址:** <https://github.com/CesiumGS/cesium>
|
|
@@ -21,7 +15,7 @@ tags:
|
|
|
21
15
|
>
|
|
22
16
|
> **Sandcastle:** <https://sandcastle.cesium.com/>
|
|
23
17
|
>
|
|
24
|
-
> **最新版本:** 1.
|
|
18
|
+
> **最新版本:** 1.147.0(截至 2026-11,npm `cesium`;1.146 起新增 `@cesium/core` 包)
|
|
25
19
|
>
|
|
26
20
|
> **许可证:** Apache-2.0
|
|
27
21
|
|
|
@@ -44,7 +38,7 @@ CesiumJS 提供:
|
|
|
44
38
|
|
|
45
39
|
```bash
|
|
46
40
|
npm install cesium
|
|
47
|
-
npm ls cesium # 验证:应显示 cesium@1.
|
|
41
|
+
npm ls cesium # 验证:应显示 cesium@1.147.0
|
|
48
42
|
```
|
|
49
43
|
|
|
50
44
|
```js
|
|
@@ -57,13 +51,13 @@ export default defineConfig({ plugins: [cesium()] });
|
|
|
57
51
|
### 方式二:CDN
|
|
58
52
|
|
|
59
53
|
```html
|
|
60
|
-
<link href="https://cdn.jsdelivr.net/npm/cesium@1.
|
|
61
|
-
<script src="https://cdn.jsdelivr.net/npm/cesium@1.
|
|
54
|
+
<link href="https://cdn.jsdelivr.net/npm/cesium@1.147.0/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
|
|
55
|
+
<script src="https://cdn.jsdelivr.net/npm/cesium@1.147.0/Build/Cesium/Cesium.js"></script>
|
|
62
56
|
```
|
|
63
57
|
|
|
64
58
|
```bash
|
|
65
59
|
# 验证 CDN 版本可达
|
|
66
|
-
curl.exe -I https://cdn.jsdelivr.net/npm/cesium@1.
|
|
60
|
+
curl.exe -I https://cdn.jsdelivr.net/npm/cesium@1.147.0/Build/Cesium/Cesium.js # 期望 200
|
|
67
61
|
```
|
|
68
62
|
|
|
69
63
|
### 打包器接入
|
|
@@ -71,7 +65,9 @@ curl.exe -I https://cdn.jsdelivr.net/npm/cesium@1.146.0/Build/Cesium/Cesium.js
|
|
|
71
65
|
- **Vite**:用 `vite-plugin-cesium`,按上面的 `vite.config.js` 注册,插件负责拷贝静态资源
|
|
72
66
|
- **Webpack**:将 `node_modules/cesium/Build/Cesium/{Workers,Assets,Widgets}` 拷到输出目录,并在入口最早处设置 `window.CESIUM_BASE_URL`
|
|
73
67
|
|
|
74
|
-
> **1.146
|
|
68
|
+
> **1.146 起的包拆分(1.147 仍适用):** 数学/几何/时间/工具类已拆到 `@cesium/core`(1.147 的 `cesium` 依赖 `@cesium/core@^0.1.1`)。从 `cesium` 主包导入的代码不受影响;从 `@cesium/engine` 导入这些类的代码需改从 `@cesium/core` 导入。`@cesium/engine` 的旧导出已弃用,官方计划在 1.150 移除。
|
|
69
|
+
>
|
|
70
|
+
> **1.147 变更(2026-11-02):** 主要修复 `Cesium3DTileset` 在 `cacheBytes` 边界反复加载同一瓦片、椭球面附近模型动态环境光等问题;新增 glTF `KHR_materials_emissive_strength` 扩展支持与实验性 `IonAssetElementService`。无破坏性 API 变更。
|
|
75
71
|
|
|
76
72
|
---
|
|
77
73
|
|
|
@@ -317,7 +313,7 @@ handler.setInputAction((e) => {
|
|
|
317
313
|
## AI 使用建议
|
|
318
314
|
|
|
319
315
|
- **执行环境**:`npm install`、`npm run build` 在终端中执行;Windows 下 `npm` 实为 `npm.cmd`,脚本里写 `cmd /c npm run build` 更稳;装包和大构建放后台运行,输出重定向到文件再分段读。
|
|
320
|
-
- **先探测版本**:`npm ls cesium`(未安装时 `npm view cesium version`)。本技能按 1.
|
|
316
|
+
- **先探测版本**:`npm ls cesium`(未安装时 `npm view cesium version`)。本技能按 1.147.0 编写:1.146 起依赖 `@cesium/core@^0.1.x`,数学/几何/时间/工具类已拆到 `@cesium/core`,低于 1.146 的工程不要照搬这条迁移建议;旧 `@cesium/engine` 导出计划在 1.150 移除。
|
|
321
317
|
- **验证产物**:`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 说明资源没拷贝);AI 助手通常看不到浏览器画面,把 URL 和预期画面交给用户,环境支持读图时用截图核对。
|
|
322
318
|
- **Ion 与部署**:`Cesium.Ion.defaultAccessToken` 从环境变量注入(Vite 用 `import.meta.env.VITE_CESIUM_ION_TOKEN`),不要写进源码或提交;黑屏先查 `window.CESIUM_BASE_URL` 与 `Workers/Assets/Widgets` 是否随构建产物发布。
|
|
323
319
|
- **坐标与性能**:定位一律 `Cesium.Cartesian3.fromDegrees(lon, lat, height)`;大量静态要素用 Primitive,少量动态要素才用 Entity;`clampToGround` 只在需要贴地时开启。
|
package/assets/deck-gl/SKILL.md
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deck-gl
|
|
3
|
-
description: "Use when visualizing large geospatial datasets in the browser with deck.gl 9.4.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
- webgpu
|
|
9
|
-
- data-visualization
|
|
10
|
-
- geospatial
|
|
11
|
-
- map-layers
|
|
12
|
-
- aggregation
|
|
13
|
-
- maplibre
|
|
14
|
-
- mapbox
|
|
3
|
+
description: "Use when visualizing large geospatial datasets in the browser with deck.gl 9.4.1 — 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
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
category: gis
|
|
7
|
+
tags: "javascript, web, webgl, webgpu, data-visualization, geospatial, map-layers, aggregation, maplibre, mapbox"
|
|
15
8
|
---
|
|
16
9
|
|
|
17
10
|
> **项目地址:** <https://github.com/visgl/deck.gl>
|
|
18
11
|
>
|
|
19
12
|
> **官方文档:** <https://deck.gl/>
|
|
20
13
|
>
|
|
21
|
-
> **最新版本:** 9.4.
|
|
14
|
+
> **最新版本:** 9.4.1(截至 2026-11,npm `deck.gl` dist-tag `latest`)
|
|
22
15
|
>
|
|
23
16
|
> **许可证:** MIT
|
|
24
17
|
|
|
@@ -58,7 +51,7 @@ npm install @deck.gl/mapbox maplibre-gl # 与 MapLibre / Mapbox 底图集成
|
|
|
58
51
|
### CDN 快速试用
|
|
59
52
|
|
|
60
53
|
```html
|
|
61
|
-
<script src="https://unpkg.com/deck.gl@9.4.
|
|
54
|
+
<script src="https://unpkg.com/deck.gl@9.4.1/dist.min.js"></script>
|
|
62
55
|
```
|
|
63
56
|
|
|
64
57
|
### 验证
|
|
@@ -425,7 +418,7 @@ map.addControl(overlay);
|
|
|
425
418
|
## AI 使用建议
|
|
426
419
|
|
|
427
420
|
- **执行环境**:`npm install`、`npm run build` 在终端中执行;子包多、安装输出长,重定向到文件再分段读。
|
|
428
|
-
- **先探测版本**:`npm ls deck.gl @deck.gl/core @deck.gl/layers @deck.gl/geo-layers`;所有 `@deck.gl/*` 必须是同一版本 9.4.
|
|
421
|
+
- **先探测版本**:`npm ls deck.gl @deck.gl/core @deck.gl/layers @deck.gl/geo-layers`;所有 `@deck.gl/*` 必须是同一版本 9.4.1,混版会报 `Cannot read properties of undefined`。本技能按 9.4.1 编写。
|
|
429
422
|
- **验证产物**:`npm run build` 后 `npx serve dist`,`curl.exe -I http://localhost:5173/` 确认入口;WebGL 是否真出图只能由浏览器确认,AI 助手通常看不到浏览器画面,请用户看画面和控制台,环境支持读图时用截图核对。
|
|
430
423
|
- **无 GPU 环境**:无头/CI 环境无法验证 WebGL,构建通过不等于渲染正确,不要据此报告“已渲染”。
|
|
431
424
|
- **数据与坐标**:位置一律 `[经度, 纬度]`;保持 `data` 引用稳定,不要在渲染路径里 `filter`/`map` 生成新数组,否则 GPU 缓冲反复重建。
|
|
@@ -434,6 +427,7 @@ map.addControl(overlay);
|
|
|
434
427
|
|
|
435
428
|
## 相关技能
|
|
436
429
|
|
|
430
|
+
- **maplibre-gl-js** — 开源免 token 的矢量瓦片底图,`MapboxOverlay` 的默认搭档:[../maplibre-gl-js/SKILL.md](../maplibre-gl-js/SKILL.md)
|
|
437
431
|
- **mapbox-gl-js** — 矢量瓦片底图与 Style Spec,deck.gl 的常见底图搭档:[../mapbox-gl-js/SKILL.md](../mapbox-gl-js/SKILL.md)
|
|
438
432
|
- **openlayers** — 开源 2D WebGIS 库,投影、MVT 与高级交互:[../openlayers/SKILL.md](../openlayers/SKILL.md)
|
|
439
433
|
- **leaflet** — 轻量 2D 瓦片地图,适合中小数据量与简单场景:[../leaflet/SKILL.md](../leaflet/SKILL.md)
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: duckdb-spatial
|
|
3
|
-
description: "Use when doing spatial analysis inside a DuckDB database or SQL pipeline — INSTALL spatial / LOAD spatial, ST_Read over Shapefile/GeoPackage/GeoJSON, ST_Point/ST_GeomFromText, ST_Intersects/ST_Contains/ST_Buffer joins, ST_Area_Spheroid, ST_AsMVT tiles, DuckDB-WASM
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- spatial
|
|
9
|
-
- geospatial
|
|
10
|
-
- extension
|
|
11
|
-
- vector
|
|
12
|
-
- geoparquet
|
|
13
|
-
- analysis
|
|
14
|
-
- cli
|
|
3
|
+
description: "Use when doing spatial analysis inside a DuckDB database or SQL pipeline — INSTALL spatial / LOAD spatial, ST_Read over Shapefile/GeoPackage/GeoJSON, ST_Point/ST_GeomFromText, ST_Intersects/ST_Contains/ST_Buffer joins, ST_Area_Spheroid, ST_AsMVT tiles, DuckDB-WASM; also for 'Extension spatial is not installed' or spatial function does not exist, GEOMETRY vs WKB_BLOB friction, CRS type modifiers, and exporting query results to GeoParquet. GEOMETRY became a built-in type in DuckDB 1.5."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
category: gis
|
|
7
|
+
tags: "duckdb, sql, python, spatial, geospatial, extension, vector, geoparquet, analysis, cli"
|
|
15
8
|
---
|
|
16
9
|
|
|
17
10
|
> **项目地址:** <https://github.com/duckdb/duckdb-spatial>
|
|
@@ -20,15 +13,17 @@ tags:
|
|
|
20
13
|
>
|
|
21
14
|
> **函数参考:** <https://duckdb.org/docs/stable/core_extensions/spatial/functions>
|
|
22
15
|
>
|
|
23
|
-
> **
|
|
16
|
+
> **GEOMETRY 类型:** <https://duckdb.org/docs/stable/sql/data_types/geometry>
|
|
24
17
|
>
|
|
25
|
-
>
|
|
18
|
+
> **最新版本:** DuckDB 2.0.0(截至 2026-11,[PyPI](https://pypi.org/project/duckdb/) / [GitHub Releases](https://github.com/duckdb/duckdb/releases))
|
|
19
|
+
>
|
|
20
|
+
> **扩展分发:** 随 DuckDB 版本自动匹配,INSTALL spatial 从 extensions.duckdb.org 拉取(无独立版本号);GEOMETRY 类型自 DuckDB 1.5 起内置,空间函数仍由 spatial 扩展提供
|
|
26
21
|
>
|
|
27
22
|
> **许可证:** MIT
|
|
28
23
|
|
|
29
24
|
## 概述
|
|
30
25
|
|
|
31
|
-
DuckDB Spatial 是 DuckDB
|
|
26
|
+
DuckDB Spatial 是 DuckDB 官方的核心扩展(core extension),把列式分析数据库变成可读写地理数据的空间分析工具。它按 OGC Simple Features 模型提供空间函数,底层用 GEOS 做拓扑运算、用 PROJ 做坐标转换、用 GDAL 读文件;GEOMETRY 数据类型自 DuckDB 1.5 起已是内置类型,但**绝大多数空间函数(ST_Area、ST_Buffer、ST_Intersects 等)仍然装在 spatial 扩展里**,装扩展这一步不能省。
|
|
32
27
|
|
|
33
28
|
- **零服务依赖**:进程内运行,扩展按需安装,无需 PostGIS 或服务器
|
|
34
29
|
- **轻量几何类型**:POINT_2D / LINESTRING_2D / POLYGON_2D / BOX_2D 有原生函数重载,比通用 GEOMETRY 路径快
|
|
@@ -36,8 +31,9 @@ DuckDB Spatial 是 DuckDB 官方的核心扩展,把列式分析数据库变成
|
|
|
36
31
|
- **SQL 即分析**:空间谓词、聚合(ST_Union_Agg、ST_Extent_Agg)、瓦片编码(ST_AsMVT)
|
|
37
32
|
- **与 Parquet/CSV/JSON 同库联查**:空间表可直接 JOIN 普通表,无须导入导出
|
|
38
33
|
- **WASM 可用**:同一扩展编译为 WebAssembly,GeoLibre 与 DuckDB-WASM 前端都靠它
|
|
34
|
+
- **内建与扩展分层**:内置的只有 ST_GeomFromWKB、ST_AsWKB、ST_AsWKT(别名 ST_AsText)、ST_Intersects_Extent(别名 `&&`)、ST_CRS、ST_SetCRS 这少数几个;其余 ST_* 函数要 LOAD spatial 才有
|
|
39
35
|
|
|
40
|
-
|
|
36
|
+
官方发布的扩展二进制(`INSTALL spatial` 拉的那种)已经把 GEOS、PROJ、GDAL 等依赖静态链接进扩展,机器上不需要另外安装 GDAL;只有从源码自建时才需要系统里备好这些库(`vcpkg.json` 里声明了 geos、proj、gdal>=3.12.4 等)。
|
|
41
37
|
|
|
42
38
|
## 环境准备
|
|
43
39
|
|
|
@@ -58,18 +54,22 @@ conda install -c conda-forge duckdb
|
|
|
58
54
|
### 安装 spatial 扩展
|
|
59
55
|
|
|
60
56
|
```sql
|
|
57
|
+
-- DuckDB 2.0 起可用一条语句完成安装 + 加载
|
|
58
|
+
INSTALL AND LOAD spatial;
|
|
59
|
+
|
|
60
|
+
-- 等价的分两步写法(旧版本也支持)
|
|
61
61
|
INSTALL spatial;
|
|
62
62
|
LOAD spatial;
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
INSTALL 会把扩展写入用户目录(~/.duckdb/extensions/<version>/<platform>/),只需一次;之后每次会话 LOAD spatial 即可。spatial 不属于 autoloadable 扩展,忘记 LOAD
|
|
65
|
+
INSTALL 会把扩展写入用户目录(~/.duckdb/extensions/<version>/<platform>/),只需一次;之后每次会话 LOAD spatial 即可。spatial 不属于 autoloadable 扩展,忘记 LOAD 时空函数都会报"不存在"(内置的 ST_CRS / ST_SetCRS / ST_AsWKT 等除外)。
|
|
66
66
|
|
|
67
67
|
### 验证
|
|
68
68
|
|
|
69
69
|
```python
|
|
70
70
|
import duckdb
|
|
71
71
|
con = duckdb.connect()
|
|
72
|
-
con.execute("INSTALL
|
|
72
|
+
con.execute("INSTALL AND LOAD spatial;") # 2.0 一条语句;旧版可拆成 INSTALL + LOAD
|
|
73
73
|
print(con.execute("SELECT duckdb_version()").fetchone())
|
|
74
74
|
print(con.execute("SELECT ST_AsText(ST_Point(116.39, 39.90))").fetchone())
|
|
75
75
|
print(con.execute("SELECT extension_version FROM duckdb_extensions() WHERE extension_name='spatial'").fetchone())
|
|
@@ -90,7 +90,8 @@ print(con.execute("SELECT duckdb_proj_version()").fetchone())
|
|
|
90
90
|
| ST_GeomFromWKB(blob) / ST_AsWKB(geom) | WKB 互转 | GEOMETRY / WKB_BLOB |
|
|
91
91
|
| ST_MakeEnvelope(minx, miny, maxx, maxy) | 矩形面 | GEOMETRY |
|
|
92
92
|
| ST_MakeLine(list_of_points) / ST_MakePolygon(ring) | 线/面构造 | GEOMETRY |
|
|
93
|
-
| ST_AsText(geom) | 输出 WKT | VARCHAR |
|
|
93
|
+
| ST_AsText(geom) / ST_AsWKT(geom) | 输出 WKT(ST_AsText 是 ST_AsWKT 的别名,两者内置) | VARCHAR |
|
|
94
|
+
| ST_CRS(geom) / ST_SetCRS(geom, crs) | 读取 / 设置几何的 CRS 标识(内置,DuckDB 1.5+) | VARCHAR / GEOMETRY |
|
|
94
95
|
|
|
95
96
|
```sql
|
|
96
97
|
SELECT ST_AsText(ST_Point(116.39, 39.90)) AS pt,
|
|
@@ -98,7 +99,14 @@ SELECT ST_AsText(ST_Point(116.39, 39.90)) AS pt,
|
|
|
98
99
|
ST_AsWKB('POINT(1 2)'::GEOMETRY)::BLOB AS wkb;
|
|
99
100
|
```
|
|
100
101
|
|
|
101
|
-
字符串可以直接带类型转换写成 'POINT(...)'::GEOMETRY,这是最短路径。
|
|
102
|
+
字符串可以直接带类型转换写成 'POINT(...)'::GEOMETRY,这是最短路径。CRS 在 DuckDB 里是**类型的一部分**而不是行内隐藏属性:`GEOMETRY('OGC:CRS84')`、`GEOMETRY('EPSG:4326')` 声明列的 CRS,用 ST_CRS / ST_SetCRS 读写,没有 PostGIS 那种 ST_SRID / ST_SetSRID 函数名。
|
|
103
|
+
|
|
104
|
+
```sql
|
|
105
|
+
SELECT ST_CRS('POINT(1 2)'::GEOMETRY('OGC:CRS84')); -- OGC:CRS84
|
|
106
|
+
SELECT typeof(ST_SetCRS('POINT(1 2)'::GEOMETRY, 'OGC:CRS84')); -- GEOMETRY('OGC:CRS84')
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
CRS 标识必须已在系统目录注册:内置只注册少数常见 CRS(如 OGC:CRS84、OGC:CRS83),加载 spatial 后才会注册 EPSG 全量 7000+ 套,可用 `SELECT * FROM duckdb_coordinate_systems();` 查看。带 CRS 的 GEOMETRY 列要求存储版本 v1.5.0 及以上(DuckDB 2.0 的默认存储版本已满足)。
|
|
102
110
|
|
|
103
111
|
### 空间关系谓词
|
|
104
112
|
|
|
@@ -233,7 +241,7 @@ SELECT * FROM 'data/roads.shp' LIMIT 5;
|
|
|
233
241
|
import duckdb
|
|
234
242
|
|
|
235
243
|
con = duckdb.connect("analysis.duckdb")
|
|
236
|
-
con.execute("INSTALL
|
|
244
|
+
con.execute("INSTALL AND LOAD spatial;") # 2.0 一条语句;旧版可拆成 INSTALL + LOAD
|
|
237
245
|
|
|
238
246
|
# 1) 读入并落到持久表(避免每次查询重复解析 Shapefile)
|
|
239
247
|
con.execute("CREATE OR REPLACE TABLE roads AS SELECT * FROM ST_Read('data/roads.shp');")
|
|
@@ -289,7 +297,7 @@ print(con.execute("SELECT * FROM road_length_by_district LIMIT 10").fetchall())
|
|
|
289
297
|
import duckdb, geopandas as gpd
|
|
290
298
|
|
|
291
299
|
con = duckdb.connect()
|
|
292
|
-
con.execute("INSTALL
|
|
300
|
+
con.execute("INSTALL AND LOAD spatial;") # 2.0 一条语句;旧版可拆成 INSTALL + LOAD
|
|
293
301
|
|
|
294
302
|
# 查询结果直接转 DataFrame
|
|
295
303
|
rows = con.execute("SELECT name, ST_AsText(geom) FROM ST_Read('data/cities.shp')").fetchdf()
|
|
@@ -327,7 +335,7 @@ SELECT ST_AsMVT(tile, 'cities', 4096, 'geom') FROM tile;
|
|
|
327
335
|
## 性能优化
|
|
328
336
|
|
|
329
337
|
1. **落表再查**:对同一文件重复 ST_Read 会反复走 GDAL 解析,先 CREATE TABLE AS 物化。GDAL 是单线程的,ST_Read 无法并行。
|
|
330
|
-
2.
|
|
338
|
+
2. **先做包围盒粗筛,再看要不要空间索引**:join 前用 ST_Intersects_Extent(或等价的 `&&` 运算符)缩小候选集,再用 ST_Intersects 精确判断 —— 这一步在任何版本都有效,而且 `&&` 在 2.0 里还能吃到 GEOMETRY 列的 row-group 统计信息。DuckDB 2.0 的索引文档写明「spatial 扩展可为空间列提供 R-tree」,`CREATE INDEX` 也支持可选的 index type;但具体能否建、建了是否被选中,取决于扩展版本与查询形态,落地前先 `EXPLAIN ANALYZE` 实测对比,别假设它一定生效。
|
|
331
339
|
3. **优先用轻量类型**:能落成 POINT_2D / POLYGON_2D 的列走原生实现,必要时用 ST_Force2D 去掉 Z/M。
|
|
332
340
|
4. **面积/长度单位要有依据**:经纬度下 ST_Area 的单位是平方度,应改用 ST_Area_Spheroid 或先投影。
|
|
333
341
|
5. **投影一次即可**:ST_Transform 是 CPU 热点,放在建表阶段,不要写在 WHERE 里逐行算。
|
|
@@ -344,14 +352,19 @@ SELECT ST_AsMVT(tile, 'cities', 4096, 'geom') FROM tile;
|
|
|
344
352
|
| ST_Transform 报 CRS 解析失败 | 源/目标 CRS 字符串拼错或 PROJ 未识别 | 用 'EPSG:4326' 这类标准写法;SELECT duckdb_proj_version() 确认 PROJ 可用 |
|
|
345
353
|
| 读 GeoPackage 只拿到第一个图层 | 多图层文件未指定 layer | 用 ST_Read_Meta 先看 layers,再 ST_Read(..., layer := '...') |
|
|
346
354
|
| Shapefile 中文属性乱码 | DBF 编码与默认 UTF-8 不一致 | 用 ST_ReadSHP(path, encoding := 'GBK'),或在 open_options 里给驱动指定编码 |
|
|
347
|
-
| 空间 join 极慢 |
|
|
355
|
+
| 空间 join 极慢 | 没做包围盒粗筛,也没利用任何索引 | 先 ST_Intersects_Extent(`&&`)粗筛再 ST_Intersects 精筛;仍慢再试 `CREATE INDEX` 并 `EXPLAIN ANALYZE` 核对是否真的用上 |
|
|
348
356
|
| 写出的 Parquet 没有 CRS | ST_AsWKB 只写几何,不写 CRS 元数据 | 落盘后用 GeoPandas/GDAL 补写 crs,或用 ogr2ogr 转出 |
|
|
349
357
|
| ST_ReadOSM 只返回 node/way 原始表 | 该函数不做几何装配 | 需要成品几何时改用 ST_Read 的 OSM 驱动 |
|
|
358
|
+
| Unknown coordinate system / unrecognized coordinate system | CRS 标识未注册:EPSG 全集由 spatial 扩展注册,只装了 DuckDB 没 LOAD spatial 时只剩少数内置 CRS | 先 LOAD spatial 再写 `GEOMETRY('EPSG:4326')`;仍失败则 `SELECT * FROM duckdb_coordinate_systems()` 核对标识,必要时 `SET ignore_unknown_crs = true` 显式丢弃未知 CRS |
|
|
359
|
+
| GEOMETRY columns with coordinate reference system identifiers are not supported in storage versions prior v1.5.0 | 带 CRS 的 GEOMETRY 列要求存储版本 v1.5.0+,旧库文件读不了 | 用 `ATTACH 'file.db' (STORAGE_VERSION 'v1.5.0')` 重建库,或先用 EXPORT DATABASE / IMPORT DATABASE 迁移存储格式 |
|
|
360
|
+
| pip install duckdb 装到 1.x、没有 2.0 的新行为 | DuckDB 2.0 要求 Python 3.11+,3.10 上 pip 只会解析到 1.x | 升级 Python 到 3.11+ 后重装;`python -c "import duckdb; print(duckdb.__version__)"` 确认 |
|
|
350
361
|
|
|
351
362
|
## AI 使用建议
|
|
352
363
|
|
|
353
364
|
- **先验扩展再写 SQL**:执行前跑 SELECT extension_name, loaded FROM duckdb_extensions() WHERE extension_name='spatial'; 确认 loaded=true;未加载就先 LOAD,不要把"函数不存在"当语法错误去改。
|
|
354
|
-
- **版本敏感**:2.0.0 与旧版函数集合有差异(ST_Area_Spheroid、ST_CoverageUnion_Agg
|
|
365
|
+
- **版本敏感**:2.0.0 与旧版函数集合有差异(ST_Area_Spheroid、ST_CoverageUnion_Agg 属较新函数;GEOMETRY 类型自 1.5 起内置,ST_CRS / ST_SetCRS 也随之内置)。写示例前用 SELECT function_name FROM duckdb_functions() WHERE function_name LIKE 'ST_%'; 探测实际可用函数。
|
|
366
|
+
- **2.0 迁移要先看存储格式**:DuckDB 2.0 默认写 storage version 69,旧版本(如 1.5.x)读不了;跨版本共享库文件前先用 `duckdb my.db -storage-version v1.5.6` 或 `config={"storage_compatibility_version": "v1.5.0"}` 指定存储版本,迁移方法见官方 Migrating to DuckDB 2.0。
|
|
367
|
+
- **CRS 是类型的一部分**:`GEOMETRY('EPSG:4326')` 与无 CRS 的 GEOMETRY 是不同的类型,多数二元空间函数要求两侧 CRS 一致;跨 CRS 先 ST_Transform,不要只靠 SET 全局开关去改轴序。
|
|
355
368
|
- **大文件不要整读进内存**:优先用 ST_Read 的 spatial_filter_box / layer 参数与 Parquet 列裁剪;反复查询时先落表。
|
|
356
369
|
- **验证产物**:写完 Parquet/MVT 后回读核对 count、ST_IsValid、ST_GeometryType 分布,以及坐标范围是否落在预期 CRS 内。
|
|
357
370
|
- **写操作确认**:COPY ... TO、CREATE OR REPLACE TABLE、DROP TABLE 会覆盖文件或表;执行前确认目标路径已被授权覆盖。
|
|
@@ -367,4 +380,7 @@ SELECT ST_AsMVT(tile, 'cities', 4096, 'geom') FROM tile;
|
|
|
367
380
|
## 参考资源
|
|
368
381
|
- 扩展仓库:<https://github.com/duckdb/duckdb-spatial>
|
|
369
382
|
- 函数总表:<https://duckdb.org/docs/stable/core_extensions/spatial/functions>
|
|
383
|
+
- GEOMETRY 数据类型:<https://duckdb.org/docs/stable/sql/data_types/geometry>
|
|
384
|
+
- 内置几何函数:<https://duckdb.org/docs/stable/sql/functions/geometry>
|
|
385
|
+
- DuckDB 2.0 迁移指南:<https://duckdb.org/docs/stable/operations_manual/migration>
|
|
370
386
|
- DuckDB 文档:<https://duckdb.org/docs/stable/>
|
package/assets/gdal/SKILL.md
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gdal
|
|
3
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.11+ unified gdal raster / gdal vector CLI."
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- cli
|
|
9
|
-
- raster
|
|
10
|
-
- vector
|
|
11
|
-
- conversion
|
|
12
|
-
- reprojection
|
|
13
|
-
- gis
|
|
14
|
-
- geospatial
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
category: gis
|
|
7
|
+
tags: "gdal, ogr, cli, raster, vector, conversion, reprojection, gis, geospatial"
|
|
15
8
|
---
|
|
16
9
|
|
|
17
10
|
> **项目地址:** <https://github.com/OSGeo/gdal>
|
|
@@ -20,7 +13,7 @@ tags:
|
|
|
20
13
|
>
|
|
21
14
|
> **源码命令文档:** <https://gdal.org/en/latest/programs/>
|
|
22
15
|
>
|
|
23
|
-
> **最新版本:** 3.13.3(截至 2026-
|
|
16
|
+
> **最新版本:** 3.13.3(截至 2026-11,[下载页](https://gdal.org/download.html))
|
|
24
17
|
>
|
|
25
18
|
> **许可证:** MIT
|
|
26
19
|
|
|
@@ -110,12 +103,12 @@ gdal <command> <subcommand> [options] <inputs>
|
|
|
110
103
|
|
|
111
104
|
```bash
|
|
112
105
|
# 矢量重投影 + 格式转换(等价 ogr2ogr -t_srs ... -f GPKG)
|
|
113
|
-
gdal vector reproject --output-crs EPSG:3857
|
|
106
|
+
gdal vector reproject --output-crs EPSG:3857 in.shp out.gpkg --overwrite
|
|
114
107
|
|
|
115
108
|
# 栅格镶嵌(等价 gdal_merge.py / gdalwarp 多输入)
|
|
116
|
-
gdal raster mosaic
|
|
109
|
+
gdal raster mosaic tile1.tif tile2.tif tile3.tif mosaic.tif --overwrite
|
|
117
110
|
|
|
118
|
-
# 数据集体检(3.13
|
|
111
|
+
# 数据集体检(3.13+,有错时退出码为 1)
|
|
119
112
|
gdal dataset check data.gpkg
|
|
120
113
|
```
|
|
121
114
|
|
|
@@ -169,8 +162,8 @@ ogr2ogr -t_srs EPSG:3857 output.shp input.shp
|
|
|
169
162
|
# 属性过滤
|
|
170
163
|
ogr2ogr output.shp input.shp -where "area > 1000"
|
|
171
164
|
|
|
172
|
-
#
|
|
173
|
-
ogr2ogr output.shp input.shp -select "id,name
|
|
165
|
+
# 选择特定字段(几何默认保留;列表里写 geometry 只在几何被登记为字段名时有效)
|
|
166
|
+
ogr2ogr output.shp input.shp -select "id,name"
|
|
174
167
|
```
|
|
175
168
|
|
|
176
169
|
---
|
|
@@ -217,7 +210,7 @@ COG 是带内部金字塔和分块的 GeoTIFF,便于 HTTP Range 按需读取
|
|
|
217
210
|
gdal_translate -of COG -co COMPRESS=DEFLATE -co OVERVIEWS=AUTO input.tif output_cog.tif
|
|
218
211
|
|
|
219
212
|
# 3.11+ 新式 CLI 等价写法
|
|
220
|
-
gdal raster convert --of COG -
|
|
213
|
+
gdal raster convert --of COG -co COMPRESS=DEFLATE input.tif output_cog.tif --overwrite
|
|
221
214
|
|
|
222
215
|
# 校验:分块、金字塔、是否被识别为 COG
|
|
223
216
|
gdalinfo -json output_cog.tif | grep -E 'COMPRESSION|LAYOUT|BLOCK'
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# GDAL Raster Tools Reference
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- gdalinfo — Raster Info Query
|
|
6
|
+
- gdal_translate — Format Conversion and Resampling
|
|
7
|
+
- gdalwarp — Reprojection and Mosaicking
|
|
8
|
+
- gdal_merge.py — Raster Mosaic
|
|
9
|
+
- gdal_calc.py — Raster Calculator
|
|
10
|
+
- gdal_contour — Contour Line Extraction
|
|
11
|
+
- gdal_grid — Grid Creation from Scattered Points
|
|
12
|
+
- gdal_polygonize.py — Raster to Vector Polygon
|
|
13
|
+
- gdaltindex — Raster Tile Index
|
|
14
|
+
- gdal_edit.py — Edit Raster Metadata
|
|
15
|
+
- nearblack — Clean Black/White Borders
|
|
16
|
+
|
|
3
17
|
> 这是 [../SKILL.md](../SKILL.md) 的补充文件,收录 GDAL 栅格工具的完整参数表与示例。
|
|
4
18
|
|
|
5
19
|
---
|
package/assets/gdal-api/SKILL.md
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gdal-api
|
|
3
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- python
|
|
9
|
-
- cpp
|
|
10
|
-
- dotnet
|
|
11
|
-
- java
|
|
12
|
-
- raster
|
|
13
|
-
- vector
|
|
14
|
-
- gis
|
|
15
|
-
- geospatial
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
category: gis
|
|
7
|
+
tags: "gdal, api, python, cpp, dotnet, java, raster, vector, gis, geospatial"
|
|
16
8
|
---
|
|
17
9
|
|
|
18
10
|
> **项目地址:** <https://github.com/OSGeo/gdal>
|
|
@@ -27,7 +19,7 @@ tags:
|
|
|
27
19
|
>
|
|
28
20
|
> **C# API 参考:** <https://gdal.org/en/stable/api/csharp/index.html>
|
|
29
21
|
>
|
|
30
|
-
> **最新版本:** 3.13.3(截至 2026-
|
|
22
|
+
> **最新版本:** 3.13.3(截至 2026-11,[下载页](https://gdal.org/download.html));Java 绑定(Maven Central)3.13.0
|
|
31
23
|
>
|
|
32
24
|
> **许可证:** MIT
|
|
33
25
|
|
|
@@ -35,8 +27,8 @@ tags:
|
|
|
35
27
|
|
|
36
28
|
GDAL 是地理空间数据处理的事实标准库,由 OSGeo 基金会维护。它提供:
|
|
37
29
|
|
|
38
|
-
-
|
|
39
|
-
-
|
|
30
|
+
- **上百个栅格驱动**:GeoTIFF、NetCDF、HDF5、COG、JPEG2000 等(完整清单见 [Raster drivers](https://gdal.org/en/stable/drivers/raster/index.html))
|
|
31
|
+
- **近百个矢量驱动**:Shapefile、GeoJSON、GeoPackage、PostGIS、FlatGeobuf 等(完整清单见 [Vector drivers](https://gdal.org/en/stable/drivers/vector/index.html))
|
|
40
32
|
- **坐标参考系统**:基于 PROJ 的坐标变换与投影转换
|
|
41
33
|
- **栅格分析**:重采样、镶嵌、裁剪、波段运算、DEM 分析等
|
|
42
34
|
- **矢量操作**:空间过滤、属性查询、要素创建与编辑等
|
|
@@ -102,7 +94,7 @@ dotnet add package MaxRev.Gdal.LinuxRuntime.Minimal # Linux
|
|
|
102
94
|
dotnet add package MaxRev.Gdal.WindowsRuntime.Minimal # Windows
|
|
103
95
|
```
|
|
104
96
|
|
|
105
|
-
**注意:** 官方 SWIG 绑定命名空间为 `OSGeo.GDAL`、`OSGeo.OGR`、`OSGeo.OSR`。NuGet 包 `MaxRev.Gdal.Core` 是社区维护的跨平台封装,2026-
|
|
97
|
+
**注意:** 官方 SWIG 绑定命名空间为 `OSGeo.GDAL`、`OSGeo.OGR`、`OSGeo.OSR`。NuGet 包 `MaxRev.Gdal.Core` 是社区维护的跨平台封装,2026-11 的最新版为 `3.13.3.611`(对应 GDAL 3.13.3),运行时包需与 `MaxRev.Gdal.Core` 主版本一致。
|
|
106
98
|
|
|
107
99
|
---
|
|
108
100
|
|
package/assets/geolibre/SKILL.md
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: geolibre
|
|
3
|
-
description: "Use when scripting or self-hosting the GeoLibre GIS app — geolibre Python anywidget (Map/add_geojson/add_cog/save_project), geolibre-mcp stdio server for AI agents, ghcr.io/opengeos/geolibre Docker image, DuckDB-WASM SQL workspace, ?data= and ?url= deep links; also for a blank window on Linux WebKitGTK, sidecar path not allowed from GEOLIBRE_CONVERSION_ROOTS, and Jupyter relay not connected. GeoLibre 3.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- jupyter
|
|
9
|
-
- mcp
|
|
10
|
-
- duckdb
|
|
11
|
-
- docker
|
|
12
|
-
- webgis
|
|
13
|
-
- tauri
|
|
14
|
-
- geospatial
|
|
3
|
+
description: "Use when scripting or self-hosting the GeoLibre GIS app — geolibre Python anywidget (Map/add_geojson/add_cog/save_project), geolibre-mcp stdio server for AI agents, ghcr.io/opengeos/geolibre Docker image, DuckDB-WASM SQL workspace, ?data= and ?url= deep links; also for a blank window on Linux WebKitGTK, sidecar path not allowed from GEOLIBRE_CONVERSION_ROOTS, and Jupyter relay not connected. GeoLibre 3.7.0."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
category: gis
|
|
7
|
+
tags: "geolibre, gis, python, jupyter, mcp, duckdb, docker, webgis, tauri, geospatial"
|
|
15
8
|
---
|
|
16
9
|
|
|
17
10
|
> **项目地址:** <https://github.com/opengeos/GeoLibre>
|
|
@@ -20,7 +13,7 @@ tags:
|
|
|
20
13
|
>
|
|
21
14
|
> **在线版:** <https://web.geolibre.app>
|
|
22
15
|
>
|
|
23
|
-
>
|
|
16
|
+
> **最新版本:** 3.7.0(截至 2026-11,[PyPI](https://pypi.org/project/geolibre/) / [GitHub Releases](https://github.com/opengeos/GeoLibre/releases));要求 Python >= 3.11,conda-forge 同步为 3.7.0
|
|
24
17
|
>
|
|
25
18
|
> **许可证:** MIT
|
|
26
19
|
|
|
@@ -55,12 +48,12 @@ GeoLibre 是一个云原生 GIS 应用,同一份代码可运行在浏览器、
|
|
|
55
48
|
| Flatpak | `flatpak install flatpark app.geolibre.GeoLibre` |
|
|
56
49
|
| Debian / Ubuntu | `sudo apt install ./GeoLibre.Desktop_<version>_amd64.deb` |
|
|
57
50
|
|
|
58
|
-
验证:启动后 **Help → About** 核对版本为 3.
|
|
51
|
+
验证:启动后 **Help → About** 核对版本为 3.7.x,**Help → Diagnostics** 应无红色错误项。
|
|
59
52
|
|
|
60
53
|
### 路径三:Python 包(Notebook / 脚本)
|
|
61
54
|
|
|
62
55
|
```bash
|
|
63
|
-
pip install geolibre==3.
|
|
56
|
+
pip install geolibre==3.7.0
|
|
64
57
|
|
|
65
58
|
# 或 conda-forge
|
|
66
59
|
conda install -c conda-forge geolibre
|
|
@@ -342,8 +335,8 @@ python -c "import json;d=json.load(open('beijing.geolibre.json'));print(len(d.ge
|
|
|
342
335
|
|
|
343
336
|
## AI 使用建议
|
|
344
337
|
|
|
345
|
-
- **先确认版本与入口**:pip show geolibre 看版本,geolibre-mcp --help 看参数;桌面版看 Help → About。教程可能对应 3.4,遇到差异以 3.
|
|
346
|
-
- **装包前确认 Python 版本**:PyPI 的 geolibre 3.
|
|
338
|
+
- **先确认版本与入口**:pip show geolibre 看版本,geolibre-mcp --help 看参数;桌面版看 Help → About。教程可能对应 3.4/3.5,遇到差异以 3.7.0 的实际行为为准。
|
|
339
|
+
- **装包前确认 Python 版本**:PyPI 的 geolibre 3.7.0 要求 Python >= 3.11;低版本解释器会直接安装失败,不要误判为网络问题。
|
|
347
340
|
- **MCP 路径要显式**:Windows 上 JSON 里写正向斜杠(C:/Users/you/maps),反斜杠需成对转义,容易出错。
|
|
348
341
|
- **验证产物**:写完工程先 json.load 检查图层数与 mapView,再用浏览器打开导出的 HTML 看渲染;不要只看工具返回的成功。
|
|
349
342
|
- **写操作确认**:export_html、save_project 与 MCP 的覆盖写会改写磁盘文件;覆盖前确认目标,或先写新文件名。
|
|
@@ -351,6 +344,7 @@ python -c "import json;d=json.load(open('beijing.geolibre.json'));print(len(d.ge
|
|
|
351
344
|
## 相关技能
|
|
352
345
|
|
|
353
346
|
- **duckdb-spatial** — SQL 工作区背后的空间分析引擎:[../duckdb-spatial/SKILL.md](../duckdb-spatial/SKILL.md)
|
|
347
|
+
- **maplibre-gl-js** — GeoLibre 默认的矢量瓦片渲染引擎:[../maplibre-gl-js/SKILL.md](../maplibre-gl-js/SKILL.md)
|
|
354
348
|
- **openlayers** — 自建 Web 地图前端时的核心库:[../openlayers/SKILL.md](../openlayers/SKILL.md)
|
|
355
349
|
- **cesiumjs** — GeoLibre 的 3D 球渲染引擎之一:[../cesiumjs/SKILL.md](../cesiumjs/SKILL.md)
|
|
356
350
|
- **qgis-process** — 桌面 GIS 的另一种无头批处理路径:[../qgis-process/SKILL.md](../qgis-process/SKILL.md)
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: geometry-api-java
|
|
3
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- spatial
|
|
9
|
-
- wkt
|
|
10
|
-
- wkb
|
|
11
|
-
- geojson
|
|
12
|
-
- geodesic
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
category: gis
|
|
7
|
+
tags: "java, geometry, esri, spatial, wkt, wkb, geojson, geodesic"
|
|
13
8
|
---
|
|
14
9
|
|
|
15
10
|
> **项目地址:** <https://github.com/Esri/geometry-api-java>
|
|
@@ -18,7 +13,7 @@ tags:
|
|
|
18
13
|
>
|
|
19
14
|
> **Maven Central:** `com.esri.geometry:esri-geometry-api`
|
|
20
15
|
>
|
|
21
|
-
> **最新版本:** 2.2.4(Maven Central,截至 2026-
|
|
16
|
+
> **最新版本:** 2.2.4(Maven Central,截至 2026-11);上游源码 2.3.1(2026-10-09),未发布到 Central
|
|
22
17
|
>
|
|
23
18
|
> **许可证:** Apache-2.0
|
|
24
19
|
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: geometry-api-net
|
|
3
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- spatial
|
|
9
|
-
- wkt
|
|
10
|
-
- wkb
|
|
11
|
-
- geojson
|
|
12
|
-
- geodesic
|
|
13
|
-
- csharp
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
category: gis
|
|
7
|
+
tags: "dotnet, geometry, esri, spatial, wkt, wkb, geojson, geodesic, csharp"
|
|
14
8
|
---
|
|
15
9
|
|
|
16
10
|
> **项目地址:** <https://github.com/znlgis/geometry-api-net>
|
|
17
11
|
>
|
|
18
12
|
> **官方文档:** <https://github.com/znlgis/geometry-api-net/wiki>
|
|
19
13
|
>
|
|
20
|
-
>
|
|
14
|
+
> **最新版本:** 1.0.9(2026-09-21 发布,[NuGet](https://www.nuget.org/packages/OpenGIS.Esri.Geometry.Core);截至 2026-11)
|
|
21
15
|
>
|
|
22
16
|
> **许可证:** LGPL-2.1
|
|
23
17
|
>
|