wololo/makefile
2025-04-17 17:34:39 +02:00

50 lines
3 KiB
Makefile

default: irve
get_files:
bash ./update_scripts/get_datasets.sh
##################
# moving datasets to the source folder etalab_data
##################
echo " - déplacement des datasets des IRVE dans le dossier etalab_data/irve_bornes_recharge"
mv latest.json etalab_data/irve_bornes_recharge/
mv latest.csv etalab_data/irve_bornes_recharge/
mv irve_osm_latest.geojson 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 "issy_les_mx_arbres.json" etalab_data/arbres/
mv "issy_les_mx_cyclabilité.json" etalab_data/cyclabilité/
mv "rouen_parking_velos.json" etalab_data/cyclabilité/rouen_parking_velos.json
echo "fichiers récupérés"
irve:
wget https://www.data.gouv.fr/fr/datasets/r/7eee8f09-5d1b-4f48-a304-5e99e8da1e26 -O "latest.json"
mv latest.json etalab_data/irve_bornes_recharge/
ts-node convert_to_osm_tags.ts --source="etalab_data/irve_bornes_recharge/latest.json" --output-file="_irve-latest-etalab.geojson" --engine-config=mappingConfigIRVE
echo " DONE "
echo " "
echo "you can open the IRVE converted osm file in JOSM : output/bornes-irve-filetered_latest.osm "
echo "you can open the existing IRVE referenced in OSM : osm_output/bornes-irve-filetered_latest.osm "
osmose_irve:
pnpm i
ts-node convert_to_osm_tags.ts --osmose=true --engine=true --source="etalab_data/irve_bornes_recharge/osmose-item-irve-8411-intégrables.json" --outname="_irve-latest-osmose"
#geojson2osm "etalab_data/irve_bornes_recharge/osmose-item-irve-8411-intégrables.json" > "osm_output/osmose-item-irve-8411-intégrables.osm"
geojson2osm "output/my_converted_data_set__irve-latest-osmose.json" > "osm_output/my_converted_data_set__irve-latest-osmose.osm"
# panneaux de signalisation routière extraits de panoramax
panneaux:
npx ts-node unzip_csv.ts -u https://www.data.gouv.fr/fr/datasets/r/16a20f4e-0c06-40ff-adda-54f214099e5f -o panneaux_limite_de_vitesse_fr_panoramax_detections.csv -z
npx ts-node csv_to_geojson.ts -d etalab_data/panneaux -f panneaux_limite_de_vitesse_fr_panoramax_detections.csv --latColumn 'GPSLatitude' --lonColumn 'GPSLongitude' -h
ts-node convert_to_osm_tags.ts --source etalab_data/panneaux/panneaux_limite_de_vitesse_fr_panoramax_detections.csv.geojson --output-file=panneaux_maxspeed_panoramax.json --engine-config=MappingPanneauxMaxSpeed
#plaques commémoratives de Paris
plaques:
wget https://opendata.paris.fr/api/explore/v2.1/catalog/datasets/plaques_commemoratives/exports/geojson?lang=fr&timezone=Europe%2FBerlin -O "pcp_latest.json"
mv pcp_latest.json etalab_data/plaques_commemoratives/pcp_latest.geojson
npx ts-node csv_to_geojson.ts -d etalab_data/plaques -f plaques_commemoratives_paris.csv --latColumn 'y_4326' --lonColumn 'x_4326' -h
ts-node convert_to_osm_tags.ts --source etalab_data/plaques/plaques_commemoratives_paris.csv.geojson --output-file=plaques_commemoratives_paris.json --engine-config=MappingPlaquesCommémorativesParis
tests:
npm test