feat(junction): project sourced islands
This commit is contained in:
1 parent
cd3a9c9613
commit
0e162d1f43
3 files changed
+67
-1
No files matched your search
@@ -536,7 +536,33 @@ function buildComplexJunctionGeometry(model, cluster, helpers) {
|
||||
),
|
||||
]
|
||||
: [];
|
||||
const allFeatures = [...features, ...islands, ...sidewalkCorners, ...crosswalks, ...stopLines];
|
||||
const knownIslandFeatures = (model.exclusionRegions || [])
|
||||
.filter(
|
||||
(region) =>
|
||||
Array.isArray(region.ring) &&
|
||||
region.ring.length >= 4 &&
|
||||
region.ring.some((point) => helpers.distanceMeters(point, center) <= outerRadius + 12),
|
||||
)
|
||||
.map((region) => ({
|
||||
type: 'Feature',
|
||||
properties: {
|
||||
native_id: `osm-traffic-island:${region.id}`,
|
||||
object_key: `island:osm/${region.id}`,
|
||||
kind: 'island',
|
||||
osm_way_ids: String(region.id),
|
||||
source: region.source,
|
||||
facility_evidence: 'source-osm-region',
|
||||
},
|
||||
geometry: { type: 'Polygon', coordinates: [region.ring] },
|
||||
}));
|
||||
const allFeatures = [
|
||||
...features,
|
||||
...islands,
|
||||
...sidewalkCorners,
|
||||
...crosswalks,
|
||||
...stopLines,
|
||||
...knownIslandFeatures,
|
||||
];
|
||||
const structure = structureFromTopology(topology, shape, center, allFeatures);
|
||||
for (const feature of allFeatures) {
|
||||
feature.properties.junction_key = structure.junctionKey;
|
||||
|
||||
Reference in new issue
Block a user