@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
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: geos
|
|
3
|
+
description: "Use when working with the GEOS C/C++ geometry engine that powers PostGIS, QGIS, Shapely and GDAL — GEOSGeomFromWKT/GEOSIntersection/GEOSBuffer/GEOSMakeValid C API, geos::geom C++ API, OverlayNG robustness, GEOSPrepare and GEOSSTRtree, or debugging TopologyException and self-intersection."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
category: gis
|
|
7
|
+
tags: "c, cpp, geometry, topology, overlay, postgis, shapely, gis"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
> **项目地址:** <https://github.com/libgeos/geos>
|
|
11
|
+
>
|
|
12
|
+
> **官方文档:** <https://libgeos.org/>
|
|
13
|
+
>
|
|
14
|
+
> **最新版本:** 3.15.0(2026-09-01 发布,截至 2026-11,[Release 3.15.0](https://github.com/libgeos/geos/releases/tag/3.15.0) / [下载与构建页](https://libgeos.org/usage/download/))
|
|
15
|
+
>
|
|
16
|
+
> **C API 文档:** <https://libgeos.org/usage/c_api/> | **C++ API 文档:** <https://libgeos.org/usage/cpp_api/>
|
|
17
|
+
>
|
|
18
|
+
> **许可证:** LGPL-2.1(C 库链接后按 LGPL 动态链接条款使用)
|
|
19
|
+
|
|
20
|
+
## 概述
|
|
21
|
+
|
|
22
|
+
GEOS(Geometry Engine, Open Source)是用 C++ 实现的二维矢量几何运算库,主体移植自 Java 的 JTS Topology Suite。它是开源空间数据栈的「几何内核」:PostGIS 的 ST_Intersection/ST_Buffer、QGIS 的叠加分析、Python Shapely、GDAL/OGR 的矢量叠加后端、R 的 sf 包,底层都在调用 GEOS。
|
|
23
|
+
|
|
24
|
+
核心能力:
|
|
25
|
+
|
|
26
|
+
- **几何模型**:Point / LineString / LinearRing / Polygon / Multi* / GeometryCollection,支持 XY、XYZ、XYM、XYZM
|
|
27
|
+
- **空间关系**:Intersects、Contains、Within、Touches、Crosses、Overlaps、Covers、Relate(DE-9IM)
|
|
28
|
+
- **集合与叠加运算**:Intersection、Union、Difference、SymDifference、UnaryUnion、Buffer、Clip、Split
|
|
29
|
+
- **构造与修复**:MakeValid、Normalize、Snap、Node、Polygonize、Densify、Simplify
|
|
30
|
+
- **索引与加速**:STRtree(批量窗口查询、最近邻)、PreparedGeometry(重复谓词加速)
|
|
31
|
+
- **序列化**:WKT、WKB、GeoJSON 读写器
|
|
32
|
+
|
|
33
|
+
**与相邻技术的分工**:JTS 是同一套算法的 Java 实现(GEOS 的语义上游);Shapely 是 GEOS 的 Python 绑定;PostGIS 把 GEOS 编译进数据库后端;GDAL/OGR 用 GEOS 做矢量叠加,但数据格式读写由 GDAL 负责。需要跨语言一致结果时以 GEOS 版本为准——不同 GEOS 版本的叠加结果可能有细微差异。
|
|
34
|
+
|
|
35
|
+
**API 选型结论先行**:一般应用用 **C API**(`geos_c.h`,ABI 稳定、可跨小版本换库);要嵌入 C++ 工程并接受重新编译时用 **C++ API**(`geos/geom/*.h`,无 ABI 稳定承诺)。下文示例默认 C API,C++ 差异单独标注。
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 环境准备与安装
|
|
40
|
+
|
|
41
|
+
### 通过包管理器
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Ubuntu / Debian(需要更新版本时可加 ppa:ubuntugis/ppa)
|
|
45
|
+
sudo apt-get install geos libgeos-dev
|
|
46
|
+
|
|
47
|
+
# RHEL / Amazon Linux(EPEL 提供)
|
|
48
|
+
sudo yum install -y epel-release geos geos-devel
|
|
49
|
+
|
|
50
|
+
# macOS
|
|
51
|
+
brew install geos
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# 自检:确认版本与头文件/库可见
|
|
56
|
+
geos-config --version
|
|
57
|
+
pkg-config --modversion geos
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 从源码构建(官方 CMake 流程)
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
tar xvfj geos-3.15.0.tar.bz2
|
|
64
|
+
cd geos-3.15.0
|
|
65
|
+
mkdir _build && cd _build
|
|
66
|
+
|
|
67
|
+
cmake \
|
|
68
|
+
-DCMAKE_BUILD_TYPE=Release \
|
|
69
|
+
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
|
70
|
+
..
|
|
71
|
+
make -j4
|
|
72
|
+
ctest # 可选但建议:跑一遍单元测试
|
|
73
|
+
sudo make install
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**构建要求**:CMake ≥ 3.15、支持 C++14 的编译器(常规测试 GCC / Clang / MSVC)、可选 Doxygen 生成 API 文档。常用开关:`BUILD_SHARED_LIBS=ON`(默认开)、`BUILD_TESTING=ON`(默认开)、`BUILD_DOCUMENTATION=OFF`(默认关)、`CMAKE_BUILD_TYPE` 取 `Release` / `RelWithDebInfo` / `Debug` / `ASAN`。
|
|
77
|
+
|
|
78
|
+
链接时 C API 用 `-lgeos_c`,C++ API 用 `-lgeos`。用 pkg-config 更省事:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
cc myapp.c -o myapp $(pkg-config --cflags --libs geos)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Windows 下建议用 vcpkg 或 conda-forge 安装,并让 `geos_c.dll` 与可执行文件同目录或加入 `PATH`。
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## C API 基础骨架
|
|
89
|
+
|
|
90
|
+
C API 只有一个头文件 `<geos_c.h>`,使用前必须注册消息回调并初始化全局状态,退出时清理。
|
|
91
|
+
|
|
92
|
+
```c
|
|
93
|
+
#include <stdio.h>
|
|
94
|
+
#include <stdarg.h>
|
|
95
|
+
#include <geos_c.h>
|
|
96
|
+
|
|
97
|
+
static void geos_msg_handler(const char *fmt, ...) {
|
|
98
|
+
va_list ap;
|
|
99
|
+
va_start(ap, fmt);
|
|
100
|
+
vfprintf(stderr, fmt, ap);
|
|
101
|
+
va_end(ap);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
int main(void) {
|
|
105
|
+
initGEOS(geos_msg_handler, geos_msg_handler);
|
|
106
|
+
|
|
107
|
+
GEOSWKTReader *reader = GEOSWKTReader_create();
|
|
108
|
+
GEOSGeometry *geom = GEOSWKTReader_read(reader, "POINT(1 1)");
|
|
109
|
+
|
|
110
|
+
GEOSWKTWriter *writer = GEOSWKTWriter_create();
|
|
111
|
+
char *wkt = GEOSWKTWriter_write(writer, geom);
|
|
112
|
+
printf("%s\n", wkt);
|
|
113
|
+
|
|
114
|
+
GEOSFree(wkt); /* GEOS 分配的字符串必须用 GEOSFree 释放 */
|
|
115
|
+
GEOSGeom_destroy(geom);
|
|
116
|
+
GEOSWKTWriter_destroy(writer);
|
|
117
|
+
GEOSWKTReader_destroy(reader);
|
|
118
|
+
|
|
119
|
+
finishGEOS();
|
|
120
|
+
return 0;
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
编译:`cc hello.c -o hello -lgeos_c`。
|
|
125
|
+
|
|
126
|
+
### 可重入与多线程版本
|
|
127
|
+
|
|
128
|
+
所有 C 函数都有 `_r` 后缀的可重入变体,多一个 `GEOSContextHandle_t` 参数。每个线程各自 `GEOS_init_r()` 建上下文、自己 `GEOS_finish_r()`,**不要跨线程共享 context handle**。
|
|
129
|
+
|
|
130
|
+
```c
|
|
131
|
+
GEOSContextHandle_t ctx = GEOS_init_r();
|
|
132
|
+
GEOSContext_setNoticeHandler_r(ctx, geos_msg_handler);
|
|
133
|
+
GEOSContext_setErrorHandler_r(ctx, geos_msg_handler);
|
|
134
|
+
|
|
135
|
+
GEOSWKTReader *reader = GEOSWKTReader_create_r(ctx);
|
|
136
|
+
GEOSGeometry *g = GEOSWKTReader_read_r(ctx, reader, "POINT(1 1)");
|
|
137
|
+
GEOSWKTWriter *writer = GEOSWKTWriter_create_r(ctx);
|
|
138
|
+
char *wkt = GEOSWKTWriter_write_r(ctx, writer, g);
|
|
139
|
+
|
|
140
|
+
GEOSFree_r(ctx, wkt);
|
|
141
|
+
GEOSGeom_destroy_r(ctx, g);
|
|
142
|
+
GEOSWKTWriter_destroy_r(ctx, writer);
|
|
143
|
+
GEOSWKTReader_destroy_r(ctx, reader);
|
|
144
|
+
GEOS_finish_r(ctx);
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 核心 API
|
|
150
|
+
|
|
151
|
+
### 几何构造
|
|
152
|
+
|
|
153
|
+
| 用途 | C 函数 |
|
|
154
|
+
|---|---|
|
|
155
|
+
| 点 | `GEOSGeom_createPointFromXY(x, y)`、`GEOSGeom_createPoint(seq)` |
|
|
156
|
+
| 线串 / 环 | `GEOSGeom_createLineString(seq)`、`GEOSGeom_createLinearRing(seq)` |
|
|
157
|
+
| 面 | `GEOSGeom_createPolygon(shell, holes, nholes)` |
|
|
158
|
+
| 集合 | `GEOSGeom_createCollection(type, geoms, n)` |
|
|
159
|
+
| 坐标序列 | `GEOSCoordSeq_create(n, dims)`、`GEOSCoordSeq_copyFromBuffer(buf, n, hasZ, hasM)` |
|
|
160
|
+
| 文本 → 几何 | `GEOSWKTReader_read`、`GEOSWKBReader_read`、`GEOSGeoJSONReader_readGeometry` |
|
|
161
|
+
|
|
162
|
+
```c
|
|
163
|
+
/* 用坐标数组造一条 3 点的线,再转 WKT */
|
|
164
|
+
double coords[] = {0, 0, 10, 10, 20, 0};
|
|
165
|
+
GEOSCoordSequence *seq = GEOSCoordSeq_copyFromBuffer(coords, 3, 0, 0);
|
|
166
|
+
GEOSGeometry *line = GEOSGeom_createLineString(seq); /* 所有权转移给 geometry */
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**所有权规则**:`GEOSGeom_create*()` 接收坐标序列后由其负责释放,**不要再手动 `GEOSCoordSeq_destroy`**;几何对象一律 `GEOSGeom_destroy()`,GEOS 返回的字符串一律 `GEOSFree()`。
|
|
170
|
+
|
|
171
|
+
### 叠加与缓冲
|
|
172
|
+
|
|
173
|
+
```c
|
|
174
|
+
GEOSGeometry *a = GEOSWKTReader_read(r, "POLYGON((0 0,10 0,10 10,0 10,0 0))");
|
|
175
|
+
GEOSGeometry *b = GEOSWKTReader_read(r, "POLYGON((5 5,15 5,15 15,5 15,5 5))");
|
|
176
|
+
|
|
177
|
+
GEOSGeometry *inter = GEOSIntersection(a, b); /* 相交 */
|
|
178
|
+
GEOSGeometry *uni = GEOSUnion(a, b); /* 合并 */
|
|
179
|
+
GEOSGeometry *diff = GEOSDifference(a, b); /* 差集 */
|
|
180
|
+
GEOSGeometry *sym = GEOSSymDifference(a, b); /* 对称差 */
|
|
181
|
+
GEOSGeometry *buf = GEOSBuffer(a, 2.0, 8); /* 半径 2,每四分之一圆 8 段 */
|
|
182
|
+
GEOSGeometry *hull = GEOSConvexHull(a);
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
`GEOSBuffer` 默认圆头圆角;方头 / 斜接需用 `GEOSBufferWithStyle`(参数:quadSegs、endCapStyle、joinStyle、mitreLimit)。
|
|
186
|
+
|
|
187
|
+
### 空间谓词与 DE-9IM
|
|
188
|
+
|
|
189
|
+
```c
|
|
190
|
+
char hit = GEOSIntersects(a, b); /* 1 真 / 2 假 / 0 异常 */
|
|
191
|
+
char inside = GEOSContains(a, b);
|
|
192
|
+
char covered = GEOSCovers(a, b);
|
|
193
|
+
char rel = GEOSRelatePattern(a, b, "T*F**FFF*");
|
|
194
|
+
char *matrix = GEOSRelate(a, b); /* 9 字符 DE-9IM 矩阵 */
|
|
195
|
+
GEOSFree(matrix);
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
谓词返回 `char`:`1` 真、`2` 假、`0` 出错(查错误回调)。**不要当布尔直接取反**。
|
|
199
|
+
|
|
200
|
+
### PreparedGeometry:重复谓词加速
|
|
201
|
+
|
|
202
|
+
同一个大面被几万个点反复 `Intersects` / `Contains` 时,预处理能带来数量级提升。
|
|
203
|
+
|
|
204
|
+
```c
|
|
205
|
+
const GEOSPreparedGeometry *prep = GEOSPrepare(polygon); /* 只读,不接管 polygon 所有权 */
|
|
206
|
+
for (size_t i = 0; i < n; i++) {
|
|
207
|
+
if (GEOSPreparedIntersects(prep, pts[i]) == 1) {
|
|
208
|
+
/* 命中 */
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
GEOSPreparedGeom_destroy(prep);
|
|
212
|
+
/* polygon 与 pts 仍需自行 destroy */
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### STRtree:窗口查询与最近邻
|
|
216
|
+
|
|
217
|
+
```c
|
|
218
|
+
typedef struct { GEOSGeometry *geom; size_t id; } item;
|
|
219
|
+
|
|
220
|
+
GEOSSTRtree *tree = GEOSSTRtree_create(10); /* 参数是节点分支数,10 是常用值 */
|
|
221
|
+
for (size_t i = 0; i < n; i++) {
|
|
222
|
+
GEOSSTRtree_insert(tree, items[i]->geom, items[i]); /* 只存指针,不接管所有权 */
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
GEOSGeometry *queryEnv = GEOSWKTReader_read(r, "POLYGON((20 20,22 20,22 22,20 22,20 20))");
|
|
226
|
+
GEOSSTRtree_query(tree, queryEnv, queryCallback, &count); /* 回调逐个给候选 */
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
最近邻用 `GEOSSTRtree_nearest_generic(tree, item, geom, distanceCallback, userdata)`,距离回调里调用 `GEOSDistance` 判定真实距离。用完 `GEOSSTRtree_destroy(tree)`,并自行释放所有 item 几何。
|
|
230
|
+
|
|
231
|
+
### 有效性修复与精度
|
|
232
|
+
|
|
233
|
+
```c
|
|
234
|
+
GEOSGeometry *fixed = GEOSMakeValid(invalid); /* 自相交、环重叠等无效面修复 */
|
|
235
|
+
char ok = GEOSisValid(invalid); /* 1 有效 / 2 无效 / 0 出错 */
|
|
236
|
+
char *reason = GEOSisValidReason(invalid); /* 无效原因文本 */
|
|
237
|
+
GEOSGeometry *snapped = GEOSSnap(a, b, 1e-6); /* 容差吸附,治理近重合顶点 */
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**OverlayNG**:自 GEOS 3.9 起默认叠加引擎已是 OverlayNG(鲁棒、失败率显著低于旧引擎),无需额外开关。遇到 `TopologyException` 优先做有效性修复或加容差(`GEOSSnap` / 先量化坐标),而不是反复重算。3.15 的破坏性变化之一:叠加遇到连续子段时输出 `LineString` 而非 `MultiLineString`,下游不要假设返回类型。
|
|
241
|
+
|
|
242
|
+
### 内存与错误处理要点
|
|
243
|
+
|
|
244
|
+
| 规则 | 说明 |
|
|
245
|
+
|---|---|
|
|
246
|
+
| 成对释放 | `GEOSGeom_destroy` / `GEOSWKTReader_destroy` / `GEOSSTRtree_destroy` / `GEOSFree` 各管各的对象 |
|
|
247
|
+
| 字符串专用 | `GEOSWKTWriter_write`、`GEOSRelate` 返回的 `char*` 必须 `GEOSFree`,不能用 `free()` |
|
|
248
|
+
| 序列所有权 | `GEOSGeom_createLineString/Polygon` 成功后不得再 destroy 该坐标序列 |
|
|
249
|
+
| 空结果 | 无交返回 `POLYGON EMPTY` 一类空几何,不是 `NULL`;`NULL` 只表示出错 |
|
|
250
|
+
| 出错排查 | `GEOS_getLastError()`(可重入版 `GEOS_getLastError_r(ctx)`)配合错误回调看原文 |
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## 典型工作流
|
|
255
|
+
|
|
256
|
+
### 工作流一:WKT → 缓冲 → 相交 → 输出 WKT(C API)
|
|
257
|
+
|
|
258
|
+
输入两块相交的 WKT 多边形;输出缓冲后的相交面积与 WKT。
|
|
259
|
+
|
|
260
|
+
```c
|
|
261
|
+
initGEOS(geos_msg_handler, geos_msg_handler);
|
|
262
|
+
GEOSWKTReader *r = GEOSWKTReader_create();
|
|
263
|
+
GEOSGeometry *a = GEOSWKTReader_read(r, "POLYGON((0 0,10 0,10 10,0 10,0 0))");
|
|
264
|
+
GEOSGeometry *b = GEOSWKTReader_read(r, "POLYGON((5 5,15 5,15 15,5 15,5 5))");
|
|
265
|
+
|
|
266
|
+
GEOSGeometry *inter = GEOSIntersection(a, b);
|
|
267
|
+
GEOSGeometry *buf = GEOSBuffer(inter, 0.5, 8);
|
|
268
|
+
|
|
269
|
+
double area = 0.0;
|
|
270
|
+
GEOSArea(buf, &area); /* 校验:应大于 0 */
|
|
271
|
+
printf("area = %.3f\n", area);
|
|
272
|
+
|
|
273
|
+
GEOSWKTWriter *w = GEOSWKTWriter_create();
|
|
274
|
+
GEOSWKTWriter_setTrim(w, 1); /* 3.12 起默认已 trim,此行仅显式声明 */
|
|
275
|
+
char *out = GEOSWKTWriter_write(w, buf);
|
|
276
|
+
printf("%s\n", out);
|
|
277
|
+
|
|
278
|
+
GEOSFree(out);
|
|
279
|
+
GEOSGeom_destroy(buf); GEOSGeom_destroy(inter);
|
|
280
|
+
GEOSGeom_destroy(a); GEOSGeom_destroy(b);
|
|
281
|
+
GEOSWKTWriter_destroy(w); GEOSWKTReader_destroy(r);
|
|
282
|
+
finishGEOS();
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
**校验产物**:`area` 为正、输出 WKT 能被 `GEOSWKTReader_read` 读回且 `GEOSisValid` 为 1。
|
|
286
|
+
|
|
287
|
+
### 工作流二:C++ API 嵌入(geos::geom)
|
|
288
|
+
|
|
289
|
+
```cpp
|
|
290
|
+
#include <iostream>
|
|
291
|
+
#include <memory>
|
|
292
|
+
#include <geos/geom/GeometryFactory.h>
|
|
293
|
+
#include <geos/geom/Geometry.h>
|
|
294
|
+
#include <geos/io/WKTReader.h>
|
|
295
|
+
#include <geos/io/WKTWriter.h>
|
|
296
|
+
|
|
297
|
+
using namespace geos::geom;
|
|
298
|
+
using namespace geos::io;
|
|
299
|
+
|
|
300
|
+
int main() {
|
|
301
|
+
GeometryFactory::Ptr factory = GeometryFactory::create();
|
|
302
|
+
WKTReader reader(*factory);
|
|
303
|
+
|
|
304
|
+
std::unique_ptr<Geometry> a(reader.read("POLYGON((0 0,10 0,10 10,0 10,0 0))"));
|
|
305
|
+
std::unique_ptr<Geometry> b(reader.read("POLYGON((5 5,15 5,15 15,5 15,5 5))"));
|
|
306
|
+
std::unique_ptr<Geometry> inter = a->intersection(b.get());
|
|
307
|
+
|
|
308
|
+
WKTWriter writer;
|
|
309
|
+
writer.setTrim(true); /* 3.12 之前才必须显式设置 */
|
|
310
|
+
std::cout << writer.write(inter.get()) << std::endl;
|
|
311
|
+
return 0;
|
|
312
|
+
}
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
编译:`g++ -std=c++14 demo.cpp -o demo -lgeos`。C++ 侧注意:`GeometryFactory::create()` 返回 `Ptr`(`std::unique_ptr`);`WKTReader` 必须绑定 factory 以共享 PrecisionModel;**C++ ABI 不跨版本稳定**,升级 GEOS 后必须重新编译。
|
|
316
|
+
|
|
317
|
+
### 工作流三:几何清洗流水线(服务端批处理)
|
|
318
|
+
|
|
319
|
+
1. `GEOSWKBReader_read` 读入源数据(比 WKT 更小更快)
|
|
320
|
+
2. `GEOSisValid` 检查,无效则 `GEOSMakeValid` 修复
|
|
321
|
+
3. `GEOSNormalize` 统一顶点顺序与环方向,便于结果比对
|
|
322
|
+
4. `GEOSUnaryUnion` 合并同层要素,`GEOSBuffer(geom, 0, 8)` 消除自相交残渣
|
|
323
|
+
5. `GEOSWKBWriter_write` 写回,并记录修复前后 `GEOSisValid` 结果
|
|
324
|
+
|
|
325
|
+
**校验产物**:抽样统计修复前后 `GEOSisValid == 1` 的比例,以及 `GEOSArea` 总量变化不超过阈值(避免修复把几何吃掉)。
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## 常见问题
|
|
330
|
+
|
|
331
|
+
| 问题 | 原因 | 处置 |
|
|
332
|
+
|---|---|---|
|
|
333
|
+
| `TopologyException: side location conflict` / `Self-intersection` | 输入几何无效(自相交、环重叠、重复点) | 先 `GEOSisValid` + `GEOSMakeValid` 修复;仍失败加 `GEOSSnap` 容差 |
|
|
334
|
+
| 段错误(Segmentation fault) | 忘记 `initGEOS`、跨线程共用 context、或对已 destroy 的几何再操作 | 补初始化 / 用 `_r` 每线程独立 context;用 ASAN 构建定位 |
|
|
335
|
+
| 返回字符串释放后崩溃 | 用 `free()` 释放 GEOS 分配的字符串 | 改用 `GEOSFree()`(Windows 上尤为关键) |
|
|
336
|
+
| 退出时报内存泄漏 | 坐标序列被重复释放,或 item 几何未销毁 | 确认 `GEOSGeom_create*` 后不再 destroy 序列;STRtree 只存指针,item 自己释放 |
|
|
337
|
+
| 链接报 `undefined reference to GEOSIntersection` | 只链接了 `-lgeos`(C++ 库) | C API 要链接 `-lgeos_c`,用 `pkg-config --libs geos` 最稳 |
|
|
338
|
+
| 谓词判断结果反了 | C API 谓词返回 `char`:1 真 / 2 假 / 0 异常 | 用 `== 1` 判真,不要直接当布尔取反 |
|
|
339
|
+
| 升级后叠加结果类型变了 | 3.15 起连续子段叠加输出 `LineString` 而非 `MultiLineString` | 按 `GEOSGeomTypeId` 分支处理,不要硬转型 |
|
|
340
|
+
| 空结果被当成错误 | 无交返回 `POLYGON EMPTY`,不是 `NULL` | 用 `GEOSisEmpty` 判断而非判空指针 |
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## AI 使用建议
|
|
345
|
+
|
|
346
|
+
- **执行环境**:C 示例用 `cc demo.c -o demo $(pkg-config --cflags --libs geos)` 编译;C++ 示例用 `g++ -std=c++14 demo.cpp -lgeos`。Windows 优先 vcpkg / conda-forge,运行时确保 `geos_c.dll` 在搜索路径。
|
|
347
|
+
- **先探测版本**:`geos-config --version` 或 `pkg-config --modversion geos`;版本差异集中在叠加引擎、空几何语义与 M 值保留,报告结论时带上版本号。
|
|
348
|
+
- **验证产物**:不要只看「程序没崩」——用 `GEOSisValid`、`GEOSArea`、`GEOSGetNumGeometries` 三方断言;WKT/WKB 往返后再比一次面积与顶点数。
|
|
349
|
+
- **易错操作**:混用 `GEOSGeom_destroy` 与 `GEOSFree`、忘记 `initGEOS`、多线程共享 context、对 `char*` 调 `free()`——这四类占了绝大多数崩溃与泄漏。
|
|
350
|
+
- **性能验证**:重复谓词先用 `GEOSPrepare`,批量窗口查询先建 `GEOSSTRtree`,再用 `std::chrono` / `clock_gettime` 计时对比,用数据证明优化有效。
|
|
351
|
+
- **安全与权限**:`make install` 会写系统目录(默认 `/usr/local`),执行前先征得用户同意;生产升级前先备份,并在副本上跑一遍几何回归。
|
|
352
|
+
|
|
353
|
+
## 相关技能
|
|
354
|
+
|
|
355
|
+
- **jts** — GEOS 的 Java 上游实现(算法语义同源):[../jts/SKILL.md](../jts/SKILL.md)
|
|
356
|
+
- **shapely** — GEOS 的 Python 绑定,本技能是其底层内核:[../shapely/SKILL.md](../shapely/SKILL.md)
|
|
357
|
+
- **postgis** — 把 GEOS 编进数据库后端提供 ST_* 函数:[../postgis/SKILL.md](../postgis/SKILL.md)
|
|
358
|
+
- **gdal** — OGR 矢量处理,叠加运算调用 GEOS:[../gdal/SKILL.md](../gdal/SKILL.md)
|
|
359
|
+
- **nettopologysuite** — JTS 的 .NET 移植(同族算法):[../nettopologysuite/SKILL.md](../nettopologysuite/SKILL.md)
|
|
360
|
+
|
|
361
|
+
## 参考资源
|
|
362
|
+
|
|
363
|
+
- **GitHub 仓库:** <https://github.com/libgeos/geos>
|
|
364
|
+
- **官网:** <https://libgeos.org/>
|
|
365
|
+
- **C API 编程指南:** <https://libgeos.org/usage/c_api/>
|
|
366
|
+
- **C++ API 编程指南:** <https://libgeos.org/usage/cpp_api/>
|
|
367
|
+
- **下载与构建:** <https://libgeos.org/usage/download/>
|
|
368
|
+
- **安装包说明:** <https://libgeos.org/usage/install/>
|
|
369
|
+
- **C API 参考(Doxygen):** <https://libgeos.org/usage/doxygen/>
|
|
370
|
+
- **常见问题:** <https://libgeos.org/usage/faq/>
|
|
371
|
+
- **旧版本下载:** <https://download.osgeo.org/geos/>
|
|
372
|
+
- **绑定列表(Shapely / sf / PostGIS 等):** <https://libgeos.org/usage/bindings/>
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: geoserver
|
|
3
3
|
description: "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."
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- wfs
|
|
9
|
-
- wmts
|
|
10
|
-
- wcs
|
|
11
|
-
- wps
|
|
12
|
-
- ogc
|
|
13
|
-
- map
|
|
14
|
-
- web
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
category: gis
|
|
7
|
+
tags: "java, server, wms, wfs, wmts, wcs, wps, ogc, map, web"
|
|
15
8
|
---
|
|
16
9
|
|
|
17
10
|
> **项目地址:** <https://github.com/geoserver/geoserver>
|
|
@@ -20,7 +13,7 @@ tags:
|
|
|
20
13
|
>
|
|
21
14
|
> **下载:** <https://geoserver.org/release/stable/>
|
|
22
15
|
>
|
|
23
|
-
> **最新版本:** 3.0.2(2026-10-
|
|
16
|
+
> **最新版本:** 3.0.2(2026-10-19 发布,安全修复版,生产应优先升级;截至 2026-11,[官方下载](https://geoserver.org/release/stable/))
|
|
24
17
|
>
|
|
25
18
|
> **运行环境:** Java 17 或 21;3.0.2 内含 GeoTools 35.2、GeoWebCache 2.0.2
|
|
26
19
|
>
|
|
@@ -206,7 +199,7 @@ curl -u admin:geoserver -XPOST \
|
|
|
206
199
|
| WFS-T 403 | Data 规则允许 `w` 权限 |
|
|
207
200
|
| 跨域 | 配置 CORS 过滤器 |
|
|
208
201
|
| 改了 SLD 但预览不变 | 图层被 GeoWebCache 缓存:Tile Caching 里 Truncate 该图层,或给 GetMap 加 `&tiled=false` |
|
|
209
|
-
| 忘记管理员密码 |
|
|
202
|
+
| 忘记管理员密码 | 默认 XML 用户/组服务的用户在数据目录 `security/usergroup/<name>/users.xml`(默认服务名 `default`);改完重启,或用 Docker 的 `GEOSERVER_ADMIN_PASSWORD` 重置 |
|
|
210
203
|
| 启动报 `UnsupportedClassVersionError` | JVM 版本低于 17:换成 JDK 17 或 21 再启动 3.0.x 分发包 |
|
|
211
204
|
|
|
212
205
|
---
|
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: geoserver-cloud
|
|
3
|
-
description: "Use when deploying GeoServer Cloud 3.0.2 on Docker Compose or Kubernetes — gateway serving WMS/WFS/WCS/WPS/GWC microservices under /geoserver/cloud, PgConfig vs datadir backends, RabbitMQ config-bus sync, Helm chart geoservercloud 3.0.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- wfs
|
|
9
|
-
- wmts
|
|
10
|
-
- cloud
|
|
11
|
-
- kubernetes
|
|
12
|
-
- docker
|
|
13
|
-
- microservices
|
|
14
|
-
- spring-cloud
|
|
3
|
+
description: "Use when deploying GeoServer Cloud 3.0.2.1 on Docker Compose or Kubernetes — gateway serving WMS/WFS/WCS/WPS/GWC microservices under /geoserver/cloud, PgConfig vs datadir backends, RabbitMQ config-bus sync, Helm chart geoservercloud 3.0.3, and diagnosing 502s via actuator/health and Consul registration."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
category: gis
|
|
7
|
+
tags: "java, server, wms, wfs, wmts, cloud, kubernetes, docker, microservices, spring-cloud"
|
|
15
8
|
---
|
|
16
9
|
|
|
17
10
|
> **项目地址:** <https://github.com/geoserver/geoserver-cloud>
|
|
18
11
|
>
|
|
19
12
|
> **官方文档:** <https://geoserver.org/geoserver-cloud/>
|
|
20
13
|
>
|
|
21
|
-
> **Docker Hub:** <https://hub.docker.com/u/geoservercloud
|
|
14
|
+
> **Docker Hub:** <https://hub.docker.com/u/geoservercloud>(镜像标签形如 `3.0.2.1`,尾段为该版本线的补丁号)
|
|
22
15
|
>
|
|
23
|
-
> **最新版本:** 3.0.2(2026-
|
|
16
|
+
> **最新版本:** 3.0.2.1(2026-11-03,截至 2026-11,[GitHub Releases](https://github.com/geoserver/geoserver-cloud/releases));配套 Helm chart `geoservercloud` 3.0.3
|
|
24
17
|
>
|
|
25
18
|
> **许可证:** GPL-2.0
|
|
26
19
|
|
|
@@ -43,7 +36,7 @@ GeoServer Cloud(GS Cloud):
|
|
|
43
36
|
| 服务 | 镜像 | 用途 |
|
|
44
37
|
|------|------|------|
|
|
45
38
|
| `gateway` | `geoservercloud/geoserver-cloud-gateway` | 网关 |
|
|
46
|
-
| `discovery` | —(3.x 不再发布该镜像) | 服务发现:官方 compose/K8s 改用 `hashicorp/consul`,`geoservercloud/geoserver-cloud-discovery
|
|
39
|
+
| `discovery` | —(3.x 不再发布该镜像) | 服务发现:官方 compose/K8s 改用 `hashicorp/consul`,`geoservercloud/geoserver-cloud-discovery` 镜像在 Docker Hub 已 404 |
|
|
47
40
|
| `config` | `geoservercloud/geoserver-cloud-config` | 配置中心 |
|
|
48
41
|
| `web-ui` | `geoservercloud/geoserver-cloud-webui` | 管理界面 |
|
|
49
42
|
| `rest` | `geoservercloud/geoserver-cloud-rest` | REST API |
|
|
@@ -98,7 +91,7 @@ PGCONFIG_SCHEMA: "pgconfig" # 启动时自动创建 schema
|
|
|
98
91
|
## Kubernetes(Helm)
|
|
99
92
|
|
|
100
93
|
```bash
|
|
101
|
-
# Chart:camptocamp/helm-geoserver-cloud(chart 名 geoservercloud,最新 3.0.
|
|
94
|
+
# Chart:camptocamp/helm-geoserver-cloud(chart 名 geoservercloud,最新 3.0.3)
|
|
102
95
|
helm repo add geoserver-cloud https://camptocamp.github.io/helm-geoserver-cloud
|
|
103
96
|
helm repo update
|
|
104
97
|
```
|
|
@@ -110,7 +103,7 @@ helm repo update
|
|
|
110
103
|
> dependencies:
|
|
111
104
|
> - name: geoservercloud
|
|
112
105
|
> repository: https://camptocamp.github.io/helm-geoserver-cloud
|
|
113
|
-
> version: 3.0.
|
|
106
|
+
> version: 3.0.3
|
|
114
107
|
> ```
|
|
115
108
|
>
|
|
116
109
|
> ```yaml
|
|
@@ -182,7 +175,7 @@ management:
|
|
|
182
175
|
```bash
|
|
183
176
|
docker run -e SPRING_PROFILES_ACTIVE=datadir \
|
|
184
177
|
-v /mnt/gsdata:/opt/app/data_directory \
|
|
185
|
-
geoservercloud/geoserver-cloud-wms:3.0.2
|
|
178
|
+
geoservercloud/geoserver-cloud-wms:3.0.2.1
|
|
186
179
|
```
|
|
187
180
|
|
|
188
181
|
---
|
|
@@ -198,8 +191,6 @@ docker run -e SPRING_PROFILES_ACTIVE=datadir \
|
|
|
198
191
|
|
|
199
192
|
---
|
|
200
193
|
|
|
201
|
-
---
|
|
202
|
-
|
|
203
194
|
## 典型工作流
|
|
204
195
|
|
|
205
196
|
### 工作流 1:从零部署高可用 GeoServer Cloud
|
|
@@ -254,7 +245,7 @@ kubectl -n gis scale deploy <wms-deployment> --replicas=10
|
|
|
254
245
|
- **验证产物**:部署后逐服务探活,再经网关 `.../rest/workspaces.json` 与一次 WMS `GetMap` 走通全链路;`docker compose ps` 显示 Up 不等于 OGC 服务可用。
|
|
255
246
|
- **排障顺序**:502 → 查 Consul 注册与目标服务健康(`kubectl -n gis logs deploy/<wms>`);配置不生效 → 查 RabbitMQ 与 `GEOSERVER_BUS_ENABLED`;瓦片 404 → 查 gwc 是否部署、`GEOSERVER_BASE_PATH` 前缀是否一致。
|
|
256
247
|
- **安全与权限**:`admin:geoserver`、`PGCONFIG_PASSWORD`、RabbitMQ 口令不要回显到报告;`docker compose down -v`、`helm uninstall`、删 PVC 或 PgConfig schema 会丢配置,先向用户确认并备份。
|
|
257
|
-
- **先本地复现**:能在 docker compose 复现的问题再上 K8s
|
|
248
|
+
- **先本地复现**:能在 docker compose 复现的问题再上 K8s;同一套部署里所有 `geoserver-cloud-*` 镜像用同一标签(当前 3.0.2.1);Helm chart 当前为 3.0.3,chart 版本与本仓库镜像标签不必相同,但升级时先查 chart values 默认镜像标签。
|
|
258
249
|
|
|
259
250
|
## 相关技能
|
|
260
251
|
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: geoserver-rest-api
|
|
3
3
|
description: "Use when automating GeoServer 3.0.2 over REST — POST /rest/workspaces, datastores, featuretypes, PUT Shapefile ZIP to file.shp, GeoTIFF to coveragestores, upload SLD as application/vnd.ogc.sld+xml, ?recurse=true deletes. curl -u admin:geoserver, single-key JSON like {\"workspace\":{...}}, 401 on POST but 200 on GET, GWC cache masking style changes."
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- server
|
|
9
|
-
- wms
|
|
10
|
-
- wfs
|
|
11
|
-
- automation
|
|
12
|
-
- curl
|
|
13
|
-
- geoserver
|
|
14
|
-
- json
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
category: gis
|
|
7
|
+
tags: "rest, api, http, server, wms, wfs, automation, curl, geoserver, json"
|
|
15
8
|
---
|
|
16
9
|
|
|
17
10
|
> **项目地址:** <https://github.com/geoserver/geoserver>
|
|
@@ -20,7 +13,7 @@ tags:
|
|
|
20
13
|
>
|
|
21
14
|
> **API 参考:** <https://docs.geoserver.org/stable/en/user/rest/api/index.html>
|
|
22
15
|
>
|
|
23
|
-
> **最新版本:** GeoServer 3.0.2(2026-10-
|
|
16
|
+
> **最新版本:** GeoServer 3.0.2(2026-10-19 发布,安全修复版;截至 2026-11,[官方下载](https://geoserver.org/release/stable/))
|
|
24
17
|
>
|
|
25
18
|
> **许可证:** GPL-2.0
|
|
26
19
|
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# GeoServer REST API 端点清单
|
|
2
2
|
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- 系统管理
|
|
6
|
+
- 工作空间 (Workspaces)
|
|
7
|
+
- 命名空间 (Namespaces)
|
|
8
|
+
- 数据存储 (Data Stores) — 矢量数据
|
|
9
|
+
- 要素类型 (Feature Types) — 矢量图层资源
|
|
10
|
+
- 覆盖存储 (Coverage Stores) — 栅格数据
|
|
11
|
+
- 覆盖 (Coverages) — 栅格图层资源
|
|
12
|
+
- 图层 (Layers)
|
|
13
|
+
- 图层组 (Layer Groups)
|
|
14
|
+
- 样式 (Styles)
|
|
15
|
+
- OGC 服务设置
|
|
16
|
+
- 安全管理 (Security)
|
|
17
|
+
- GeoWebCache 集成
|
|
18
|
+
|
|
3
19
|
> 这是 [../SKILL.md](../SKILL.md) 的补充文件,收录 GeoServer REST API 全部端点分组清单(系统管理、工作空间、命名空间、数据存储、要素类型、覆盖存储、覆盖、图层、图层组、样式、OGC 服务设置、安全、GeoWebCache)。
|
|
4
20
|
|
|
5
21
|
**基础 URL:** `http://{host}:{port}/geoserver/rest`
|
package/assets/geotools/SKILL.md
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: geotools
|
|
3
3
|
description: "Use when building Java GIS apps on GeoTools 35.2 (JDK 17) — org.geotools:gt-main / gt-shapefile / gt-geopkg / gt-epsg-hsql from repo.osgeo.org (not Maven Central), CQL/ECQL filters, CRS.decode plus JTS.transform reprojection, StreamingRenderer PNG output, and disposing DataStore/SimpleFeatureIterator."
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- wms
|
|
9
|
-
- wfs
|
|
10
|
-
- vector
|
|
11
|
-
- raster
|
|
12
|
-
- crs
|
|
13
|
-
- rendering
|
|
14
|
-
- jts
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
category: gis
|
|
7
|
+
tags: "java, gis, ogc, wms, wfs, vector, raster, crs, rendering, jts"
|
|
15
8
|
---
|
|
16
9
|
|
|
17
10
|
> **项目地址:** <https://github.com/geotools/geotools>
|
|
18
11
|
>
|
|
19
12
|
> **Maven GroupId:** `org.geotools`
|
|
20
13
|
>
|
|
21
|
-
> **最新版本:** 35.2(2026-10-16,[OSGeo Maven 仓库](https://repo.osgeo.org/repository/release/))
|
|
14
|
+
> **最新版本:** 35.2(2026-10-16,截至 2026-11,[OSGeo Maven 仓库](https://repo.osgeo.org/repository/release/))
|
|
22
15
|
>
|
|
23
16
|
> **许可证:** LGPL 2.1
|
|
24
17
|
>
|