mapping-geojson-osm/mappings/converters/configIRVE_osmose.ts
2023-10-07 22:51:54 +02:00

97 lines
3.5 KiB
TypeScript

/**
* 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 MappingIRVEOsmose: MappingConfigType = {
config_name: "IRVE config for Osmose IRVE items",
config_author: "tykayn <contact@cipherbliss.com>",
default_properties_of_point: {
'amenity': 'charging_station'
},
source: {
geojson_path: "etalab_data/all.json",
url: 'https://osmose.openstreetmap.fr/api/0.3/issues.geojson?full=true&status=open&item=8410&limit=20000'
},
/**
* 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
// properties: {
// consolidated_code_postal: '^[76|27]'
// },
// bounding_box: [
// {}
// ]
},
add_not_mapped_tags_too: false,
tags: {
// ******* nombres
// ******* textes
amenity: 'amenity', // conserver le tag de base
capacity: 'capacity', // conserver le tag de base
'owner:ref:FR:SIREN': 'owner:ref:FR:SIREN',
operator: 'operator',
// telephone_operateur: {
// key_converted: 'operator:phone',
// convert_to_phone: true, // conversion en format international si possible
// },
'operator:phone': {
key_converted: 'operator:phone',
convert_to_phone: true, // conversion en format international si possible
},
'phone': {
key_converted: 'phone',
convert_to_phone: true, // conversion en format international si possible
},
'operator:email': 'operator:email', // ici, on souhaite convertir la clé contact_operateur=bidule en email=bidule
'ref:EU:EVSE': 'ref:EU:EVSE',
ref: '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.
*/
fee: 'fee',
'authentication': 'authentication',
'authentication:none': 'authentication:none',
// 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: 'reservation' ,
note: 'note',
fixme: 'fixme',
name: 'name',
network: 'network',
// ******* dates
start_date: 'start_date',
// ******** champs booléens
'socket:type2_cable':'socket:type2_cable' ,
'socket:typee': 'socket:typee',
'socket:type2': 'socket:type2',
'socket:type2_combo': 'socket:type2_combo',
'socket:chademo': 'socket:chademo',
// ******** champs plus complexes
opening_hours: 'opening_hours', // déjà au bon format
'payment:credit_cards': 'payment:credit_cards',
wheelchair: "wheelchair",
bicycle: "bicycle",
scooter: "scooter",
motorcar: "motorcar",
'socket:max:output': 'socket:max:output'
},
}
export default MappingIRVE;