mirror of
https://forge.chapril.org/tykayn/wololo
synced 2025-06-20 01:34:42 +02:00
add option --wget to replace file
This commit is contained in:
parent
20b9e24eea
commit
5b0271716c
7 changed files with 128 additions and 6 deletions
|
@ -2,6 +2,9 @@
|
|||
* 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
|
||||
*
|
||||
* exemple d'exécution de script:
|
||||
* npx ts-node convert_to_osm_tags.ts --source="etalab_data/irve_bornes_recharge/latest.json" --output-file="irve-latest.geojson" --engine-config=mappingConfigIRVE --wget
|
||||
*/
|
||||
import MappingConfigType from "../mapping-config.type";
|
||||
|
||||
|
@ -12,8 +15,10 @@ const MappingIRVE: MappingConfigType = {
|
|||
'amenity': 'charging_station'
|
||||
},
|
||||
source: {
|
||||
geojson_path: "etalab_data/all.json",
|
||||
url: 'https://www.data.gouv.fr/fr/datasets/r/7eee8f09-5d1b-4f48-a304-5e99e8da1e26'
|
||||
geojson_path: "https://www.data.gouv.fr/fr/datasets/r/7eee8f09-5d1b-4f48-a304-5e99e8da1e26",
|
||||
url: 'https://www.data.gouv.fr/fr/datasets/r/7eee8f09-5d1b-4f48-a304-5e99e8da1e26',
|
||||
documentation_url: 'https://transport.data.gouv.fr/datasets/fichier-consolide-des-bornes-de-recharge-pour-vehicules-electriques',
|
||||
overpass_query: '[out:json][timeout:300];area(id:3602202162)->.searchArea;nwr["amenity"="charging_station"](area.searchArea);out+geom;'
|
||||
},
|
||||
/**
|
||||
* select only certain points from the source
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
*
|
||||
* certaines ont une précision "Caméra de sécurité sur borne escamotable"
|
||||
* https://wiki.openstreetmap.org/wiki/Tag:man_made=surveillance
|
||||
* exemple d'exécution de script:
|
||||
* ts-node convert_to_osm_tags.ts --engine-config configSurveillance --outname surveillance_rouen_20250428 --wget
|
||||
*/
|
||||
import MappingConfigType from "../mapping-config.type";
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ interface sourceConfig {
|
|||
geojson_path: string; // the relative path to the geojson source file to analyse, from the root of this repository
|
||||
url: string; // URL from where the geojson comes online, on a data platform. This URL should be fetchable to get the most recent data of the concerned dataset to convert.
|
||||
overpass_query?: string; // query to get objects from OSM
|
||||
documentation_url?: string; // documentation on open data website about this dataset
|
||||
}
|
||||
|
||||
export default interface MappingConfigType {
|
||||
|
|
|
@ -159,7 +159,7 @@ function convertToYesOrNo(originalValue: any) {
|
|||
}
|
||||
// on ne peut pas conclure ce que l'on doit garder avec une liste
|
||||
if (isEnumeration) {
|
||||
this.stats.enumeration_detected++
|
||||
|
||||
return ''
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue