feat: publish junction region connectivity metrics
This commit is contained in:
1 parent
3a8af43140
commit
2b79085042
5 files changed
+19
No files matched your search
@@ -369,6 +369,10 @@ then `structureFromTopology(topology, shape, center, features)`. Projection is
|
||||
- Complex road-surface features carry `junction_key`, `object_key` and relevant
|
||||
`arm_key`, `carriageway_key`, `corner_key`. Core (or the first remaining
|
||||
approach when the core fails) carries `junction_structure` for persisted reads.
|
||||
- A supported complex core publishes measurable region evidence:
|
||||
`connected_entry_count`, `required_pavement_connected`, `core_ring_area`,
|
||||
`core_ring_self_intersects`, and the existing shared-seam metrics. A contained
|
||||
exclusion hole is valid only when it preserves every required entry seam.
|
||||
- Stable keys derive from cluster and sorted source node/segment/road IDs, with
|
||||
corner keys derived from adjacent arms. Display indices and headings are not
|
||||
object identities. `topologyFingerprint` detects source topology changes.
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
- [ ] 审计 roadSurface、sidewalkSurface、edgeLines、lane/center markings 的每个裁切入口,确保消费同一计划。
|
||||
- [ ] 出口 A3:接缝≤1 cm,必要区域连通,无自交与排除区侵占;自动测试验证实际几何,不只是参数回显。
|
||||
- 已验证:3~6 臂核心环闭合、正面积、无自交、共享内边邻接;maxSharedSeamErrorMeters 已测量核心与入口内边端点的实际米制误差,尚不等同于全图层接缝测量;入口 ring 闭合/有限/正面积;短过渡、零长度边、零宽度和排除区相切均有失败回归。
|
||||
- 连通性现作为构建产物显式发布:`connectedEntryCount`、`requiredPavementConnected`、`ringArea` 和 `ringSelfIntersects`;安全孔洞回归验证孔洞保留时全部入口仍与核心相连。
|
||||
- 待完成:凹形/多区域/孔洞、全图层连通性和统一接缝误差测量。
|
||||
- [ ] 此阶段不通过,不开启新几何控件。
|
||||
|
||||
|
||||
@@ -529,6 +529,10 @@ function buildComplexJunctionGeometry(model, cluster, helpers) {
|
||||
closure_count: coreClosure.closureCount,
|
||||
shared_seam_error_m: coreClosure.maxSharedSeamErrorMeters,
|
||||
shared_seam_errors: coreClosure.sharedSeamErrors,
|
||||
connected_entry_count: coreClosure.connectedEntryCount,
|
||||
required_pavement_connected: coreClosure.requiredPavementConnected,
|
||||
core_ring_area: coreClosure.ringArea,
|
||||
core_ring_self_intersects: coreClosure.ringSelfIntersects,
|
||||
exclusion_hole_count: (coreClosure.holes || []).length,
|
||||
region_status: coreClosure.holes?.length ? 'supported-with-holes' : 'supported',
|
||||
provenance: 'native-road-complex-junction/v7-shared-entry-core',
|
||||
|
||||
@@ -287,12 +287,17 @@ function buildCoreClosure(topology, graph, center) {
|
||||
return { carriagewayKey: section.carriagewayKey, errorMeters: Math.min(forward, reverse) };
|
||||
});
|
||||
const seamErrorMeters = seamErrors.reduce((maximum, item) => Math.max(maximum, item.errorMeters), 0);
|
||||
const connectedEntryCount = seamErrors.filter((item) => Number.isFinite(item.errorMeters)).length;
|
||||
return {
|
||||
status: 'supported',
|
||||
ring,
|
||||
holes,
|
||||
ringArea: Math.abs(signedArea(ring)) / 2,
|
||||
ringSelfIntersects: false,
|
||||
sharedEdgeRefs: [...pairedEdges.keys()].sort(),
|
||||
closureCount: graph.sections.length,
|
||||
connectedEntryCount,
|
||||
requiredPavementConnected: connectedEntryCount === graph.sections.length,
|
||||
maxSharedSeamErrorMeters: seamErrorMeters,
|
||||
sharedSeamErrors: seamErrors,
|
||||
};
|
||||
|
||||
@@ -172,6 +172,10 @@ for (const [field, value] of [
|
||||
}
|
||||
assert.equal(teeCore.status, 'supported');
|
||||
assert.equal(teeCore.sharedEdgeRefs.length, teeBoundaryGraph.sections.length);
|
||||
assert.equal(teeCore.connectedEntryCount, teeBoundaryGraph.sections.length);
|
||||
assert.equal(teeCore.requiredPavementConnected, true);
|
||||
assert.equal(teeCore.ringSelfIntersects, false);
|
||||
assert.ok(teeCore.ringArea > 0);
|
||||
assert.ok(teeCore.ring.every((coordinate) => coordinate.every(Number.isFinite)));
|
||||
const safeHole = buildJunctionBoundaryGraph(
|
||||
tee.topology,
|
||||
@@ -183,6 +187,7 @@ const safeHole = buildJunctionBoundaryGraph(
|
||||
const holedCore = buildCoreClosure(tee.topology, safeHole, point(0, 0));
|
||||
assert.equal(holedCore.status, 'supported');
|
||||
assert.equal(holedCore.holes.length, 1);
|
||||
assert.equal(holedCore.requiredPavementConnected, true, 'a contained hole must preserve every required entry seam');
|
||||
const exclusionRing = [point(-1, -1), point(1, -1), point(1, 1), point(-1, 1), point(-1, -1)];
|
||||
const teeWithIsland = buildJunctionBoundaryGraph(
|
||||
tee.topology,
|
||||
|
||||
Reference in new issue
Block a user