mirror of
https://forge.chapril.org/tykayn/wololo
synced 2025-10-09 17:02:46 +02:00
add filter by date, and RNB conversion
This commit is contained in:
parent
97f818a29e
commit
11c272c582
8 changed files with 100 additions and 3 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue