@dsh-gis/dsh-opengis-skill 0.1.3 → 0.2.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 +40 -0
- package/README.md +48 -22
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/adaptations/brutile.md +8 -0
- package/adaptations/cesiumjs.md +8 -0
- package/adaptations/common.md +16 -0
- package/adaptations/deck-gl.md +8 -0
- package/adaptations/duckdb-spatial.md +8 -0
- package/adaptations/gdal-api.md +8 -0
- package/adaptations/gdal.md +8 -0
- package/adaptations/geolibre.md +8 -0
- package/adaptations/geometry-api-java.md +8 -0
- package/adaptations/geometry-api-net.md +8 -0
- package/adaptations/geonode.md +8 -0
- package/adaptations/geopandas.md +8 -0
- package/adaptations/geopipe-agent.md +8 -0
- package/adaptations/geoserver-cloud.md +8 -0
- package/adaptations/geoserver-rest-api.md +8 -0
- package/adaptations/geoserver.md +8 -0
- package/adaptations/geotools.md +8 -0
- package/adaptations/grass-gis.md +8 -0
- package/adaptations/jts.md +8 -0
- package/adaptations/kepler-gl.md +8 -0
- package/adaptations/leaflet.md +8 -0
- package/adaptations/mapbox-gl-js.md +8 -0
- package/adaptations/mapserver.md +8 -0
- package/adaptations/mapsui.md +8 -0
- package/adaptations/nettopologysuite.md +8 -0
- package/adaptations/opengis-all.md +8 -0
- package/adaptations/opengis-daf.md +8 -0
- package/adaptations/opengis-utils-for-java.md +8 -0
- package/adaptations/opengis-utils-for-net.md +8 -0
- package/adaptations/openlayers.md +8 -0
- package/adaptations/pdal.md +8 -0
- package/adaptations/postgis.md +8 -0
- package/adaptations/proj.md +8 -0
- package/adaptations/projnet4geoapi.md +8 -0
- package/adaptations/pyqgis.md +8 -0
- package/adaptations/qgis-process.md +8 -0
- package/adaptations/qgis-server.md +8 -0
- package/adaptations/shapely.md +8 -0
- package/adaptations/sharpmap.md +8 -0
- package/adaptations/spatialite.md +8 -0
- package/adaptations/whitebox-tools.md +8 -0
- package/assets/brutile/SKILL.md +289 -0
- package/assets/cesiumjs/SKILL.md +73 -23
- package/assets/deck-gl/SKILL.md +19 -20
- package/assets/duckdb-spatial/SKILL.md +370 -0
- package/assets/gdal/SKILL.md +50 -21
- package/assets/gdal-api/SKILL.md +6 -4
- package/assets/geolibre/SKILL.md +364 -0
- package/assets/geometry-api-java/SKILL.md +5 -6
- package/assets/geometry-api-net/SKILL.md +65 -21
- package/assets/geonode/SKILL.md +347 -0
- package/assets/geopandas/SKILL.md +17 -15
- package/assets/geopipe-agent/SKILL.md +25 -20
- package/assets/geoserver/SKILL.md +6 -4
- package/assets/geoserver-cloud/SKILL.md +14 -15
- package/assets/geoserver-rest-api/SKILL.md +13 -8
- package/assets/geotools/SKILL.md +7 -5
- package/assets/grass-gis/SKILL.md +19 -20
- package/assets/jts/SKILL.md +7 -4
- package/assets/kepler-gl/SKILL.md +313 -0
- package/assets/leaflet/SKILL.md +41 -19
- package/assets/mapbox-gl-js/SKILL.md +18 -19
- package/assets/mapserver/SKILL.md +17 -19
- package/assets/mapsui/SKILL.md +85 -48
- package/assets/nettopologysuite/SKILL.md +91 -20
- package/assets/opengis-all/SKILL.md +78 -270
- package/assets/opengis-all/reference/data-stages.md +262 -4
- package/assets/opengis-daf/SKILL.md +6 -5
- package/assets/opengis-utils-for-java/SKILL.md +52 -39
- package/assets/opengis-utils-for-java/reference/common-tasks.md +12 -12
- package/assets/opengis-utils-for-net/SKILL.md +105 -39
- package/assets/opengis-utils-for-net/reference/code-patterns.md +11 -11
- package/assets/opengis-utils-for-net/reference/util-classes.md +25 -26
- package/assets/openlayers/SKILL.md +66 -9
- package/assets/pdal/SKILL.md +21 -17
- package/assets/postgis/SKILL.md +61 -11
- package/assets/proj/SKILL.md +28 -30
- package/assets/projnet4geoapi/SKILL.md +299 -0
- package/assets/pyqgis/SKILL.md +28 -20
- package/assets/qgis-process/SKILL.md +71 -22
- package/assets/qgis-server/SKILL.md +20 -20
- package/assets/shapely/SKILL.md +132 -75
- package/assets/sharpmap/SKILL.md +93 -50
- package/assets/spatialite/SKILL.md +365 -0
- package/assets/whitebox-tools/SKILL.md +269 -0
- package/lib/adaptations.d.ts +47 -0
- package/lib/adaptations.js +268 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +14 -2
- package/lib/skill-file.js +31 -7
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +12 -2
- package/upstream.json +56 -40
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# OpenGIS Utils for .NET
|
|
1
|
+
# OpenGIS Utils for .NET 工具类参考
|
|
2
2
|
|
|
3
|
-
OguLayerUtil
|
|
3
|
+
从 SKILL.md 拆出的 OguLayerUtil、GeometryUtil、CrsUtil、ShpUtil、PostgisUtil、GtTxtUtil 与 GDAL 配置参考,按 OpenGIS.Utils 1.1.2 编写。
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## 数据读写 — OguLayerUtil(推荐入口)
|
|
8
8
|
|
|
9
9
|
```csharp
|
|
10
10
|
using OpenGIS.Utils.DataSource;
|
|
11
11
|
using OpenGIS.Utils.Engine.Enums;
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
###
|
|
14
|
+
### 读取
|
|
15
15
|
|
|
16
16
|
```csharp
|
|
17
17
|
OguLayer layer = OguLayerUtil.ReadLayer(
|
|
@@ -28,7 +28,7 @@ OguLayer layer = OguLayerUtil.ReadLayer(
|
|
|
28
28
|
OguLayer layer = await OguLayerUtil.ReadLayerAsync(DataFormatType.GEOJSON, "data.geojson");
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
###
|
|
31
|
+
### 写出
|
|
32
32
|
|
|
33
33
|
```csharp
|
|
34
34
|
OguLayerUtil.WriteLayer(
|
|
@@ -44,7 +44,7 @@ OguLayerUtil.WriteLayer(
|
|
|
44
44
|
await OguLayerUtil.WriteLayerAsync(DataFormatType.SHP, layer, "output.shp");
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
###
|
|
47
|
+
### 格式转换
|
|
48
48
|
|
|
49
49
|
```csharp
|
|
50
50
|
OguLayerUtil.ConvertFormat(
|
|
@@ -59,13 +59,13 @@ await OguLayerUtil.ConvertFormatAsync(
|
|
|
59
59
|
);
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
###
|
|
62
|
+
### 工具
|
|
63
63
|
|
|
64
64
|
```csharp
|
|
65
65
|
IList<string> names = OguLayerUtil.GetLayerNames(DataFormatType.FILEGDB, "data.gdb");
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
###
|
|
68
|
+
### 支持的格式 ↔ 驱动
|
|
69
69
|
|
|
70
70
|
| DataFormatType | Driver Name | Extension |
|
|
71
71
|
|---|---|---|
|
|
@@ -80,7 +80,7 @@ IList<string> names = OguLayerUtil.GetLayerNames(DataFormatType.FILEGDB, "data.g
|
|
|
80
80
|
|
|
81
81
|
---
|
|
82
82
|
|
|
83
|
-
##
|
|
83
|
+
## 几何运算 — GeometryUtil
|
|
84
84
|
|
|
85
85
|
```csharp
|
|
86
86
|
using OpenGIS.Utils.Geometry;
|
|
@@ -88,7 +88,7 @@ using OpenGIS.Utils.Geometry;
|
|
|
88
88
|
|
|
89
89
|
All methods are `public static`.
|
|
90
90
|
|
|
91
|
-
###
|
|
91
|
+
### 几何格式转换
|
|
92
92
|
|
|
93
93
|
```csharp
|
|
94
94
|
OgrGeometry geom = GeometryUtil.Wkt2Geometry(string wkt);
|
|
@@ -99,7 +99,7 @@ string geojson = GeometryUtil.Geometry2Geojson(OgrGeometry geom);
|
|
|
99
99
|
|
|
100
100
|
> **Note:** `Geojson2Wkt(string)` and `Geojson2Geometry(string)` parse GeoJSON strings (bare geometry, `Feature`, or `FeatureCollection` — the first feature's geometry is used) through the GDAL GeoJSON driver. Unparseable input, or input without a geometry, raises `ArgumentException`. For whole files use `GdalReader` or `OguLayerUtil.ReadLayer(DataFormatType.GEOJSON, path)`.
|
|
101
101
|
|
|
102
|
-
###
|
|
102
|
+
### 空间关系(OgrGeometry)
|
|
103
103
|
|
|
104
104
|
```csharp
|
|
105
105
|
bool GeometryUtil.Intersects(OgrGeometry a, OgrGeometry b)
|
|
@@ -111,14 +111,14 @@ bool GeometryUtil.Overlaps(OgrGeometry a, OgrGeometry b)
|
|
|
111
111
|
bool GeometryUtil.Disjoint(OgrGeometry a, OgrGeometry b)
|
|
112
112
|
```
|
|
113
113
|
|
|
114
|
-
###
|
|
114
|
+
### 空间关系(WKT 便捷方法)
|
|
115
115
|
|
|
116
116
|
```csharp
|
|
117
117
|
bool GeometryUtil.IntersectsWkt(string wktA, string wktB)
|
|
118
118
|
bool GeometryUtil.ContainsWkt(string wktA, string wktB)
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
###
|
|
121
|
+
### 空间分析(OgrGeometry)
|
|
122
122
|
|
|
123
123
|
```csharp
|
|
124
124
|
OgrGeometry GeometryUtil.Buffer(OgrGeometry geom, double distance)
|
|
@@ -129,7 +129,7 @@ OgrGeometry GeometryUtil.Difference(OgrGeometry a, OgrGeometry b)
|
|
|
129
129
|
OgrGeometry GeometryUtil.SymDifference(OgrGeometry a, OgrGeometry b)
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
###
|
|
132
|
+
### 空间分析(WKT 便捷方法)
|
|
133
133
|
|
|
134
134
|
```csharp
|
|
135
135
|
string GeometryUtil.BufferWkt(string wkt, double distance)
|
|
@@ -137,7 +137,7 @@ string GeometryUtil.IntersectionWkt(string wktA, string wktB)
|
|
|
137
137
|
string GeometryUtil.UnionWkt(IEnumerable<string> wktList)
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
###
|
|
140
|
+
### 几何属性
|
|
141
141
|
|
|
142
142
|
```csharp
|
|
143
143
|
double GeometryUtil.Area(OgrGeometry geom)
|
|
@@ -150,7 +150,7 @@ GeometryType GeometryUtil.GetGeometryType(OgrGeometry geom)
|
|
|
150
150
|
bool GeometryUtil.IsEmpty(OgrGeometry geom)
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
-
###
|
|
153
|
+
### 几何属性(WKT 便捷方法)
|
|
154
154
|
|
|
155
155
|
```csharp
|
|
156
156
|
double GeometryUtil.AreaWkt(string wkt)
|
|
@@ -158,7 +158,7 @@ double GeometryUtil.LengthWkt(string wkt)
|
|
|
158
158
|
string GeometryUtil.CentroidWkt(string wkt)
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
-
###
|
|
161
|
+
### 几何操作
|
|
162
162
|
|
|
163
163
|
```csharp
|
|
164
164
|
OgrGeometry GeometryUtil.Boundary(OgrGeometry geom)
|
|
@@ -169,14 +169,14 @@ OgrGeometry GeometryUtil.Densify(OgrGeometry geom, double distanceTolerance)
|
|
|
169
169
|
string GeometryUtil.SimplifyWkt(string wkt, double tolerance)
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
###
|
|
172
|
+
### 拓扑校验
|
|
173
173
|
|
|
174
174
|
```csharp
|
|
175
175
|
TopologyValidationResult GeometryUtil.IsValid(OgrGeometry geom)
|
|
176
176
|
SimpleGeometryResult GeometryUtil.IsSimple(OgrGeometry geom)
|
|
177
177
|
```
|
|
178
178
|
|
|
179
|
-
###
|
|
179
|
+
### 相等与距离
|
|
180
180
|
|
|
181
181
|
```csharp
|
|
182
182
|
bool GeometryUtil.EqualsExact(OgrGeometry a, OgrGeometry b)
|
|
@@ -188,7 +188,7 @@ bool GeometryUtil.IsWithinDistance(OgrGeometry a, OgrGeometry b, double maxDis
|
|
|
188
188
|
|
|
189
189
|
---
|
|
190
190
|
|
|
191
|
-
##
|
|
191
|
+
## 坐标参考系 — CrsUtil
|
|
192
192
|
|
|
193
193
|
```csharp
|
|
194
194
|
using OpenGIS.Utils.Engine.Util;
|
|
@@ -216,7 +216,7 @@ bool CrsUtil.IsProjectedCRS(int wkid) // Is projected CRS?
|
|
|
216
216
|
|
|
217
217
|
---
|
|
218
218
|
|
|
219
|
-
## Shapefile
|
|
219
|
+
## Shapefile 工具 — ShpUtil
|
|
220
220
|
|
|
221
221
|
```csharp
|
|
222
222
|
using OpenGIS.Utils.Engine.Util;
|
|
@@ -233,7 +233,7 @@ void ShpUtil.RepairShapefile(string shpPath)
|
|
|
233
233
|
|
|
234
234
|
---
|
|
235
235
|
|
|
236
|
-
## PostGIS
|
|
236
|
+
## PostGIS 工具 — PostgisUtil
|
|
237
237
|
|
|
238
238
|
```csharp
|
|
239
239
|
using OpenGIS.Utils.Engine.Util;
|
|
@@ -248,7 +248,7 @@ void PostgisUtil.CreateSpatialIndex(string connectionString, string tableNam
|
|
|
248
248
|
|
|
249
249
|
---
|
|
250
250
|
|
|
251
|
-
##
|
|
251
|
+
## 国土调查 TXT 格式 — GtTxtUtil
|
|
252
252
|
|
|
253
253
|
```csharp
|
|
254
254
|
using OpenGIS.Utils.DataSource;
|
|
@@ -263,7 +263,7 @@ string GtTxtUtil.FormatTxtLine(OguCoordinate coordinate, int zoneNumber)
|
|
|
263
263
|
|
|
264
264
|
---
|
|
265
265
|
|
|
266
|
-
## GDAL
|
|
266
|
+
## GDAL 配置
|
|
267
267
|
|
|
268
268
|
```csharp
|
|
269
269
|
using OpenGIS.Utils.Configuration;
|
|
@@ -277,7 +277,7 @@ IList<string> GdalConfiguration.GetSupportedDrivers()
|
|
|
277
277
|
bool GdalConfiguration.IsDriverAvailable(string driverName)
|
|
278
278
|
```
|
|
279
279
|
|
|
280
|
-
### LibrarySettings
|
|
280
|
+
### LibrarySettings(全局默认值)
|
|
281
281
|
|
|
282
282
|
| Property | Type | Default | Description |
|
|
283
283
|
|---|---|---|---|
|
|
@@ -288,4 +288,3 @@ bool GdalConfiguration.IsDriverAvailable(string driverName)
|
|
|
288
288
|
| `UseGdalExceptions` | `bool` | `true` | GDAL exception mode |
|
|
289
289
|
|
|
290
290
|
---
|
|
291
|
-
|
|
@@ -21,7 +21,7 @@ tags:
|
|
|
21
21
|
>
|
|
22
22
|
> **示例:** <https://openlayers.org/en/latest/examples/>
|
|
23
23
|
>
|
|
24
|
-
> **最新版本:** 10.11.0(截至2026-10,npm `ol`)
|
|
24
|
+
> **最新版本:** 10.11.0(截至 2026-10,npm `ol`)
|
|
25
25
|
>
|
|
26
26
|
> **许可证:** BSD-2-Clause
|
|
27
27
|
|
|
@@ -226,12 +226,70 @@ new VectorLayer({ source: clusterSource, style: clusterStyleFn });
|
|
|
226
226
|
|
|
227
227
|
## 典型工作流
|
|
228
228
|
|
|
229
|
-
|
|
229
|
+
以「底图 + GeoJSON 行政区 + 绘制编辑」为例,输入 `public/data/districts.geojson`,输出可浏览、可勾绘的面图层页面。
|
|
230
|
+
|
|
231
|
+
1. **创建 Map**:`new Map({ target, layers, view })` → `new View({ center: fromLonLat([116.39, 39.9]), zoom: 10 })`
|
|
230
232
|
2. **添加底图**:`TileLayer` + `OSM`/`XYZ`/`TileWMS` Source
|
|
231
|
-
3. **加载矢量数据**:`VectorLayer` + `VectorSource` + `GeoJSON
|
|
232
|
-
4.
|
|
233
|
+
3. **加载矢量数据**:`VectorLayer` + `VectorSource` + `GeoJSON` Format
|
|
234
|
+
4. **应用样式**:`layer.setStyle(fn)` 按属性动态渲染(不设样式矢量图层不渲染)
|
|
233
235
|
5. **添加交互**:`Draw`/`Modify`/`Select`/`Snap` Interaction
|
|
234
|
-
6.
|
|
236
|
+
6. **导出结果**:`geojson.writeFeatures(source.getFeatures())` 落盘
|
|
237
|
+
7. **性能优化**:`declutter` 避让标注、`renderMode: 'image'` 静态图层
|
|
238
|
+
|
|
239
|
+
```js
|
|
240
|
+
import Map from 'ol/Map.js';
|
|
241
|
+
import View from 'ol/View.js';
|
|
242
|
+
import TileLayer from 'ol/layer/Tile.js';
|
|
243
|
+
import OSM from 'ol/source/OSM.js';
|
|
244
|
+
import VectorLayer from 'ol/layer/Vector.js';
|
|
245
|
+
import VectorSource from 'ol/source/Vector.js';
|
|
246
|
+
import GeoJSON from 'ol/format/GeoJSON.js';
|
|
247
|
+
import { fromLonLat } from 'ol/proj.js';
|
|
248
|
+
import { Style, Fill, Stroke, Text } from 'ol/style.js';
|
|
249
|
+
import Draw from 'ol/interaction/Draw.js';
|
|
250
|
+
|
|
251
|
+
// 显式 dataProjection / featureProjection,避免 4326 数据直接落在 3857 视图上偏移
|
|
252
|
+
const geojson = new GeoJSON({
|
|
253
|
+
dataProjection: 'EPSG:4326',
|
|
254
|
+
featureProjection: 'EPSG:3857'
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
const vectorLayer = new VectorLayer({
|
|
258
|
+
source: new VectorSource({
|
|
259
|
+
url: '/data/districts.geojson',
|
|
260
|
+
format: geojson
|
|
261
|
+
}),
|
|
262
|
+
style: (feature) => new Style({
|
|
263
|
+
fill: new Fill({ color: 'rgba(70,130,180,0.25)' }),
|
|
264
|
+
stroke: new Stroke({ color: '#4682b4', width: 1.5 }),
|
|
265
|
+
text: new Text({
|
|
266
|
+
text: feature.get('name'),
|
|
267
|
+
font: '12px sans-serif',
|
|
268
|
+
overflow: true
|
|
269
|
+
})
|
|
270
|
+
})
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
const map = new Map({
|
|
274
|
+
target: 'map',
|
|
275
|
+
layers: [new TileLayer({ source: new OSM() }), vectorLayer],
|
|
276
|
+
view: new View({ center: fromLonLat([116.39, 39.9]), zoom: 9 })
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
// 直接在同一个矢量图层上绘制;画完把全部要素序列化回 EPSG:4326
|
|
280
|
+
const drawSource = vectorLayer.getSource();
|
|
281
|
+
map.addInteraction(new Draw({ source: drawSource, type: 'Polygon' }));
|
|
282
|
+
|
|
283
|
+
drawSource.on('addfeature', () => {
|
|
284
|
+
const text = geojson.writeFeatures(drawSource.getFeatures(), {
|
|
285
|
+
dataProjection: 'EPSG:4326',
|
|
286
|
+
featureProjection: 'EPSG:3857'
|
|
287
|
+
});
|
|
288
|
+
console.log(text); // 可直接提交给后端保存
|
|
289
|
+
});
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**验证产物**:`npm run build` 后打开页面,底图与行政区面同时显示;再画一个多边形,控制台应输出对应 GeoJSON(坐标已转回 EPSG:4326)。
|
|
235
293
|
|
|
236
294
|
---
|
|
237
295
|
|
|
@@ -259,12 +317,11 @@ new VectorLayer({ source: clusterSource, style: clusterStyleFn });
|
|
|
259
317
|
|
|
260
318
|
---
|
|
261
319
|
|
|
262
|
-
##
|
|
320
|
+
## AI 使用建议
|
|
263
321
|
|
|
264
|
-
-
|
|
265
|
-
- **执行环境**:`npm install`、`npm run build` 交给 `pwsh`;Windows 下 `npm` 是 `npm.cmd`,长构建用后台作业并把输出落盘再读。
|
|
322
|
+
- **执行环境**:`npm install`、`npm run build` 在终端中执行;Windows 下 `npm` 是 `npm.cmd`,长构建放后台运行并把输出落盘再读。
|
|
266
323
|
- **先探测版本**:`npm ls ol`(未装则 `npm view ol version`);本技能按 10.11.0 编写,只使用 `ol/Map.js`、`ol/layer/Tile.js` 等 ESM 子路径,旧版 `ol.source.*` 全量命名空间写法不要混用。
|
|
267
|
-
- **验证产物**:`npm run build` 后用 `npx serve dist`(或 `python -m http.server 5173 -d dist`)起静态服务,`curl.exe -I http://localhost:5173/` 与打包出的 `assets/*.js` 应为 200;
|
|
324
|
+
- **验证产物**:`npm run build` 后用 `npx serve dist`(或 `python -m http.server 5173 -d dist`)起静态服务,`curl.exe -I http://localhost:5173/` 与打包出的 `assets/*.js` 应为 200;AI 助手通常看不到浏览器画面,请用户看页面与控制台,环境支持读图时用截图核对。
|
|
268
325
|
- **投影**:经纬度必须 `fromLonLat()` 转 EPSG:3857,自定义投影先 `register(proj4)`;否则中心点偏移或图层不显示。
|
|
269
326
|
- **图层样式**:矢量图层不设样式默认不渲染,务必 `setStyle()`;MVT 源要用 `MVT({ featureClass: Feature })` 才能保留属性。
|
|
270
327
|
- **常见症状**:WMS 空白先查 CORS、`LAYERS` 全名与 `SRS`;`ol/...` 模块找不到说明打包器没按 ESM 解析;容器尺寸变化后调用 `map.updateSize()`。
|
package/assets/pdal/SKILL.md
CHANGED
|
@@ -17,7 +17,9 @@ tags:
|
|
|
17
17
|
>
|
|
18
18
|
> **官方文档:** <https://pdal.io/>
|
|
19
19
|
>
|
|
20
|
-
>
|
|
20
|
+
> **Conda:** `pdal` / `python-pdal`(conda-forge,最新 2.10.2,截至 2026-10)
|
|
21
|
+
>
|
|
22
|
+
> **PyPI:** `pdal`(Python 绑定,最新 3.5.5,截至 2026-10;版本号与主库独立)
|
|
21
23
|
>
|
|
22
24
|
> **许可证:** BSD-3-Clause
|
|
23
25
|
|
|
@@ -66,9 +68,11 @@ pip install PDAL # 依赖系统已安装 PDAL 库(提供 pdal-config)
|
|
|
66
68
|
### 验证安装
|
|
67
69
|
|
|
68
70
|
```bash
|
|
69
|
-
pdal --version # 输出如
|
|
71
|
+
pdal --version # 输出如 PDAL 2.10.2 (…)
|
|
72
|
+
pdal --help # 列出全部子命令(info/translate/pipeline/…)
|
|
70
73
|
pdal --drivers # 列出可用的 readers/filters/writers
|
|
71
|
-
pdal --options filters.smrf # 查看某个
|
|
74
|
+
pdal --options filters.smrf # 查看某个 driver 的参数与默认值
|
|
75
|
+
pdal info --help # 查看单个子命令的参数
|
|
72
76
|
```
|
|
73
77
|
|
|
74
78
|
## 核心 API/命令
|
|
@@ -309,7 +313,7 @@ for las_file in glob.glob("tiles/*.las"):
|
|
|
309
313
|
- 重投影后用 writer 的 `scale_*/offset_* = "auto"`,防止坐标精度截断
|
|
310
314
|
- 输出统一用 LAZ(`compression: "true"`)减小体积,GDAL/QGIS 可直接读取
|
|
311
315
|
- 用 `tag` + `inputs` 构建分支与合并(filters.merge),tag 必须先定义
|
|
312
|
-
- `pdal ground`
|
|
316
|
+
- `pdal ground` 自 2.6.0 标记 DEPRECATED,2.7 从默认安装移除、2.8 完全移除;一律改用 `filters.smrf` 的 pipeline 写法
|
|
313
317
|
- SMRF 参数需按数据调整:window 参考最大建筑物尺寸,slope/threshold 可参考 SMRF 论文的参数组合
|
|
314
318
|
|
|
315
319
|
## 常见问题
|
|
@@ -324,13 +328,16 @@ for las_file in glob.glob("tiles/*.las"):
|
|
|
324
328
|
| writers.gdal 输出了多波段 | 默认 `output_type: "all"`,指定 `mean` 或 `idw` 等单值即可输出单波段 |
|
|
325
329
|
| 重投影后坐标精度变差 | 在 writer 中设置 `scale_x/y/z` 与 `offset_x/y/z: "auto"` |
|
|
326
330
|
| 地面分类效果不佳 | 调整 smrf 的 window/slope/threshold/scalar,先检查数据坐标系与高程单位 |
|
|
331
|
+
| 报 `Couldn't create <cls> stage of type '<type>'.` | stage 名拼错或该版本没有此 stage:先 `pdal --drivers` 确认存在,再核对 `readers.*`/`filters.*`/`writers.*` 前缀 |
|
|
327
332
|
|
|
328
|
-
##
|
|
333
|
+
## AI 使用建议
|
|
329
334
|
|
|
330
|
-
-
|
|
331
|
-
-
|
|
332
|
-
-
|
|
333
|
-
-
|
|
335
|
+
- **执行环境**:命令在终端 / shell 中执行(Windows 用 PowerShell)。正文的 `sudo apt`、`conda activate` 是 Bash/Linux 写法,Windows 改用 OSGeo4W 或 conda;Docker 挂载写成 `docker run --rm -v "${PWD}:/data" -w /data pdal/pdal pdal pipeline pipeline.json`。
|
|
336
|
+
- **先探测版本**:`pdal --version`(应为 2.10.2)、`pdal --drivers`;`pdal ground` 自 2.6 起弃用,低版本缺少 `filters.expression` 等 stage,回答里要写明按哪个版本写。
|
|
337
|
+
- **验证产物**:`pdal info --summary out.laz` 核对 `num_points`、`bounds`、`srs`;DEM 用 `gdalinfo -json dem.tif` 核对波段数与范围;pipeline 先 `pdal pipeline --validate` 再实跑,不要只看退出码。
|
|
338
|
+
- **注意执行模式**:stream mode 不能跑 `filters.outlier`、`filters.smrf` 这类需要全局统计的 stage,大文件先按 tile 拆分;`writers.gdal` 默认 `output_type: "all"` 会输出多波段,单波段 DEM 要显式写 `idw`/`mean`。
|
|
339
|
+
- **Python 场景**:`pipeline.execute()` 返回处理的点数而不是数组,数据在 `pipeline.arrays`(NumPy 结构化数组);排查失败看 `pipeline.log`,不要只看异常栈。
|
|
340
|
+
- **安全与权限**:`pdal translate` 与各 writer 会覆盖同名输出,先确认目标文件名;`pdal pipeline --stdin` 和 Docker 挂载以调用者/容器用户写盘,Linux 下注意属主;安装 PDAL 或下载大点云前先征得用户同意。
|
|
334
341
|
|
|
335
342
|
## 相关技能
|
|
336
343
|
|
|
@@ -339,12 +346,9 @@ for las_file in glob.glob("tiles/*.las"):
|
|
|
339
346
|
- **geopandas** — Python 矢量数据处理:[../geopandas/SKILL.md](../geopandas/SKILL.md)
|
|
340
347
|
- **shapely** — 几何对象计算,与裁剪范围构造相关:[../shapely/SKILL.md](../shapely/SKILL.md)
|
|
341
348
|
|
|
342
|
-
##
|
|
349
|
+
## 参考资源
|
|
343
350
|
|
|
344
|
-
-
|
|
345
|
-
-
|
|
346
|
-
-
|
|
347
|
-
-
|
|
348
|
-
- **注意执行模式**:stream mode 不能跑 `filters.outlier`、`filters.smrf` 这类需要全局统计的 stage,大文件先按 tile 拆分;`writers.gdal` 默认 `output_type: "all"` 会输出多波段,单波段 DEM 要显式写 `idw`/`mean`。
|
|
349
|
-
- **Python 场景**:`pipeline.execute()` 返回处理的点数而不是数组,数据在 `pipeline.arrays`(NumPy 结构化数组);排查失败看 `pipeline.log`,不要只看异常栈。
|
|
350
|
-
- **安全与权限**:`pdal translate` 与各 writer 会覆盖同名输出,先确认目标文件名;`pdal pipeline --stdin` 和 Docker 挂载以调用者/容器用户写盘,Linux 下注意属主;安装 PDAL 或下载大点云前先征得用户同意。
|
|
351
|
+
- **官方文档:** <https://pdal.io/en/stable/> | [Pipeline](https://pdal.io/en/stable/pipeline.html) | [命令行应用](https://pdal.io/en/stable/apps/index.html) | [Stage 参考](https://pdal.io/en/stable/stages/stages.html) | [维度列表](https://pdal.io/en/stable/dimensions.html) | [Python 绑定](https://pdal.io/en/stable/python.html)
|
|
352
|
+
- **GitHub:** <https://github.com/PDAL/PDAL>
|
|
353
|
+
- **Docker 镜像:** <https://hub.docker.com/r/pdal/pdal>
|
|
354
|
+
- **示例数据:** <https://github.com/PDAL/data>
|
package/assets/postgis/SKILL.md
CHANGED
|
@@ -18,6 +18,8 @@ tags:
|
|
|
18
18
|
>
|
|
19
19
|
> **官方文档:** <https://postgis.net/docs/>
|
|
20
20
|
>
|
|
21
|
+
> **最新版本:** 3.6.4(截至 2026-10,[Releases](https://github.com/postgis/postgis/releases));3.7 系列已到 3.7.0rc3,尚未正式发布
|
|
22
|
+
>
|
|
21
23
|
> **许可证:** GPL-2.0+
|
|
22
24
|
|
|
23
25
|
## 概述
|
|
@@ -30,7 +32,7 @@ PostGIS 是基于 PostgreSQL 的开源空间数据库扩展,遵循 OGC Simple
|
|
|
30
32
|
- **坐标参考系**:内置 6000+ EPSG 投影,自动 ST_Transform
|
|
31
33
|
- **数据导入导出**:与 GDAL/ogr2ogr/shp2pgsql 无缝集成
|
|
32
34
|
|
|
33
|
-
**版本要求:** PostgreSQL 12–18 配合 PostGIS 3.x(最新稳定版 3.6.4;3.7 仍处 RC
|
|
35
|
+
**版本要求:** PostgreSQL 12–18 配合 PostGIS 3.x(最新稳定版 3.6.4;3.7 仍处 RC 阶段,候选版为 3.7.0rc3,截至 2026-10);GEOS ≥ 3.8(部分新算子需 GEOS ≥ 3.14)
|
|
34
36
|
|
|
35
37
|
---
|
|
36
38
|
|
|
@@ -191,14 +193,63 @@ SELECT ST_Clip(rast, geom, true) FROM dem, region WHERE region.id=1;
|
|
|
191
193
|
|
|
192
194
|
---
|
|
193
195
|
|
|
194
|
-
##
|
|
196
|
+
## 典型工作流:Shapefile 入 PostGIS → 空间连接 → 导出 GeoJSON
|
|
197
|
+
|
|
198
|
+
**输入**:`data/poi.shp`(点,EPSG:4326)、`data/districts.shp`(面,EPSG:4326)。
|
|
199
|
+
|
|
200
|
+
**步骤 1 —— 入库并建索引**(`shp2pgsql -I` 自动建 GiST 索引,`-s 4326` 指定 SRID):
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
shp2pgsql -s 4326 -I -W UTF-8 data/poi.shp public.poi \
|
|
204
|
+
| psql -d gisdb -v ON_ERROR_STOP=1
|
|
205
|
+
shp2pgsql -s 4326 -I -W UTF-8 data/districts.shp public.districts \
|
|
206
|
+
| psql -d gisdb -v ON_ERROR_STOP=1
|
|
207
|
+
psql -d gisdb -c "VACUUM ANALYZE poi, districts;"
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**步骤 2 —— 空间连接**(点落在哪个区;先用 `&&` 走索引再 `ST_Within` 精筛):
|
|
211
|
+
|
|
212
|
+
```sql
|
|
213
|
+
CREATE TABLE poi_with_district AS
|
|
214
|
+
SELECT p.id, p.name, d.name AS district, p.geom
|
|
215
|
+
FROM poi AS p
|
|
216
|
+
JOIN districts AS d
|
|
217
|
+
ON p.geom && d.geom -- 包围盒粗筛,走 GiST
|
|
218
|
+
AND ST_Within(p.geom, d.geom); -- 精确判断
|
|
219
|
+
|
|
220
|
+
CREATE INDEX ON poi_with_district USING GIST (geom);
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**步骤 3 —— 导出 GeoJSON**(`-t_srs EPSG:4326` 保证输出为经纬度):
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
ogr2ogr -f GeoJSON out/poi_with_district.geojson \
|
|
227
|
+
"PG:host=localhost dbname=gisdb user=postgres" poi_with_district \
|
|
228
|
+
-t_srs EPSG:4326
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**输出与验收**:
|
|
232
|
+
|
|
233
|
+
```sql
|
|
234
|
+
-- 落在区内的点数(INNER JOIN 会过滤掉区外的点,因此 <= POI 总数)
|
|
235
|
+
SELECT count(*) FROM poi_with_district;
|
|
236
|
+
|
|
237
|
+
-- 未匹配数 = POI 总数 - 已匹配数(差值即落在所有区之外的点)
|
|
238
|
+
SELECT (SELECT count(*) FROM poi)
|
|
239
|
+
- (SELECT count(*) FROM poi_with_district) AS unmatched;
|
|
240
|
+
|
|
241
|
+
-- SRID 应为 4326
|
|
242
|
+
SELECT ST_SRID(geom) FROM poi_with_district LIMIT 1;
|
|
243
|
+
|
|
244
|
+
-- 确认连接走 GiST:计划里应出现 poi_geom_idx 上的 Index/Bitmap Index Scan
|
|
245
|
+
EXPLAIN (ANALYZE, BUFFERS)
|
|
246
|
+
SELECT count(*) FROM poi AS p JOIN districts AS d
|
|
247
|
+
ON p.geom && d.geom AND ST_Within(p.geom, d.geom);
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
若两边 SRID 不一致,`&&` 会退化为逐行比较且可能报 `Operation on mixed SRID`;先 `ST_Transform` 统一到 4326 再入库。
|
|
195
251
|
|
|
196
|
-
|
|
197
|
-
2. **建表**:包含 `geometry(Point, 4326)` 或 `geography(Point, 4326)` 类型的几何列
|
|
198
|
-
3. **建索引**:`CREATE INDEX ON table USING GIST(geom)` —— 必建空间索引
|
|
199
|
-
4. **导入数据**:使用 `shp2pgsql`(Shapefile)、`ogr2ogr`(通用)、`raster2pgsql`(栅格)
|
|
200
|
-
5. **空间查询**:用 `&&` 先做包围盒粗筛(走 GiST 索引),再用 `ST_Within`/`ST_Intersects` 精筛
|
|
201
|
-
6. **验证结果**:`EXPLAIN ANALYZE` 查看查询计划,确认索引被使用
|
|
252
|
+
最后用 `ogrinfo -al -so out/poi_with_district.geojson` 核对要素数与字段,不要只凭 psql 的 `INSERT 0 n` 判定成功。
|
|
202
253
|
|
|
203
254
|
---
|
|
204
255
|
|
|
@@ -228,10 +279,9 @@ SELECT ST_Clip(rast, geom, true) FROM dem, region WHERE region.id=1;
|
|
|
228
279
|
|
|
229
280
|
---
|
|
230
281
|
|
|
231
|
-
##
|
|
282
|
+
## AI 使用建议
|
|
232
283
|
|
|
233
|
-
-
|
|
234
|
-
- **执行环境**:命令交给 dsh 的 `pwsh`(Windows 用 `psql.exe`,或 `docker exec -i pg psql -U postgres`);psql 元命令(`\d`、`\c`)用 `psql -c "\d poi"` 单条传入,别依赖交互式会话。
|
|
284
|
+
- **执行环境**:命令在终端 / shell 中执行(Windows 用 `psql.exe`,或 `docker exec -i pg psql -U postgres`);psql 元命令(`\d`、`\c`)用 `psql -c "\d poi"` 单条传入,别依赖交互式会话。
|
|
235
285
|
- **先探测版本**:`psql -c "SELECT version(), PostGIS_Full_Version();"` 核对 PostgreSQL、PostGIS 3.6.4 与 GEOS/PROJ;扩展缺失时先看 `SELECT * FROM pg_available_extensions WHERE name LIKE 'postgis%';`。
|
|
236
286
|
- **验证产物**:导入后别只看 `INSERT 0 n`,跑 `SELECT count(*), ST_SRID(geom), ST_IsValid(geom) FROM t GROUP BY 2,3;` 核对要素数、SRID 与无效几何;性能结论必须用 `EXPLAIN (ANALYZE, BUFFERS)` 证明索引被使用。
|
|
237
287
|
- **写操作回读**:`CREATE/ALTER`、`UpdateGeometrySRID` 或批量 `UPDATE` 后回读 `\d+ t` 与 `geometry_columns`,确认列类型与 SRID 真的落库。
|
package/assets/proj/SKILL.md
CHANGED
|
@@ -20,7 +20,7 @@ tags:
|
|
|
20
20
|
>
|
|
21
21
|
> **命令行文档:** <https://proj.org/en/stable/apps/index.html>
|
|
22
22
|
>
|
|
23
|
-
> **最新版本:** 9.9.0(截至 2026-10
|
|
23
|
+
> **最新版本:** 9.9.0(截至 2026-10)
|
|
24
24
|
>
|
|
25
25
|
> **许可证:** MIT
|
|
26
26
|
|
|
@@ -147,15 +147,17 @@ projinfo --dump-db-structure
|
|
|
147
147
|
### cs2cs — 坐标系转换
|
|
148
148
|
|
|
149
149
|
```bash
|
|
150
|
-
# EPSG 代码:WGS 84 经纬度 → UTM
|
|
150
|
+
# EPSG 代码:WGS 84 经纬度 → UTM 32N(EPSG:4326 轴序为纬度在前,故 56 是纬度、12 是经度)
|
|
151
151
|
echo 56 12 | cs2cs EPSG:4326 EPSG:25832
|
|
152
152
|
|
|
153
|
-
#
|
|
154
|
-
cs2cs EPSG:4326 EPSG:32631 <<EOF
|
|
153
|
+
# 多行输入(45N 为纬度、2E 为经度)
|
|
154
|
+
cs2cs EPSG:4326 EPSG:32631 <<'EOF'
|
|
155
155
|
45N 2E
|
|
156
156
|
EOF
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
+
> **轴序要点:** 输入 `AUTHORITY:CODE` 或 WKT 时按该 CRS 定义的轴序解析,`EPSG:4326` 是纬度在前;用 `-r` 反转输入、`-s` 反转输出。下文示例一律先纬度后经度。
|
|
160
|
+
|
|
159
161
|
PROJ 字符串写法(`+to` 分隔源与目标):
|
|
160
162
|
|
|
161
163
|
```bash
|
|
@@ -242,8 +244,9 @@ projsync --list-files
|
|
|
242
244
|
### 模式 1:WGS 84 经纬度 → UTM / Web Mercator
|
|
243
245
|
|
|
244
246
|
```bash
|
|
245
|
-
|
|
246
|
-
echo 116.391
|
|
247
|
+
# 先纬度后经度:39.907 是纬度、116.391 是经度(北京)
|
|
248
|
+
echo 39.907 116.391 | cs2cs EPSG:4326 EPSG:32650 # 北京 → UTM 50N
|
|
249
|
+
echo 39.907 116.391 | cs2cs EPSG:4326 EPSG:3857 # → Web Mercator
|
|
247
250
|
```
|
|
248
251
|
|
|
249
252
|
### 模式 2:CGCS2000 中国坐标系操作
|
|
@@ -255,8 +258,8 @@ projinfo EPSG:4490
|
|
|
255
258
|
# 查询 3 度带高斯-克吕格投影(114E 中央经线,即 38 带)
|
|
256
259
|
projinfo EPSG:4547
|
|
257
260
|
|
|
258
|
-
# WGS 84 经纬度 → CGCS2000 3
|
|
259
|
-
echo 114.0
|
|
261
|
+
# WGS 84 经纬度 → CGCS2000 3 度带投影(30.5N 114.0E,纬度在前)
|
|
262
|
+
echo 30.5 114.0 | cs2cs EPSG:4326 EPSG:4547
|
|
260
263
|
```
|
|
261
264
|
|
|
262
265
|
### 模式 3:查找并确认转换路径
|
|
@@ -266,17 +269,15 @@ echo 114.0 30.5 | cs2cs EPSG:4326 EPSG:4547
|
|
|
266
269
|
projinfo -s EPSG:4326 -t EPSG:4547 --summary
|
|
267
270
|
|
|
268
271
|
# 再用 cs2cs 执行,必要时强制使用最佳转换
|
|
269
|
-
echo 114.0
|
|
272
|
+
echo 30.5 114.0 | cs2cs EPSG:4326 EPSG:4547 --only-best
|
|
270
273
|
```
|
|
271
274
|
|
|
272
275
|
### 模式 4:批量转换坐标文本
|
|
273
276
|
|
|
274
277
|
```bash
|
|
275
278
|
#!/bin/bash
|
|
276
|
-
# 输入文件每行 "lon
|
|
277
|
-
|
|
278
|
-
echo "$lat $lon" | cs2cs EPSG:4326 EPSG:3857
|
|
279
|
-
done < points.txt > points_3857.txt
|
|
279
|
+
# 输入文件每行 "lat lon"(纬度在前,与 EPSG:4326 轴序一致)
|
|
280
|
+
cs2cs EPSG:4326 EPSG:3857 points.txt > points_3857.txt
|
|
280
281
|
```
|
|
281
282
|
|
|
282
283
|
### 模式 5:为缺失网格下载数据
|
|
@@ -285,7 +286,7 @@ done < points.txt > points_3857.txt
|
|
|
285
286
|
# 按目标区域下载转换网格后执行高精度转换
|
|
286
287
|
projsync --bbox 73,18,135,54
|
|
287
288
|
export PROJ_NETWORK=ON
|
|
288
|
-
echo 116.391
|
|
289
|
+
echo 39.907 116.391 | cs2cs EPSG:4326 EPSG:4547 --only-best
|
|
289
290
|
```
|
|
290
291
|
|
|
291
292
|
---
|
|
@@ -316,15 +317,14 @@ echo 116.391 39.907 | cs2cs EPSG:4326 EPSG:4547 --only-best
|
|
|
316
317
|
|
|
317
318
|
---
|
|
318
319
|
|
|
319
|
-
##
|
|
320
|
+
## AI 使用建议
|
|
320
321
|
|
|
321
|
-
-
|
|
322
|
-
-
|
|
323
|
-
-
|
|
324
|
-
-
|
|
325
|
-
-
|
|
326
|
-
|
|
327
|
-
---
|
|
322
|
+
- **执行环境**:命令在终端 / shell 中执行(Windows 用 PowerShell)。正文的 `export PROJ_DATA=...` 在 PowerShell 写作 `$env:PROJ_DATA = "C:\OSGeo4W\share\proj"`;heredoc(`<<EOF`)在 PowerShell 中不可用,改用管道 `"56 12" | cs2cs EPSG:4326 EPSG:25832` 或先把输入写成文件再重定向。
|
|
323
|
+
- **先探测版本**:`projinfo --version`(同时打印 `proj.db` 路径)、`projinfo --searchpaths`;本技能按 PROJ 9.9.0 编写,低于 9.1 用 `PROJ_LIB` 而非 `PROJ_DATA`,低于 9.3 的 `proj` 不能直接接受 `EPSG:xxxx`。
|
|
324
|
+
- **验证转换**:用已知点对拍——`echo "39.907 116.391" | cs2cs EPSG:4326 EPSG:32650` 应得到东坐标约 44 万、北坐标约 442 万,量级不对通常是轴序或单位问题;结构化核对用 `projinfo -o PROJJSON -q EPSG:4326`,转换路径用 `projinfo -s A -t B --summary` 看候选操作与精度。
|
|
325
|
+
- **轴序与降级**:`EPSG:4326` 纬度在前(输入先 lat 后 lon),`proj` 命令内部经度在前要用 `-r`;高精度转换加 `--only-best`,否则缺网格时会静默退回精度更低的操作。
|
|
326
|
+
- **大输出处理**:`projinfo EPSG:4326` 的 WKT 有上百行,重定向到文件再分段读取;批量转换把 `cs2cs EPSG:4326 EPSG:3857 points.txt` 一次跑完,不要逐行起进程。
|
|
327
|
+
- **安全与权限**:`projsync --all` 会从 CDN 下载数 GB 网格、`PROJ_NETWORK=ON` 也会联网,先确认网络与磁盘;`sqlite3 proj.db` 只做只读查询,不要写库;改 `PROJ_DATA` 会影响同机 GDAL/PostGIS,先征得用户同意。
|
|
328
328
|
|
|
329
329
|
## 相关技能
|
|
330
330
|
|
|
@@ -335,12 +335,10 @@ echo 116.391 39.907 | cs2cs EPSG:4326 EPSG:4547 --only-best
|
|
|
335
335
|
|
|
336
336
|
---
|
|
337
337
|
|
|
338
|
-
##
|
|
338
|
+
## 参考资源
|
|
339
339
|
|
|
340
|
-
-
|
|
341
|
-
-
|
|
342
|
-
-
|
|
343
|
-
-
|
|
344
|
-
-
|
|
345
|
-
- **大输出处理**:`projinfo EPSG:4326` 的 WKT 有上百行,重定向到文件再分段 `read`;批量转换把 `cs2cs EPSG:4326 EPSG:3857 points.txt` 一次跑完,不要逐行起进程。
|
|
346
|
-
- **安全与权限**:`projsync --all` 会从 CDN 下载数 GB 网格、`PROJ_NETWORK=ON` 也会联网,先确认网络与磁盘;`sqlite3 proj.db` 只做只读查询,不要写库;改 `PROJ_DATA` 会影响同机 GDAL/PostGIS,先征得用户同意。
|
|
340
|
+
- **官方文档:** <https://proj.org/> | [命令行工具](https://proj.org/en/stable/apps/index.html) | [快速上手](https://proj.org/en/stable/usage/quickstart.html) | [资源文件与 proj.db](https://proj.org/en/stable/resource_files.html)
|
|
341
|
+
- **工具手册:** [projinfo](https://proj.org/en/stable/apps/projinfo.html) | [cs2cs](https://proj.org/en/stable/apps/cs2cs.html) | [proj](https://proj.org/en/stable/apps/proj.html) | [projsync](https://proj.org/en/stable/apps/projsync.html)
|
|
342
|
+
- **转换原理:** <https://proj.org/en/stable/operations/operations_computation.html>
|
|
343
|
+
- **EPSG 代码查询:** <https://epsg.io/>
|
|
344
|
+
- **源码仓库:** <https://github.com/OSGeo/PROJ>
|