This commit is contained in:
Tykayn 2025-01-15 22:20:14 +01:00 committed by tykayn
commit 996524bc6d
107 changed files with 1295536 additions and 0 deletions

View file

@ -0,0 +1,116 @@
import MappingConfigType from "../mapping-config.type";
/**
* conversion des données concernant les arbres de la ville d'Echirolles
* lancement du script:
*
* ts-node convert_to_osm_tags.ts --source="etalab_data/abres/arbres_ech.json" --output-file="arbres-echirolles.geojson" --engine-config=MappingArbresEchirolles
*
* documentation sur les espèces d'arbres
* nom : item wikidata
* "Platanus acerifolia" Q24853030
* "Tilia cordata" Q158746
* "Liriodendron tulipifera" Q158783
*/
const MappingArbresEchirolles: MappingConfigType = {
// add_not_mapped_tags_too: false,
// source: undefined,
config_name: 'Mapping des arbres d\'Echirolles',
config_author: 'tykayn <contact+geojson2osm@cipherbliss.com>',
default_properties_of_point: {natural: 'tree', source : 'Échirolles Métropole'},
tags: {
// ******* booléens
// ******* nombres
// - ID_ARBRE : ref:FR:issy_les_mx:id_arbre identifiant interne à Issy les Moulineaux
"id_arbre": "ref:FR:Échirolles:id_arbre",
// ******* textes
"nom_latin": {
key_converted: "species",
conditional_values: {
"Platanus acerifolia": {'tags_to_add': {"species:wikidata": "Q24853030"}},
"Tilia cordata": {'tags_to_add': {"wikidata": "species:Q158746"}},
"Liriodendron tulipifera": {'tags_to_add': {"species:wikidata": "Q158783"}},
},
},
// - CADUC_PERS : leaf_cycle=evergreen pour persistant , deciduous pour caduque
// "caduc_pers": {
// conditional_values: {
// "Persistant ": {
// 'tags_to_add':{
// "leaf_cycle": "evergreen",
// }
// },
// "Caduc ": {
// 'tags_to_add':{
// "leaf_cycle": "deciduous",
// }
// },
// }
// },
// - FEUIL_CONI : feuillu leaf_type=broadleaved / connifère leaf_type=needleleaved
// "feuil_coni": {
// conditional_values: {
// "Feuillu ": {
// 'tags_to_add':{
// "leaf_type": "broadleaved",
// }
// },
// "Conifère ": {
// 'tags_to_add':{
// "leaf_type": "needleleaved",
// }
// },
// }
// },
// - PARTICULAR : Majeur, Remarquable : historic=monument
// "particular": {
// conditional_values: {
// "Majeur ": {
// 'tags_to_add':{
// "historic": "monument",
// },
// },
// "Remarquable ": {
//
// 'tags_to_add':{
// "historic": "monument",
// },
// },
// }
// },
// - FORME: tree_shape = curtain / free / half_free <= Architecturé, rideau / Libre / Semi-libre
// "forme": {
// key_converted: "tree_shape",
// conditional_values: {
// "Architecturé, rideau ": {
// 'tags_to_add':{
// "tree_shape": "curtain",
// },
// },
// "Semi-libre ": {
// 'tags_to_add':{
// "tree_shape": "half_free",
// },
// },
// "Libre ": {
// 'tags_to_add':{
// "tree_shape": "free",
// },
// },
// }
// },
},
add_not_mapped_tags_too: false,
source: {
geojson_path: 'https://data.issy.com/api/explore/v2.1/catalog/datasets/arbres-remarquables-issy-les-moulineaux/exports/geojson?lang=fr&timezone=Europe%2FBerlin',
url: 'https://www.data.gouv.fr/fr/datasets/arbres-remarquables'
},
filters: {
// offset:10
},
}
export default MappingArbresEchirolles

View file

