Files
CM95/docs/CM95_Bathymetry独立PBF_v1.md

200 lines
3.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CM95 Bathymetry 独立 PBF v1
日期:2026-10-01
## 1. 目的
本阶段新增一套与现有 CM95 基础 PBF 完全独立的 bathymetry PBF。
客户端需要显示等深线时增加第二个 vector source;关闭等深线时可以不加载该 source。
现有基础 PBF 的 schema、tile 和发布生命周期不因本 build 改变。
本 PBF 中的等深线属于 NavSea/本项目自行生产的派生参考数据,不视为 CM95 原始等深线、官方水路资料或安全航行依据。
## 2. 首批 build
Build ID:
```text
cm95-bathymetry-north-kyushu-v1
```
范围:
```text
W 129.7
S 33.1
E 130.6
N 33.8
```
对应北九州、唐津—福冈附近的首批验证区域。
生成配置:
```text
config/bathymetry/cm95_bathymetry_north_kyushu_v1.yaml
```
生成器:
```text
tools/cm95_bathymetry_build_v1.py
```
本地生成目录(build/ 被 Git 忽略):
```text
build/bathymetry/cm95-bathymetry-north-kyushu-v1/
```
目录内包含:
```text
build_manifest.json
tilejson.json
contours.geojson
pbf/{z}/{x}/{y}.pbf
```
## 3. 输入与生成规则
首批 build 只使用 Dataset ID=1 的 SOUNDG sounding points 作为连续水深面的数值输入。
为避免低分辨率点拉坏近岸插值,当前只使用:
```text
native_scale <= 100000
```
同坐标存在重复 sounding 时取较浅值。
生成流程:
```text
SOUNDG sounding points
-> Web Mercator
-> Delaunay / TIN
-> 丢弃最大边 > 4000m 的三角形
-> 三角形内线性等值线
-> DEPARE + DRGARE 水域 union 裁剪
-> 区域级合并/简化
-> 按 XYZ tile 切片
-> MVT/PBF
```
首批 contour levels:
```text
2m / 5m / 10m / 20m / 30m / 50m
```
先生成区域连续线,再切 tile;不得每个 tile 独立插值,以避免 tile seam。
## 4. PBF contract
独立 source-layer:
```text
bathymetry_contour
```
每个 LineString feature 至少包含:
```text
depth_m
source_kind = derived_sounding_tin
reliability = reference_low
build_id = cm95-bathymetry-north-kyushu-v1
```
首批 zoom:
```text
z8-z12
extent = 4096
```
粗 zoom 中亚像素短线可能被 MVT encoder 丢弃。生成器不把这种情况静默处理:
实际 drop 数写入 `build_manifest.json`,并以 decode 后实际 feature 数作为 build 真值。
## 5. 首批结果
输入:
```text
raw sounding rows 10035
unique sounding points 10028
duplicate rows 7
water area rows 1884
```
TIN:
```text
triangles total 20028
accepted 19773
rejected long edge 255
```
PBF:
```text
tiles 93
actual feature instances 15529
encoder dropped 76
total bytes 612694
```
其中 encoder drop 主要集中在 z8 的亚像素短线。
全量解码审计结果:
```text
tiles 93 / manifest 93
features 15529 / manifest 15529
geometry types: LineString 15529
bad layers: 0
bad depth values: 0
bad properties: 0
AUDIT PASS
```
## 6. 本地测试
测试页:
```text
web/bathymetry_test.html
```
测试 server:
```text
web/bathymetry_test_server.py
```
启动:
```powershell
python web\bathymetry_test_server.py --host 0.0.0.0 --port 18890
```
浏览:
```text
http://127.0.0.1:18890/
```
测试页使用在线 GSI raster 作为普通背景,只加载这一套新的 bathymetry vector source,因此不依赖现有 CM95 大 build。
## 7. 当前边界
本 v1 只验证“独立 bathymetry PBF”生产链可行,不代表全国参数已经冻结。
当前参数仍需通过实际海图目视检查决定是否调整,重点包括:
- 4000m 最大 TIN 边长是否过大或过小;
- 2/5/10/20/30/50m 层级是否合适;
- 岛屿、港池和狭窄水道附近是否存在不合理跨越;
- DEPARE/DRGARE 水域 mask 是否存在局部缺口;
- z8-z12 的简化强度是否合适;
- 是否需要在后续 build 引入额外约束数据。
在这些项目通过人工检查前,`reliability=reference_low` 必须保持不变。