fix: default complex junction crosswalks

This commit is contained in:
que01 committed 2026-09-11 12:40:46 +08:00
1 parent 3575e372bd
commit 376427d270
4 files changed
+7 -11

No files matched your search

@@ -16,7 +16,7 @@
| A3 | 通过(可行结构);分隔核心按规则拒绝 | 入口环有限、闭合、正面积、无自交;必要连接、孔洞和排除区回归;共享接缝实测误差 ≤1 cm,并覆盖人为 2 m 损坏检测。 |
| A4 | 通过 | `test/e2e/workbench.spec.ts` 的 12 项浏览器回归覆盖三臂结构和真实五臂工作台的位姿、方向、左右边界、过渡长度、撤销、保存、重编译、刷新。 |
| A5 | 通过 | solver/manifest 共用可行域;越界、来源长度不足、拓扑变化和 409 均返回明确诊断或重检状态,不静默截断。 |
| A6 | 通过 | 来源 crossing 节点才生成复杂斑马线;无来源标记 `unknown-no-crossing-source` 并省略;已知排除区和步行连接保留 provenance。 |
| A6 | 通过 | 复杂路口在有效进口铺装上默认生成斑马线;有来源 crossing 节点时保留来源 provenance,无来源时标记 `unknown-no-crossing-source`。简单路口继续使用原有设施路径。已知排除区和步行连接保留 provenance。 |
| A7 | 通过 | 工作台 API/E2E 验证预览、保存、409 重试、撤销重做、刷新回放和版本保护。 |
| A8 | 部分通过,待用户视觉确认 | 未调参真实 OSM 的纯效果和调试效果已刷新;原始三组图片只作定性观察,未配准不作为几何真值。 |
+1 -2
View File
@@ -250,11 +250,10 @@ function buildComplexJunctionGeometry(model, cluster, helpers) {
`crossing:${arm.key}`,
arm.members.flatMap((item) => item.approach.roadIds.map(String)),
'complex-junction-crossing-source-missing',
'该进口未找到匹配的 OSM 过街节点,过街状态未知,未生成斑马线。',
'该进口未找到匹配的 OSM 过街节点,过街来源未知,按复杂路口默认生成斑马线。',
envelope.center,
),
);
continue;
}
arm.crosswalkFrame = {
center: envelope.center,
+3 -6
View File
@@ -424,14 +424,11 @@ assert.equal(
assert.ok(complexGeometry.diagnostics.some((item) => item.rule === 'complex-junction-corner-facilities-omitted'));
assert.equal(
complexGeometry.crosswalks.features.some((feature) => feature.properties?.kind === 'complex-crosswalk'),
false,
'complex approaches without source crossing evidence must not synthesize zebra crossings',
true,
'complex approaches default to zebra crossings when pavement is available',
);
assert.ok(complexGeometry.diagnostics.some((item) => item.rule === 'complex-junction-crossing-source-missing'));
assert.match(
complexGeometry.diagnostics.find((item) => item.rule === 'complex-junction-generated').message,
/0 组斑马线/,
);
assert.match(complexGeometry.diagnostics.find((item) => item.rule === 'complex-junction-generated').message, /斑马线/);
const inferredStopLine = complexGeometry.vehicleStopLines.features.find(
(feature) => feature.properties?.kind === 'complex-stop-line',
);
+2 -2
View File
@@ -262,8 +262,8 @@ const unsourcedPreview = editPreview(unsourcedComplexArea, {
});
assert.equal(
unsourcedPreview.layers.crosswalks.features.some((feature) => feature.properties.kind === 'complex-crosswalk'),
false,
'the default fixture must not synthesize complex crossings without source evidence',
true,
'complex junctions default to crossings when pavement is available',
);
for (const response of [unsourcedState, unsourcedPreview])
assert.equal(