chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2024-08-23 13:13:41 +02:00
parent 18e977db2a
commit 22a7a14880
111 changed files with 25070 additions and 1612 deletions

View file

@ -148,16 +148,19 @@ export class RasterLayerUtils {
ignoreLayer?: RasterLayerPolygon,
skipLayers: number = 0
): RasterLayerPolygon {
const inCategory = available.filter(l => l.properties.category === preferredCategory)
const best : RasterLayerPolygon[] = inCategory.filter(l => l.properties.best)
const others : RasterLayerPolygon[] = inCategory.filter(l => !l.properties.best)
const inCategory = available.filter((l) => l.properties.category === preferredCategory)
const best: RasterLayerPolygon[] = inCategory.filter((l) => l.properties.best)
const others: RasterLayerPolygon[] = inCategory.filter((l) => !l.properties.best)
let all = best.concat(others)
console.log("Selected layers are:", all.map(l => l.properties.id))
if(others.length > skipLayers){
console.log(
"Selected layers are:",
all.map((l) => l.properties.id)
)
if (others.length > skipLayers) {
all = all.slice(skipLayers)
}
return all.find(l => l !== ignoreLayer)
return all.find((l) => l !== ignoreLayer)
}
}