fix: clip complex junction lane separators
This commit is contained in:
1 parent
05614d1a69
commit
1842eb7d8c
8 files changed
+222
-3
No files matched your search
@@ -38,6 +38,20 @@ for (const ordered of [clusters, [...clusters].reverse()]) {
|
||||
const complexSeparators = geometry.laneSeparators.features.filter(
|
||||
(f) => f.properties.road_id === roadId && f.properties.provenance === 'native-road-complex-lane-separator/v1',
|
||||
);
|
||||
if (roadId === 'road:way/858770823:segment/2:forward') {
|
||||
const core = geometry.roadSurface.features.find(
|
||||
(feature) => feature.properties?.kind === 'complex-core' && feature.properties?.cluster_id === 'west',
|
||||
);
|
||||
if (core) {
|
||||
const clusterCenter = core.properties.center;
|
||||
const coreRadius = Number(core.properties.radius_m);
|
||||
for (const separator of complexSeparators)
|
||||
assert.ok(
|
||||
separator.geometry.coordinates[0].every((point) => meters(point, clusterCenter) >= coreRadius - 0.05),
|
||||
'complex separator must stop outside the calibrated west-cluster core',
|
||||
);
|
||||
}
|
||||
}
|
||||
for (const separator of complexSeparators) {
|
||||
assert.ok(
|
||||
separator.geometry.coordinates[0].every((p) => meters(p, midpoint) > 180),
|
||||
|
||||
Reference in new issue
Block a user