feat: publish junction region connectivity metrics
This commit is contained in:
1 parent
3a8af43140
commit
2b79085042
5 files changed
+19
No files matched your search
@@ -529,6 +529,10 @@ function buildComplexJunctionGeometry(model, cluster, helpers) {
|
||||
closure_count: coreClosure.closureCount,
|
||||
shared_seam_error_m: coreClosure.maxSharedSeamErrorMeters,
|
||||
shared_seam_errors: coreClosure.sharedSeamErrors,
|
||||
connected_entry_count: coreClosure.connectedEntryCount,
|
||||
required_pavement_connected: coreClosure.requiredPavementConnected,
|
||||
core_ring_area: coreClosure.ringArea,
|
||||
core_ring_self_intersects: coreClosure.ringSelfIntersects,
|
||||
exclusion_hole_count: (coreClosure.holes || []).length,
|
||||
region_status: coreClosure.holes?.length ? 'supported-with-holes' : 'supported',
|
||||
provenance: 'native-road-complex-junction/v7-shared-entry-core',
|
||||
|
||||
@@ -287,12 +287,17 @@ function buildCoreClosure(topology, graph, center) {
|
||||
return { carriagewayKey: section.carriagewayKey, errorMeters: Math.min(forward, reverse) };
|
||||
});
|
||||
const seamErrorMeters = seamErrors.reduce((maximum, item) => Math.max(maximum, item.errorMeters), 0);
|
||||
const connectedEntryCount = seamErrors.filter((item) => Number.isFinite(item.errorMeters)).length;
|
||||
return {
|
||||
status: 'supported',
|
||||
ring,
|
||||
holes,
|
||||
ringArea: Math.abs(signedArea(ring)) / 2,
|
||||
ringSelfIntersects: false,
|
||||
sharedEdgeRefs: [...pairedEdges.keys()].sort(),
|
||||
closureCount: graph.sections.length,
|
||||
connectedEntryCount,
|
||||
requiredPavementConnected: connectedEntryCount === graph.sections.length,
|
||||
maxSharedSeamErrorMeters: seamErrorMeters,
|
||||
sharedSeamErrors: seamErrors,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user