@ -0,0 +1,51 @@
import MappingConfigType from "../mapping-config.type";
const MappingArbres92: MappingConfigType = {
config_name: 'Mapping des arbres d\'Issy les Moulineaux',
config_author: 'tykayn <contact+geojson2osm@cipherbliss.com>',
default_properties_of_point: {natural: 'tree'},
tags: {
// ******* booléens
// ******* nombres
// - ID_ARBRE : ref:FR:issy_les_mx:id_arbre identifiant interne à Issy les Moulineaux
"idelement_vert": "ref:FR:cadastre_vert:id_element_vert",
"type": "ref:FR:cadastre_vert:type",
// ******* textes
// ******* textes
// - HAUTEUR est_height=* hauteur estimée en intervalle de mètres
//"class_hauteur": "est_height",
// - VERNACULAIRE : species:FR=*
//"vernaculaire": "species:FR",
// https://wiki.openstreetmap.org/wiki/Key:circumference
"diametre": "circumference",// tour du tronc à hauteur de poitrine
// "diametre": {// tour du tronc à hauteur de poitrine
// key_converted: "circumference",
// conditional_values: {
// "0 m": {
// ignore_this_data: true,
// }
// }
// },
"circonference": "diameter_crown",// tour de toutes les branches, la couronne
// "circonference": {// tour de toutes les branches, la couronne
// key_converted: "diameter_crown",
// conditional_values: {
// "0 m": {
// ignore_this_data: true,
// }
// }
//
// },
},
add_not_mapped_tags_too: false,
source: {
geojson_path: 'https://opendata.hauts-de-seine.fr/api/explore/v2.1/catalog/datasets/cadastre-vert-les-arbres/exports/geojson?lang=fr&timezone=Europe%2FBerlin',
url: 'https://opendata.hauts-de-seine.fr/explore/dataset/cadastre-vert-les-arbres'
},
filters: {},
}
export default MappingArbres92

View file

@ -0,0 +1,103 @@
import MappingConfigType from "../mapping-config.type";
const MappingArbresIssy: MappingConfigType = {
config_name: 'Mapping des arbres d\'Issy les Moulineaux',
config_author: 'tykayn <contact+geojson2osm@cipherbliss.com>',
default_properties_of_point: {natural: 'tree'},
tags: {
// ******* booléens
// ******* nombres
// - ID_ARBRE : ref:FR:issy_les_mx:id_arbre identifiant interne à Issy les Moulineaux
"id_arbre": "ref:FR:issy_les_mx:id_arbre",
"ordre": "ref:FR:issy_les_mx:ordre_arbre",
// - AN_PLANT : date de plantation
"an_plan": "date_start",
// ******* textes
// - HAUTEUR est_height=* hauteur estimée en intervalle de mètres
"class_hauteur": "est_height",
// - VERNACULAIRE : species:FR=*
"vernaculaire": "species:FR",
// - GENESPVAR : nom d'espèce species=*
"genespvar": "species",
// - CADUC_PERS : leaf_cycle=evergreen pour persistant , deciduous pour caduque
"caduc_pers": {
conditional_values: {
"Persistant ": {
'tags_to_add':{
"leaf_cycle": "evergreen",
}
},
"Caduc ": {
'tags_to_add':{
"leaf_cycle": "deciduous",
}
},
}
},
// - FEUIL_CONI : feuillu leaf_type=broadleaved / connifère leaf_type=needleleaved
"feuil_coni": {
conditional_values: {
"Feuillu ": {
'tags_to_add':{
"leaf_type": "broadleaved",
}
},
"Conifère ": {
'tags_to_add':{
"leaf_type": "needleleaved",
}
},
}
},
// - PARTICULAR : Majeur, Remarquable : historic=monument
"particular": {
conditional_values: {
"Majeur ": {
'tags_to_add':{
"historic": "monument",
},
},
"Remarquable ": {
'tags_to_add':{
"historic": "monument",
},
},
}
},
// - FORME: tree_shape = curtain / free / half_free <= Architecturé, rideau / Libre / Semi-libre
"forme": {
key_converted: "tree_shape",
conditional_values: {
"Architecturé, rideau ": {
'tags_to_add':{
"tree_shape": "curtain",
},
},
"Semi-libre ": {
'tags_to_add':{
"tree_shape": "half_free",
},
},
"Libre ": {
'tags_to_add':{
"tree_shape": "free",
},
},
}
},
},
add_not_mapped_tags_too: false,
source: {
geojson_path: 'https://data.issy.com/api/explore/v2.1/catalog/datasets/arbres-remarquables-issy-les-moulineaux/exports/geojson?lang=fr&timezone=Europe%2FBerlin',
url: 'https://www.data.gouv.fr/fr/datasets/arbres-remarquables'
},
filters: {
offset:10
},
}
export default MappingArbresIssy

