2023-08-09 23:10:45 +02:00
|
|
|
/**
|
|
|
|
* plan de conversion des clés du jeu de données vers les tags OSM
|
|
|
|
* détail dans le tableau
|
|
|
|
* https://wiki.openstreetmap.org/wiki/France/data.gouv.fr/Bornes_de_Recharge_pour_V%C3%A9hicules_%C3%89lectriques
|
|
|
|
*/
|
|
|
|
import MappingConfigType from "../mapping-config.type";
|
|
|
|
|
|
|
|
const MappingIRVE: MappingConfigType = {
|
|
|
|
config_name: "IRVE config",
|
|
|
|
config_author: "tykayn <contact@cipherbliss.com>",
|
|
|
|
default_properties_of_point: {
|
|
|
|
'amenity': 'charging_station'
|
|
|
|
},
|
|
|
|
source: {
|
|
|
|
geojson_path: "etalab_data/all.json",
|
|
|
|
url: 'https://www.data.gouv.fr/fr/datasets/r/7eee8f09-5d1b-4f48-a304-5e99e8da1e26'
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* select only certain points from the source
|
|
|
|
*/
|
|
|
|
filters: {
|
|
|
|
enable_coordinates_filter: false,
|
|
|
|
enable_properties_filter: true,
|
|
|
|
// add only geojson points who are found having this regex in the zipcode properties
|
2023-10-07 22:51:54 +02:00
|
|
|
// properties: {
|
|
|
|
// consolidated_code_postal: '^[76|27]'
|
|
|
|
// },
|
|
|
|
// bounding_box: [
|
|
|
|
// {}
|
|
|
|
// ]
|
2023-08-09 23:10:45 +02:00
|
|
|
},
|
|
|
|
add_not_mapped_tags_too: false,
|
2024-07-08 11:27:27 +02:00
|
|
|
boolean_keys: [
|
|
|
|
"prise_type_ef",
|
|
|
|
"prise_type_2",
|
|
|
|
"prise_type_combo_ccs",
|
|
|
|
"prise_type_chademo",
|
|
|
|
"gratuit",
|
|
|
|
"paiement_acte",
|
|
|
|
"paiement_cb",
|
|
|
|
"cable_t2_attache"
|
|
|
|
],
|
2023-08-09 23:10:45 +02:00
|
|
|
tags: {
|
|
|
|
// ******* nombres
|
|
|
|
nbre_pdc: 'capacity',
|
|
|
|
// ******* textes
|
|
|
|
amenity: 'amenity', // conserver le tag de base
|
|
|
|
capacity: 'capacity', // conserver le tag de base
|
|
|
|
nom_amenageur: 'operator',
|
|
|
|
siren_amenageur: 'owner:ref:FR:SIREN',
|
|
|
|
nom_operateur: 'operator',
|
2023-08-18 11:25:02 +02:00
|
|
|
telephone_operateur: {
|
2023-10-06 11:35:08 +02:00
|
|
|
key_converted: 'operator:phone',
|
2023-08-30 11:19:06 +02:00
|
|
|
convert_to_phone: true, // conversion en format international si possible
|
2023-08-18 11:25:02 +02:00
|
|
|
},
|
2023-08-30 15:55:45 +02:00
|
|
|
phone: {
|
2023-10-06 11:35:08 +02:00
|
|
|
key_converted: 'operator:phone',
|
2023-08-30 15:55:45 +02:00
|
|
|
convert_to_phone: true, // conversion en format international si possible
|
|
|
|
},
|
2023-10-06 11:35:08 +02:00
|
|
|
contact_operateur: 'operator:email', // ici, on souhaite convertir la clé contact_operateur=bidule en email=bidule
|
2023-08-09 23:10:45 +02:00
|
|
|
|
2023-10-06 11:35:08 +02:00
|
|
|
id_station_itinerance: 'ref:EU:EVSE',
|
2023-08-09 23:10:45 +02:00
|
|
|
id_station_local: 'ref',
|
|
|
|
|
2023-10-01 12:53:08 +02:00
|
|
|
/**
|
|
|
|
* l'info de gratuité a été mal renseignée par les opérateurs, ils mettent TRÈS souvent que c'est gratuit alors que ce n'est pas vrai.
|
|
|
|
*/
|
2023-10-01 15:00:10 +02:00
|
|
|
gratuit: {
|
|
|
|
key_converted: 'fee',
|
|
|
|
convert_to_boolean_value: true,
|
|
|
|
invert_boolean_value: true,
|
|
|
|
},
|
2023-08-09 23:10:45 +02:00
|
|
|
paiement_acte:
|
|
|
|
{
|
|
|
|
key_converted: 'authentication:none',
|
|
|
|
convert_to_boolean_value: true, // convertit en yes ou no
|
|
|
|
},
|
|
|
|
reservation: {
|
|
|
|
convert_to_boolean_value: true, // convertit en yes ou no
|
|
|
|
},
|
|
|
|
// observations: 'note',
|
2023-10-10 10:53:38 +02:00
|
|
|
nom_station: 'description',
|
2023-08-09 23:10:45 +02:00
|
|
|
nom_enseigne: 'network',
|
|
|
|
|
|
|
|
// ******* dates
|
|
|
|
date_mise_en_service: 'start_date',
|
|
|
|
// date_maj: 'source:date',
|
|
|
|
|
|
|
|
|
|
|
|
// ******** champs booléens
|
2024-07-08 11:27:27 +02:00
|
|
|
cable_t2_attache: {
|
2024-10-07 23:26:43 +02:00
|
|
|
key_converted: 'socket:type2_cable',
|
|
|
|
// socket:type2_cable vaut 1 dans OSM si vrai
|
|
|
|
truthy_value: '1',
|
|
|
|
ignore_if_falsy: true,
|
|
|
|
}
|
2023-08-09 23:10:45 +02:00
|
|
|
,
|
|
|
|
prise_type_ef: {
|
|
|
|
key_converted: 'socket:typee',
|
|
|
|
ignore_if_falsy: true,
|
|
|
|
convert_to_boolean_value: true,
|
|
|
|
},
|
|
|
|
prise_type_2: {
|
|
|
|
key_converted: 'socket:type2',
|
|
|
|
ignore_if_falsy: true,
|
|
|
|
convert_to_boolean_value: true,
|
|
|
|
},
|
|
|
|
prise_type_combo_ccs: {
|
|
|
|
key_converted: 'socket:type2_combo',
|
|
|
|
ignore_if_falsy: true,
|
|
|
|
convert_to_boolean_value: true,
|
|
|
|
},
|
|
|
|
prise_type_chademo: {
|
|
|
|
key_converted: 'socket:chademo',
|
|
|
|
ignore_if_falsy: true,
|
|
|
|
convert_to_boolean_value: true,
|
|
|
|
},
|
|
|
|
// ******** champs plus complexes
|
2023-10-10 10:53:38 +02:00
|
|
|
horaires: 'opening_hours', // déjà au bon format, enfin, en général. vérifier avec le validateur josm.
|
2023-08-09 23:10:45 +02:00
|
|
|
paiement_cb: {
|
|
|
|
key_converted: 'payment:credit_cards',
|
|
|
|
// ignore_if_falsy: true,
|
|
|
|
convert_to_boolean_value: true,
|
|
|
|
},
|
2023-10-07 21:38:09 +02:00
|
|
|
accessibilite_pmr: {
|
2024-10-07 23:26:43 +02:00
|
|
|
key_converted: "wheelchair",
|
|
|
|
conditional_values: {
|
|
|
|
"Accessibilité inconnue": {
|
|
|
|
ignore_this_data: true, // ne pas ajouter de tag si la valeur est égale à Accessibilité inconnue.
|
|
|
|
},
|
|
|
|
"Accessible mais non réservé PMR": {
|
|
|
|
value_converted: "yes"
|
|
|
|
},
|
|
|
|
"Réservé PMR": {
|
|
|
|
value_converted: "yes"
|
|
|
|
},
|
|
|
|
"Non accessible": {
|
|
|
|
value_converted: "no"
|
|
|
|
},
|
|
|
|
"Mo-Fr 08:30-12:00,Mo-Fr 14:00-19:00,Sat 09:00-18:30": {
|
|
|
|
value_converted: "Mo-Fr 08:30-12:00,Mo-Fr 14:00-19:00,Sat 09:00-18:30"
|
|
|
|
},
|
|
|
|
// On précise que l'on veut conserver cette valeur, par défaut tout ce qui n'est pas précisé en valeur conditionnelle n'est pas conservé
|
|
|
|
"24/7": {
|
|
|
|
value_converted: "24/7"
|
|
|
|
}
|
|
|
|
},
|
2023-10-07 21:38:09 +02:00
|
|
|
},
|
2023-10-10 10:53:38 +02:00
|
|
|
station_deux_roues: {
|
|
|
|
remove_original_key: true,
|
|
|
|
conditional_values: {
|
|
|
|
// ajout de trois tags si la valeur est yes
|
|
|
|
"yes": {
|
|
|
|
tags_to_add: [
|
|
|
|
{bicycle: "yes"},
|
|
|
|
{scooter: "yes"},
|
|
|
|
{motorcar: "no"},
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2023-10-01 11:56:42 +02:00
|
|
|
puissance_nominale: {
|
2023-10-10 10:53:38 +02:00
|
|
|
key_converted: 'charging_station:output',
|
2023-10-01 12:53:08 +02:00
|
|
|
socket_output_find_correspondances: true,
|
2023-08-09 23:10:45 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
export default MappingIRVE;
|