upper_ace = {
const ace = structuredClone(upper);
let f = ace.features;
ace.features = f.filter(
(d) => !["ONDA", "ISRAEL_AA", "UKSATSE"].includes(d.properties.code)
);
ace.features.forEach((d) => {
d.properties.id = +d.properties.id;
d.properties.airac_cfmu = +d.properties.airac_cfmu;
});
for (let i = 0; i < factsheets.length; i++) {
ace.features.forEach((d) => {
if (d.properties.id == 45) {
}
if (+d.properties.id == factsheets[i].ansp_id) {
d.properties = { ...d.properties, ...factsheets[i] };
d.properties.logo =
"https://ansperformance.eu/images/ansp/logo/" +
d.properties.code.toLowerCase().replace(/\s+/g, "_") +
".png";
d.properties.pdf =
"https://www.eurocontrol.int/ACE/ANSP-Factsheets/" +
d.properties.name +
".pdf";
if (d.properties.reve_revenue === "NA") {
d.properties.reve_revenue = 0;
}
}
});
}
return ace;
}