View file

@ -0,0 +1,67 @@
/**
* commerces adhérant à Ask Angela
* https://wiki.openstreetmap.org/wiki/FR:Tag:harassment_prevention%3Dask_angela
*/
import MappingConfigType from "../mapping-config.type";
const MappingAskAngela: MappingConfigType = {
config_name: "mappingRouenParkingVelos",
config_author: "tykayn <contact@cipherbliss.com>",
default_properties_of_point: {
'harassment_prevention': 'ask_angela',
},
source: {
geojson_path: '',
url: ''
},
filters: {
// exclude_point_if_tag_not_empty: ['id_osm'], // on peut exclure des données converties celles qui sont déjà avec un identifiant openstreetmap afin de favoriser l'intégration san avoir à gérer les doublons
// offset: 1
},
add_not_mapped_tags_too: false,
boolean_keys: [],
tags_to_ignore_if_value_is: ['Non renseigne'],
tags: {
// ******* opendata de toulouse START **************
structure: {
remove_original_key: true,
conditional_values: {
"Hôtel": {
tags_to_add: {
'tourism': 'hotel'
}
},
"Restaurant": {
tags_to_add: {
'amenity': 'restaurant'
}
},
}
},
'id': 'ref:FR:Toulouse:ask_angela_id',
noms: {
key_converted: 'name',
convert_to_name: true,
},
nom : {
key_converted: 'name',
convert_to_name: true,
},
// ******* opendata de toulouse END **************
// ******* opendata de poitiers START **************
'_id': 'ref:FR:Poitiers:ask_angela_id',
// ******* opendata de poitiers END **************
// ******* opendata de bordeaux START **************
'gid': 'ref:FR:Bordeaux:ask_angela_id',
'libelle': 'name',
'url': 'contact:website',
'cdate': 'start_date:ask_angela',
'mdate': 'check_date:ask_angela',
// ******* opendata de bordeaux END **************
// "addresse": "",
}
}
export default MappingAskAngela;

View file

