add rouen config parking vélos

This commit is contained in:
Tykayn 2024-10-07 16:19:13 +02:00 committed by tykayn
parent de76b9ec38
commit c102c2b1ff
4 changed files with 71 additions and 1 deletions

View File

@ -12,8 +12,9 @@ import mappingTest from './mappings/converters/configTest'
import mapping_engine from './mappings/engine' import mapping_engine from './mappings/engine'
import {BoundingBoxCoordinatesType, FeatureCollection} from "./mappings/mapping-config.type"; import {BoundingBoxCoordinatesType, FeatureCollection} from "./mappings/mapping-config.type";
import utils from './mappings/utils' import utils from './mappings/utils'
import mappingRouenParkingVelos from "./mappings/converters/configRouen_OpenData_velo_parkings";
const allowed_configs = ['mappingIssy2Roues', 'mappingConfigIRVE', 'mappingConfigIRVEFromOsmose', 'mappingConfigIRVE_simple', 'mappingTest', 'ConfigIRVE']; const allowed_configs = ['mappingIssy2Roues', 'mappingConfigIRVE', 'mappingConfigIRVEFromOsmose', 'mappingConfigIRVE_simple', 'mappingTest', 'ConfigIRVE','mappingRouenParkingVelos'];
const minimist = require('minimist') const minimist = require('minimist')
@ -344,6 +345,8 @@ function setMappingConfigFromName(engine_conf_choice: string) {
Mapping_engine.setConfig(mappingTest) Mapping_engine.setConfig(mappingTest)
} else if (engine_conf_choice == 'ConfigIRVE') { } else if (engine_conf_choice == 'ConfigIRVE') {
Mapping_engine.setConfig(ConfigIRVE) Mapping_engine.setConfig(ConfigIRVE)
} else if (engine_conf_choice == 'mappingRouenParkingVelos') {
Mapping_engine.setConfig(mappingRouenParkingVelos)
} }
} else { } else {
Mapping_engine.setConfig(mappingConfigIRVE) Mapping_engine.setConfig(mappingConfigIRVE)

File diff suppressed because one or more lines are too long

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 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: {
},
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:rouen_veloparking_id',
// acces_reglement: 'access',
}
}
export default mappingRouenParkingVelos;

View File

@ -13,6 +13,7 @@
wget https://www.data.gouv.fr/fr/datasets/r/7eee8f09-5d1b-4f48-a304-5e99e8da1e26 -O "latest.json" wget https://www.data.gouv.fr/fr/datasets/r/7eee8f09-5d1b-4f48-a304-5e99e8da1e26 -O "latest.json"
wget "https://data.issy.com/api/explore/v2.1/catalog/datasets/parkings-2-roues/exports/geojson?lang=fr&timezone=Europe%2FBerlin" -O "issy_les_mx_cyclabilité.json" wget "https://data.issy.com/api/explore/v2.1/catalog/datasets/parkings-2-roues/exports/geojson?lang=fr&timezone=Europe%2FBerlin" -O "issy_les_mx_cyclabilité.json"
wget "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" -O "rouen_parking_velos.json"
wget https://www.data.gouv.fr/fr/datasets/r/8d9398ae-3037-48b2-be19-412c24561fbb -O "latest.csv" wget https://www.data.gouv.fr/fr/datasets/r/8d9398ae-3037-48b2-be19-412c24561fbb -O "latest.csv"
#wget https://github.com/BastienGauthier/clean_french_irve/blob/main/data/df_irve_etalab_cleaned.csv -O "clean_french_irve.csv" #wget https://github.com/BastienGauthier/clean_french_irve/blob/main/data/df_irve_etalab_cleaned.csv -O "clean_french_irve.csv"
wget "https://osmose.openstreetmap.fr/api/0.3/issues.geojson?full=true&status=open&item=8410&limit=20000" -O "osmose-item-irve-8411-intégrables.json" wget "https://osmose.openstreetmap.fr/api/0.3/issues.geojson?full=true&status=open&item=8410&limit=20000" -O "osmose-item-irve-8411-intégrables.json"
@ -20,6 +21,7 @@ wget "https://osmose.openstreetmap.fr/api/0.3/issues.geojson?full=true&status=op
rm website-data.log rm website-data.log
echo " - déplacement des datasets des IRVE dans le dossier etalab_data/irve_bornes_recharge" echo " - déplacement des datasets des IRVE dans le dossier etalab_data/irve_bornes_recharge"
mv "geojson?lang=fr" ../etalab_data/cyclabilité/issy_les_mx_cyclabilité.json mv "geojson?lang=fr" ../etalab_data/cyclabilité/issy_les_mx_cyclabilité.json
mv "rouen_parking_velos.json" ../etalab_data/cyclabilité/rouen_parking_velos.json
mv latest.json ../etalab_data/irve_bornes_recharge/ mv latest.json ../etalab_data/irve_bornes_recharge/
mv clean_french_irve.csv ../etalab_data/irve_bornes_recharge/ mv clean_french_irve.csv ../etalab_data/irve_bornes_recharge/
mv osmose-item-irve-8411-intégrables.json ../etalab_data/irve_bornes_recharge/ mv osmose-item-irve-8411-intégrables.json ../etalab_data/irve_bornes_recharge/