diff --git a/index.html b/index.html
index 8d10978..7a7b2d4 100644
--- a/index.html
+++ b/index.html
@@ -118,10 +118,10 @@
-
+
- 3 kW
+ 1 kW
diff --git a/js/lcm_config.js b/js/lcm_config.js
index 8d1e416..55d3c48 100644
--- a/js/lcm_config.js
+++ b/js/lcm_config.js
@@ -43,6 +43,7 @@ const lcm_config = {
transport: 'https://a.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png'
},
tags_to_display_in_popup: [
+ 'charge',
'description',
'name',
'access',
@@ -56,7 +57,11 @@ const lcm_config = {
'socket:type2_combo',
'socket:type2_combo:output',
'socket:chademo',
- 'operator', 'ref:EU:EVSE',
+ 'operator',
+ 'opening_hours',
+ 'maxstay',
+ 'maxheight',
+ 'ref:EU:EVSE',
'network',
'opening_hours',
'contact',
diff --git a/make_stats.js b/make_stats.js
index 187b883..e1cce92 100644
--- a/make_stats.js
+++ b/make_stats.js
@@ -1,7 +1,7 @@
-
import fs from 'fs';
import fetch from 'node-fetch';
import * as cheerio from 'cheerio';
+import lcm_config from './js/lcm_config.js';
let stats = {};
@@ -46,6 +46,8 @@ async function compterFeaturesInOpenDataEtalab() {
let count_nb_pdc_ok = 0;
let unique_id_station_itinerance = []
let count_id_station_itinerance_duplicate = 0;
+
+
geojson.features.forEach(feature => {
if (feature.properties.id_station_itinerance) {
if (!unique_id_station_itinerance.includes(feature.properties.id_station_itinerance)) {
@@ -64,6 +66,7 @@ async function compterFeaturesInOpenDataEtalab() {
}
count_capacity += nbre_pdc;
}
+ ;
});
// Créer l'objet de statistiques
stats = {
@@ -74,7 +77,7 @@ async function compterFeaturesInOpenDataEtalab() {
count_nb_pdc_okOpenData: count_nb_pdc_ok,
count_id_station_itinerance_duplicate: count_id_station_itinerance_duplicate,
count_unique_id_station_itinerance: unique_id_station_itinerance.length,
- dateGeneration: new Date().toISOString()
+ dateGeneration: new Date().toISOString(),
};
@@ -156,20 +159,36 @@ function compterFeaturesInOpenStreetMapFromFile() {
const nombreFeaturesInOSM = data.elements.length;
let countPointsDeChargeOSM = 0;
+
+ // Initialiser le compteur pour chaque tag
+ let tagsCountOSM = {};
+ lcm_config.tags_to_display_in_popup.forEach(tag => {
+ tagsCountOSM[tag] = 0;
+ });
+
data.elements.forEach(element => {
- if (element.type === 'node' && element.tags.capacity) {
+ if (element.type === 'node' && element.tags && element.tags.capacity) {
let capa = parseInt(element.tags.capacity)
if (isNaN(capa)) {
capa = 1;
}
countPointsDeChargeOSM += capa;
}
+ // Compter les tags présents
+ if (element.tags) {
+ lcm_config.tags_to_display_in_popup.forEach(tag => {
+ if (element.tags[tag] !== undefined && element.tags[tag] !== null && element.tags[tag] !== "") {
+ tagsCountOSM[tag]++;
+ }
+ });
+ }
});
stats = {
...stats,
countStationsOSM: nombreFeaturesInOSM,
- countPointsDeChargeOSM: countPointsDeChargeOSM
+ countPointsDeChargeOSM: countPointsDeChargeOSM,
+ tagsCountOSM
};
} catch (erreur) {
console.error('Erreur lors du traitement du fichier OSM:', erreur.message);
diff --git a/nohup.out b/nohup.out
deleted file mode 100644
index 1f110d8..0000000
--- a/nohup.out
+++ /dev/null
@@ -1 +0,0 @@
-bash: /home/cipherbliss/Téléchargements/WebStorm-232.10335.13/bin/bin/webstorm.sh: Aucun fichier ou dossier de ce nom