feat(junction): classify complex junction shapes

This commit is contained in:
que01 committed 2026-09-07 10:52:12 +08:00
1 parent 38ea779d9b
commit a359f88edc
13 files changed
+440 -14

No files matched your search

+12
View File
@@ -245,6 +245,17 @@ function state(area, junctionReference = null, debug = false) {
};
const trafficRuntime = runtime(trafficSignals);
const compiled = readCompiled(area);
const junctionShapes = debug
? (readLayer(path.join(nativeDir, 'layers', 'road_surface.geojson')).features || [])
.filter((feature) => feature.properties?.kind === 'complex-core' && feature.properties?.cluster_id)
.map((feature) => ({
clusterId: String(feature.properties.cluster_id),
kind: String(feature.properties.shape_kind || 'unsupported'),
label: String(feature.properties.shape_label || '暂不支持的路口形态'),
armCount: Number(feature.properties.arm_count) || 0,
throughPairCount: Number(feature.properties.through_pair_count) || 0,
}))
: [];
return {
areaId: area.id,
activeRevisionId: revisionStore.active.activeRevisionId,
@@ -258,6 +269,7 @@ function state(area, junctionReference = null, debug = false) {
nodeIds: (cluster.nodeIds || []).map(String),
coreRadiusMeters: cluster.coreRadiusMeters,
})),
junctionShapes,
}
: null,
compiled,