feat(junction): publish sourced traffic islands
This commit is contained in:
1 parent
3bf2edaf99
commit
c14b8b09f2
2 files changed
+26
No files matched your search
@@ -854,6 +854,7 @@ function compileGeometry(model, overrides = { overrides: [] }, options = {}) {
|
||||
diagnostics,
|
||||
options,
|
||||
);
|
||||
junctionFeatures.push(...compileKnownIslandFeatures(model));
|
||||
validateConnectorContainment(connectorResult.features, junctionFeatures, diagnostics);
|
||||
return {
|
||||
roadSurface: { type: 'FeatureCollection', features },
|
||||
@@ -873,6 +874,21 @@ function compileGeometry(model, overrides = { overrides: [] }, options = {}) {
|
||||
};
|
||||
}
|
||||
|
||||
function compileKnownIslandFeatures(model) {
|
||||
return (model.exclusionRegions || []).map((region) => ({
|
||||
type: 'Feature',
|
||||
properties: {
|
||||
native_id: `osm-traffic-island:${region.id}`,
|
||||
kind: 'island',
|
||||
object_key: `island:osm/${region.id}`,
|
||||
osm_way_ids: String(region.id),
|
||||
source: region.source,
|
||||
provenance: 'native-road-osm-traffic-island/v1',
|
||||
},
|
||||
geometry: { type: 'Polygon', coordinates: [region.ring] },
|
||||
}));
|
||||
}
|
||||
|
||||
function modelWithDirectEditProfiles(model, directEdit) {
|
||||
if (!directEdit?.roadProfiles?.size && !directEdit?.junctionPlans?.size) return model;
|
||||
const approachWidths = new Map();
|
||||
|
||||
Reference in new issue
Block a user