fix: render complex core above corner fills
This commit is contained in:
1 parent
df39237829
commit
f356e8e99c
1 file changed
+4
-2
@@ -567,8 +567,9 @@ function buildComplexJunctionGeometry(model, cluster, helpers) {
|
|||||||
const coreClosure = buildCoreClosure(topology, boundaryGraph, center);
|
const coreClosure = buildCoreClosure(topology, boundaryGraph, center);
|
||||||
const coreRing = coreClosure.status === 'supported' ? coreClosure.ring : null;
|
const coreRing = coreClosure.status === 'supported' ? coreClosure.ring : null;
|
||||||
const features = [];
|
const features = [];
|
||||||
|
let coreFeature = null;
|
||||||
if (coreRing)
|
if (coreRing)
|
||||||
features.push({
|
coreFeature = {
|
||||||
type: 'Feature',
|
type: 'Feature',
|
||||||
properties: {
|
properties: {
|
||||||
native_id: `complex-junction:${cluster.id}:core`,
|
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',
|
provenance: 'native-road-complex-junction/v7-shared-entry-core',
|
||||||
},
|
},
|
||||||
geometry: { type: 'Polygon', coordinates: [coreRing, ...(coreClosure.holes || [])] },
|
geometry: { type: 'Polygon', coordinates: [coreRing, ...(coreClosure.holes || [])] },
|
||||||
});
|
};
|
||||||
if (coreRing && coreClosure.maxSharedSeamErrorMeters > 0.01) {
|
if (coreRing && coreClosure.maxSharedSeamErrorMeters > 0.01) {
|
||||||
cornerDiagnostics.push(
|
cornerDiagnostics.push(
|
||||||
helpers.diagnostic(
|
helpers.diagnostic(
|
||||||
@@ -656,6 +657,7 @@ function buildComplexJunctionGeometry(model, cluster, helpers) {
|
|||||||
// Corner fills come last so they overlay the rectangular carriageway ends
|
// Corner fills come last so they overlay the rectangular carriageway ends
|
||||||
// they are smoothing; they never replace an OSM-derived road surface.
|
// they are smoothing; they never replace an OSM-derived road surface.
|
||||||
features.push(...cornerFills);
|
features.push(...cornerFills);
|
||||||
|
if (coreFeature) features.push(coreFeature);
|
||||||
// `coreRadiusMeters` is only consulted when there is no reference geometry.
|
// `coreRadiusMeters` is only consulted when there is no reference geometry.
|
||||||
// Under calibration the radius comes from the reference span, so a configured
|
// Under calibration the radius comes from the reference span, so a configured
|
||||||
// value that silently does nothing has to be reported, not swallowed.
|
// value that silently does nothing has to be reported, not swallowed.
|
||||||
|
|||||||
Reference in new issue
Block a user