diff --git a/src/compile/complex-junction.js b/src/compile/complex-junction.js index d804e1c..ecb67cf 100644 --- a/src/compile/complex-junction.js +++ b/src/compile/complex-junction.js @@ -567,8 +567,9 @@ function buildComplexJunctionGeometry(model, cluster, helpers) { const coreClosure = buildCoreClosure(topology, boundaryGraph, center); const coreRing = coreClosure.status === 'supported' ? coreClosure.ring : null; const features = []; + let coreFeature = null; if (coreRing) - features.push({ + coreFeature = { type: 'Feature', properties: { native_id: `complex-junction:${cluster.id}:core`, @@ -598,7 +599,7 @@ function buildComplexJunctionGeometry(model, cluster, helpers) { provenance: 'native-road-complex-junction/v7-shared-entry-core', }, geometry: { type: 'Polygon', coordinates: [coreRing, ...(coreClosure.holes || [])] }, - }); + }; if (coreRing && coreClosure.maxSharedSeamErrorMeters > 0.01) { cornerDiagnostics.push( helpers.diagnostic( @@ -656,6 +657,7 @@ function buildComplexJunctionGeometry(model, cluster, helpers) { // Corner fills come last so they overlay the rectangular carriageway ends // they are smoothing; they never replace an OSM-derived road surface. features.push(...cornerFills); + if (coreFeature) features.push(coreFeature); // `coreRadiusMeters` is only consulted when there is no reference geometry. // Under calibration the radius comes from the reference span, so a configured // value that silently does nothing has to be reported, not swallowed.