diff --git a/src/compile/complex-junction.js b/src/compile/complex-junction.js index ecb67cf..68d6b24 100644 --- a/src/compile/complex-junction.js +++ b/src/compile/complex-junction.js @@ -445,6 +445,25 @@ function buildComplexJunctionGeometry(model, cluster, helpers) { }, geometry: { type: 'Polygon', coordinates: [ring] }, }); + const islandRadius = 3.5; + const islandCenter = helpers.offsetCoordinate(apex, bisector, Math.min(3.5, Math.max(1.5, apexReach * 0.2))); + const islandRing = [0, 90, 180, 270, 360].map((angle) => + helpers.offsetCoordinate(islandCenter, bisector + angle, islandRadius), + ); + if (!cornerOverlapsExclusion(islandRing, first.cornerKey, '安全岛')) + islands.push({ + type: 'Feature', + properties: { + native_id: `complex-corner-island:${cluster.id}:${index + 1}`, + object_key: `island:inferred/${first.cornerKey}`, + cluster_id: cluster.id, + kind: 'island', + corner_key: first.cornerKey, + facility_evidence: 'inferred-complex-junction-corner', + provenance: 'native-road-complex-junction-inferred-island/v1', + }, + geometry: { type: 'Polygon', coordinates: [islandRing] }, + }); if ( !first.members.every((item) => publishedCarriageways.has(item.key)) ||