feat: restore inferred corner islands
This commit is contained in:
1 parent
f356e8e99c
commit
de97600fe8
1 file changed
+19
@@ -445,6 +445,25 @@ function buildComplexJunctionGeometry(model, cluster, helpers) {
|
|||||||
},
|
},
|
||||||
geometry: { type: 'Polygon', coordinates: [ring] },
|
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 (
|
if (
|
||||||
!first.members.every((item) => publishedCarriageways.has(item.key)) ||
|
!first.members.every((item) => publishedCarriageways.has(item.key)) ||
|
||||||
|
|||||||
Reference in new issue
Block a user