feat(junction): add reference geometry comparison layer

This commit is contained in:
que01 committed 2026-09-07 16:45:37 +08:00
1 parent 4519cad562
commit 92ab2edd96
11 files changed
+107 -5

No files matched your search

@@ -0,0 +1,2 @@
{"file":".trellis/spec/frontend/quality-guidelines.md","reason":"Run frontend quality gates."}
{"file":".trellis/spec/backend/direct-edit-api.md","reason":"Verify reference data does not alter save/preview contracts."}
@@ -0,0 +1,5 @@
# 技术设计
服务端继续在启动时调用 `readJunctionReference()`,将转换后的 GeoJSON 作为可选只读字段返回;不把参考 `properties.type` 投影为业务对象。客户端在 `MapCanvas` 图层工厂中新增独立 reference layer,使用 `state.junctionReference.converted` 更新,显示状态由 App 本地开关控制。
比较指标优先复用 `comparison.json` 和 `junctionReference` 已有字段;缺失时显示“暂无匹配”,不执行客户端空间推断。参考层只参与渲染,不进入 `EditSession`、preview 或 save payload。
@@ -0,0 +1,3 @@
{"file":".trellis/spec/frontend/quality-guidelines.md","reason":"Follow frontend component and validation conventions."}
{"file":".trellis/spec/frontend/direct-edit-client.md","reason":"Keep reference rendering outside edit baseline and preview ownership."}
{"file":".trellis/spec/guides/cross-layer-thinking-guide.md","reason":"Trace reference data without changing native output."}
@@ -0,0 +1,6 @@
# 实施清单
1. 扩展客户端图层类型和更新逻辑,接入参考 GeoJSON。
2. 在 App 增加参考层开关、透明度和状态摘要。
3. 增加参考层转换/缺失兼容测试或类型覆盖。
4. 运行完整质量门禁并归档阶段任务。
@@ -0,0 +1,18 @@
# JunctionTools Stage 4:参考几何对照
## 目标
将已有参考 GeoJSON 以只读叠加层接入工作台,展示原始/转换状态和空间比较指标,同时保证参考数据不会影响 native 编译、草稿或保存。
## 范围
- 复用 `convertGeoJson` 和现有 `junctionReference` 数据流。
- 客户端提供参考层显示开关和透明度控制。
- 状态提供来源、坐标系、转换状态及比较指标;关闭、缺失或匹配失败时安全降级。
## 验收标准
1. 参考层可显示/隐藏并调整透明度,不改变 native 图层和保存请求。
2. UI 显示参考来源、GCJ-02 到 WGS84 转换状态和 bbox/中心差异(若已有比较结果)。
3. 无参考文件、转换失败或无匹配时 native 输出和现有编辑流程保持不变。
4. 客户端类型检查、单测、构建、格式检查和后端回归通过。
@@ -0,0 +1,26 @@
{
"id": "junctiontools-stage4-reference-comparison",
"name": "junctiontools-stage4-reference-comparison",
"title": "JunctionTools Stage 4 参考几何对照",
"description": "",
"status": "in_progress",
"dev_type": null,
"scope": null,
"package": null,
"priority": "P2",
"creator": "dingkang",
"assignee": "dingkang",
"createdAt": "2026-09-07",
"completedAt": null,
"branch": null,
"base_branch": "main",
"worktree_path": null,
"commit": null,
"pr_url": null,
"subtasks": [],
"children": [],
"parent": null,
"relatedFiles": [],
"notes": "",
"meta": {}
}