@ -0,0 +1,154 @@
/**
* 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 mappingFINESS: MappingConfigType = {
config_name: "mappingFINESS",
config_author: "tykayn <contact@cipherbliss.com>",
default_properties_of_point: {},
source: {
geojson_path: "finess/finess_idf.json",
url: 'https://www.data.gouv.fr/fr/datasets/r/b9731c6f-c0d7-422e-9e1c-19edd51687ce'
},
filters: {
// exclude_point_if_tag_not_empty: ['id_osm'],
// offset: 1
},
add_not_mapped_tags_too: false,
boolean_keys: [],
tags_to_ignore_if_value_is: [],
tags: {
// ******* nombres
// capacite: 'capacity',
// ******* textes
siret: 'ref:FR:SIRET',
rslongue: {
key_converted: 'name',
convert_to_name: true,
},
nofinesset: 'ref:FR:FINESS:et',
nofinessej: 'ref:FR:FINESS:ej',
codemft: 'ref:FR:code_mft',
datemaj_structure: 'date:structure:update',
datemaj_geo: 'date:geolocalisation:update',
// categetab: 'ref:FR:categtab',
epci_code: 'ref:FR:code_EPCI',
epci_name: 'ref:FR:EPCI',
categagretab: 'ref:FR:FINESS:category_agreg',
codeape: 'ref:FR:NAF', // https://wiki.openstreetmap.org/wiki/FR:Key:ref:FR:NAF
// categtab: 'type:FR:FINESS',
dateouv: 'start_date',
dateautor: 'authorisation_date',
telephone: {
key_converted: 'operator:phone',
convert_to_phone: true,
},
telecopie: {
key_converted: 'operator:fax',
convert_to_phone: true,
},
categetab: {
remove_original_key: true,
key_converted: 'type:FR:FINESS',
conditional_values: {
// doc https://wiki.openstreetmap.org/wiki/FR:Key:type:FR:FINESS
// Centre Hospitalier Régional
101: {
tags_to_add: {
"amenity": "hospital",
"emergency": "yes",
"healthcare:speciality": "psychiatry",
}
},
// Centre Hospitalier ex Hôpital local
106: {
tags_to_add: {
"amenity": "hospital",
"emergency": "yes",
"healthcare:speciality": "psychiatry",
}
},
// Soins de Suite et Réadaptation
109: {
tags_to_add: {
"amenity": "hospital",
"healthcare:speciality": "psychiatry",
}
},
// Hôpital des armées
114: {
tags_to_add: {
"amenity": "hospital",
}
},
//Établissement de Soins Obstétriques Chirurgico-Gynécologiques
122: {
tags_to_add: {
"amenity": "hospital",
"healthcare:speciality": "obstetrics"
}
},
// Centre de Santé
124: {
tags_to_add: {
"healthcare": "center",
}
},
// Centre de Santé Dentaire
125: {
tags_to_add: {
"amenity": "dentist",
"healthcare": "dentist",
"healthcare:speciality": "dentist",
}
},
// Centre Médico-Psychologique (C.M.P.)
156: {
tags_to_add: {
"healthcare": "centre",
"healthcare:speciality": "psychiatry"
}
},
// "Laboratoires de Biologie Médicale": {
611: {
tags_to_add: {
"healthcare": "laboratory"
}
},
// Centre d'Accueil Th\u00e9rapeutique \u00e0 temps partiel (C.A.T.T.P.)
425: {
tags_to_add: {
"healthcare": "centre",
"healthcare:speciality": "psychiatry"
}
},
// "Centre Hospitalier (C.H.)": {
412: {
tags_to_add: {
"amenity": "hospital",
"healthcare": "hospital"
}
},
// "Pharmacie d'Officine": {
620: {
tags_to_add: {
"healthcare": "pharmacy"
}
},
// "Maison de santé (L.6223-3)": {
603: {
tags_to_add: {
"healthcare": "centre"
}
},
}
},
}
}
export default mappingFINESS;

View 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;

View file

@ -0,0 +1,169 @@
/**
* 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 MappingIRVESuisse: 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
// 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: 'ref:EU:EVSE',
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 MappingIRVESuisse;

View file

@ -0,0 +1,44 @@
/**
* 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",
osmose: true,
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_not_mapped_tags_too: true,
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',
'operator:phone': {
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
},
},
}
export default MappingIRVEOsmose;

View file

@ -0,0 +1,64 @@
/**
* 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 mappingIssy2Roues: MappingConfigType = {
config_name: "mappingIssy2Roues",
config_author: "tykayn <contact@cipherbliss.com>",
default_properties_of_point: {
'amenity': 'bicycle_parking'
},
source: {
geojson_path: "cyclabilité/issy_les_mx_cyclabilité.json",
url: 'https://data.issy.com/explore/dataset/parkings-2-roues/table/?disjunctive.commune=&disjunctive.type_aire=&disjunctive.type_vehicule=&disjunctive.etat=&disjunctive.pres_abri=&disjunctive.acces_reglement=&disjunctive.position=&sort=nb_places'
},
filters: {
},
add_not_mapped_tags_too: false,
boolean_keys: [
"acces_reglement",
],
tags: {
// ******* nombres
nb_places: 'capacity',
nb_pl_velo: 'capacity:bike',
nb_pl_moto: 'capacity:motorcycle',
annee_crea: 'start_date',
// ******* textes
type_aire: {
"remove_original_key": true,
"conditional_values": {
"Poteaux": {
"tags_to_add": [
{
"bicycle_parking": "bollard"
},
]
},
"Arceaux": {
"tags_to_add": [
{
"bicycle_parking": "bollard"
},
]
},
"Anneaux": {
"tags_to_add": [
{
"bicycle_parking": "stands"
},
]
},
}
},
// type_aire: 'nb_pl_moto', // Poteaux => bicycle_parking=bollard, Arceaux, Anneaux => bicycle_parking=stands, Marquage, null, Non renseigné, Range-vélos, Sans, Trottoir
id_r2roues: 'ref:FR:r2roues_issy_les_mx',
// acces_reglement: 'access',
}
}
export default mappingIssy2Roues;

View file

@ -0,0 +1,28 @@
import MappingConfigType from "../mapping-config.type";
const MappingMuseums: MappingConfigType = {
config_name: 'Mapping des musées en Île de France',
config_author: 'tykayn <contact+geojson2osm@cipherbliss.com>',
default_properties_of_point: {tourism: 'museum'},
tags: {
// ******* booléens
// ******* nombres
"URL": "contact:website",
"Identifiant Muséofile": "ref:FR:museums:museofile",
"REF_Deps": "ref:FR:museums:deps",
// ******* textes
'Téléphone': {
key_converted: "contact:phone",
convert_to_phone: true,
},
},
add_not_mapped_tags_too: false,
source: {
geojson_path: '',
url: ''
},
filters: {
// offset:2 // uncomment to run small tests
},
}
export default MappingMuseums

View file

@ -0,0 +1,50 @@
/**
* commerces adhérant à Ask Angela
* https://wiki.openstreetmap.org/wiki/Tag:healthcare:speciality%3Dfamily_planning
*/
import MappingConfigType from "../mapping-config.type";
const MappingPlanningFamlial: MappingConfigType = {
config_name: "planning familial",
config_author: "tykayn <contact@cipherbliss.com>",
default_properties_of_point: {
'healthcare:speciality': 'family_planning',
},
source: {
// source faite à partir de data scraping du site français
geojson_path: '',
url: 'https://www.planning-familial.org/fr',
overpass_query:`
[out:json][timeout:200];
{{geocodeArea:"France"}}->.searchArea;
nwr["healthcare:speciality"="family_planning"](area.searchArea);
out geom;
`
},
filters: {
// offset: 1
},
add_not_mapped_tags_too: false,
boolean_keys: [],
tags_to_ignore_if_value_is: ['Non renseigne'],
tags: {
adresse: "addr:full",
nom : {
key_converted: 'name',
convert_to_name: true,
},
telephone : {
key_converted: 'contact:phone',
convert_to_phone: true,
},
"contact:website":"contact:website",
"family_planning:handles:violences" : "family_planning:handles:violences",
"family_planning:handles:sexualities" : "family_planning:handles:sexualities",
"family_planning:handles:detection" : "family_planning:handles:detection",
"family_planning:handles:abortion" : "family_planning:handles:abortion",
"family_planning:handles:contraception" : "family_planning:handles:contraception",
// ******* opendata de toulouse END **************
}
}
export default MappingPlanningFamlial;

View file

@ -0,0 +1,88 @@
/**
* 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 mappingRouenParkingVelos: MappingConfigType = {
config_name: "mappingRouenParkingVelos",
config_author: "tykayn <contact@cipherbliss.com>",
default_properties_of_point: {
'amenity': 'bicycle_parking'
},
source: {
geojson_path: "cyclabilité/rouen_parking_velos.json",
url: 'https://data.metropole-rouen-normandie.fr/api/explore/v2.1/catalog/datasets/liste-des-stationnements-cyclables-metropole-rouen-normandie/exports/geojson?lang=fr&timezone=Europe%2FBerlin'
},
filters: {
exclude_point_if_tag_not_empty: ['id_osm'], // on peut exclure des données converties celles qui sont déjà avec un identifiant openstreetmap afin de favoriser l'intégration san avoir à gérer les doublons
// offset: 100
},
add_not_mapped_tags_too: false,
boolean_keys: [
"acces_reglement",
],
tags_to_ignore_if_value_is: ['Non renseigne'],
tags: {
// ******* nombres
capacite: 'capacity',
capacite_cargo: 'capacity:cargo_bike',
gestionnaire: {
key_converted: 'operator',
conditional_values: {
"Non renseigne": {
ignore_this_data: true, // ne pas ajouter de tag si la valeur est égale à
}
}
},
proprietaire: {
key_converted: 'owner',
conditional_values: {
"Non renseigne": {
ignore_this_data: true, // ne pas ajouter de tag si la valeur est égale à
}
}
},
date_maj: 'check_date',
// ******* textes
commentaire: 'note',
surveillance: {
key_converted: 'surveillance',
ignore_if_falsy: true,
convert_to_boolean_value: true,
},
mobilier: {
key_converted: 'mobilier',
remove_original_key: true, // TODO trouver ce qui empêche la conversion quand remove_original_key est a true
conditional_values: {
"POTELET": {
tags_to_add: [
{
"bicycle_parking": "bollard"
},
]
},
"ARCEAU": {
tags_to_add: [
{
"bicycle_parking": "stands"
},
]
},
"RATELIER": {
tags_to_add: [
{
"bicycle_parking": "rack"
},
]
},
}
},
id_local: 'ref:FR:rouen_veloparking_id',
// acces_reglement: 'access',
}
}
export default mappingRouenParkingVelos;

View file

@ -0,0 +1,59 @@
/**
* points d'apport volontaire de Rouen
*/
import MappingConfigType from "../mapping-config.type";
const MappingRouenPAV: MappingConfigType = {
config_name: "mappingRouen points d'apport volontaire",
config_author: "tykayn <contact@cipherbliss.com>",
default_properties_of_point: {
'amenity': 'recycling',
'recycling_type': 'container',
},
source: {
geojson_path: 'https://data.metropole-rouen-normandie.fr/api/explore/v2.1/catalog/datasets/donmetdec_pav/exports/geojson?lang=fr&timezone=Europe%2FBerlin',
url: 'https://data.metropole-rouen-normandie.fr/explore/dataset/donmetdec_pav/information/'
},
filters: {
// exclude_point_if_tag_not_empty: ['id_osm'], // on peut exclure des données converties celles qui sont déjà avec un identifiant openstreetmap afin de favoriser l'intégration san avoir à gérer les doublons
// offset: 50
},
add_not_mapped_tags_too: false,
boolean_keys: [
// "acces_reglement",
],
tags_to_ignore_if_value_is: ['Non renseigne'],
tags: {
// ******* nombres
pavtyp: {
remove_original_key:true,
conditional_values: {
"Emballages en verre": {
tags_to_add: {
'recycling:glass': 'yes'
}
},
"Emballages recyclables": {
tags_to_add: {
'recycling:pmd': 'yes' // https://wiki.openstreetmap.org/wiki/Key:recycling:pmd
}
},
"Ordures ménagères": {
tags_to_add: {
'amenity': 'waste_disposal'
}
}
}
},
date_maj: 'check_date',
// ******* textes
gml_id: 'ref:FR:Rouen:pav:gml_id',
objectid_1: 'ref:FR:Rouen:pav:object',
pavid: 'ref:FR:Rouen:pav:id',
pavnom: 'ref:FR:Rouen:pav:name',
commune: 'ref:FR:Rouen:commune',
}
}
export default MappingRouenPAV;

