mirror of
https://forge.chapril.org/tykayn/wololo
synced 2025-06-20 01:34:42 +02:00
réinit
This commit is contained in:
commit
996524bc6d
107 changed files with 1295536 additions and 0 deletions
175
mappings/converters/configIRVE.ts
Normal file
175
mappings/converters/configIRVE.ts
Normal file
|
@ -0,0 +1,175 @@
|
|||
/**
|
||||
* 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,
|
||||
filter_points_lesser_than_NkW: 22 // ne pas sortir les points qui ont moins de ce nombre de puissance nominale
|
||||
// add only geojson points who are found having this regex in the zipcode properties
|
||||
// properties: {
|
||||
// consolidated_code_postal: '^[76|27]'
|
||||
// },
|
||||
// bounding_box: [
|
||||
// {}
|
||||
// ]
|
||||
},
|
||||
add_not_mapped_tags_too: false,
|
||||
boolean_keys: [
|
||||
"prise_type_ef",
|
||||
"prise_type_2",
|
||||
"prise_type_combo_ccs",
|
||||
"prise_type_chademo",
|
||||
"gratuit",
|
||||
"paiement_acte",
|
||||
"paiement_cb",
|
||||
"cable_t2_attache"
|
||||
],
|
||||
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',
|
||||
telephone_operateur: {
|
||||
key_converted: 'operator:phone',
|
||||
convert_to_phone: true, // conversion en format international si possible
|
||||
},
|
||||
phone: {
|
||||
key_converted: 'operator:phone',
|
||||
convert_to_phone: true, // conversion en format international si possible
|
||||
},
|
||||
contact_operateur: 'operator:email', // ici, on souhaite convertir la clé contact_operateur=bidule en email=bidule
|
||||
|
||||
id_station_itinerance: {
|
||||
key_converted: 'ref:EU:EVSE',
|
||||
remove_stars: true,
|
||||
},
|
||||
|
||||
id_station_local: 'ref',
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
gratuit: {
|
||||
key_converted: 'fee',
|
||||
convert_to_boolean_value: true,
|
||||
invert_boolean_value: true,
|
||||
},
|
||||
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',
|
||||
nom_station: 'description',
|
||||
nom_enseigne: 'network',
|
||||
|
||||
// ******* dates
|
||||
date_mise_en_service: 'start_date',
|
||||
// date_maj: 'source:date',
|
||||
|
||||
|
||||
// ******** champs booléens
|
||||
cable_t2_attache: {
|
||||
key_converted: 'socket:type2_cable',
|
||||
// socket:type2_cable vaut 1 dans OSM si vrai
|
||||
truthy_value: '1',
|
||||
ignore_if_falsy: true,
|
||||
}
|
||||
,
|
||||
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
|
||||
horaires: 'opening_hours', // déjà au bon format, enfin, en général. vérifier avec le validateur josm.
|
||||
paiement_cb: {
|
||||
key_converted: 'payment:credit_cards',
|
||||
// ignore_if_falsy: true,
|
||||
convert_to_boolean_value: true,
|
||||
},
|
||||
accessibilite_pmr: {
|
||||
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"
|
||||
}
|
||||
},
|
||||
},
|
||||
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"},
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
puissance_nominale: {
|
||||
key_converted: 'charging_station:output',
|
||||
socket_output_find_correspondances: true,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export default MappingIRVE;
|
Loading…
Add table
Add a link
Reference in a new issue