add filter by date, and RNB conversion

This commit is contained in:
Tykayn 2025-03-13 11:51:47 +01:00 committed by tykayn
parent 97f818a29e
commit 11c272c582
8 changed files with 100 additions and 3 deletions

View file

@ -130,6 +130,24 @@ export default class {
return newList;
}
filterListOfPointsByExcludingIfColumnBeforeSomeYear(year: number, column:string, list_of_points: any[]): any[] {
let newList: any[] = []
list_of_points.forEach((geojsonPoint: any) => {
let pointProperties = Object.keys(geojsonPoint.properties)
// trouver la valeur
// on inclut les points dont la date de création est de l'année demandée ou supérieure
if (pointProperties.includes(column) &&
(geojsonPoint.properties[column].substring(0,4) * 1) >= year
) {
newList.push(geojsonPoint)
}
})
return newList;
}
filterListOfPointsByExcludingIfMaxPowerIsLesserThan(minValue: number, list_of_points: any[]): any[] {
let newList: any[] = []
list_of_points.forEach((geojsonPoint: any) => {