View file

@ -0,0 +1,32 @@
/**
* caméras référencées sur le site de rouen
*
* certaines ont une précision "Caméra de sécurité sur borne escamotable"
* https://wiki.openstreetmap.org/wiki/Tag:man_made=surveillance
*/
import MappingConfigType from "../mapping-config.type";
const MappingSurveillanceRouen: MappingConfigType = {
config_name: "caméras de Rouen",
config_author: "tykayn <contact@cipherbliss.com>",
default_properties_of_point: {
'man_made ': 'surveillance',
},
source: {
// source faite à partir de data scraping du site français
geojson_path: 'https://umap.openstreetmap.fr/fr/datalayer/44208/f923d80e-2ede-4ab8-b883-a7646491c506/',
url: 'https://rouen.fr/videoprotection'
},
filters: {
// exclude_point_if_tag_not_empty: ['id_osm'], // on peut exclure des données converties celles qui sont déjà avec un identifiant openstreetmap afin de favoriser l'intégration san avoir à gérer les doublons
// offset: 1
},
add_not_mapped_tags_too: false,
boolean_keys: [],
tags_to_ignore_if_value_is: ['Non renseigne'],
tags: {
//
}
}
export default MappingSurveillanceRouen;

View file

@ -0,0 +1,24 @@
/**
* 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 MappingTest: MappingConfigType = {
config_name: 'testing config MappingTest',
config_author: 'tykayn <contact@cipherbliss.com>',
default_properties_of_point: {},
tags: {
nom_amenageur : 'name'
},
add_not_mapped_tags_too: false,
source: {
geojson_path: "",
url: ""
},
filters: {},
}
export default MappingTest;

View file

@ -0,0 +1,39 @@
/**
* 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 MappingToilettes: MappingConfigType = {
config_name: "toilettes config for paris sanisettes",
config_author: "tykayn <contact@cipherbliss.com>",
default_properties_of_point: {
'amenity': 'toilets'
},
source: {
geojson_path: "etalab_data/toilettes_paris_datagouv.json",
url: 'https://opendata.paris.fr/api/explore/v2.1/catalog/datasets/sanisettesparis/exports/geojson?lang=fr&timezone=Europe%2FBerlin'
},
/**
* select only certain points from the source
*/
filters: {
enable_coordinates_filter: false,
enable_properties_filter: false,
// add only geojson points who are found having this regex in the zipcode properties
properties: {
// consolidated_code_postal: '^[75]'
}
},
add_not_mapped_tags_too: false,
tags: {
nom_operateur: 'operator',
telephone_operateur: 'phone',
contact_operateur: 'email', // ici, on souhaite convertir la clé
},
}
export default MappingToilettes;

View file

@ -0,0 +1,45 @@
/**
* 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
*/
const mappingIRVE:any = {
// ******* nombres
nbre_pdc: 'capacity',
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: 'phone',
// ici, on souhaite convertir la clé contact_operateur=bidule en email=bidule
contact_operateur: 'email',
id_station_itinerance: 'ref:EU:EVSE',
id_station_local: 'ref',
gratuit: 'fee',
paiement_acte: 'authentication:none',
reservation: 'reservation',
observations: 'note',
nom_station: 'name',
nom_enseigne: 'network',
// ******* dates
date_mise_en_service: 'start_date',
date_maj: 'source:date',
// ******** champs booléens
prise_type_ef: 'socket:typee',
prise_type_2: 'socket:type2',
prise_type_combo_ccs: 'socket:type2_combo',
prise_type_chademo: 'socket:chademo',
// ******** champs plus complexes
horaires: 'opening_hours', // déjà au bon format
}
export default mappingIRVE;