2024-10-17 12:25:25 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# export depuis OSM des points
|
|
|
|
# "man_made"="surveillance"
|
|
|
|
# pour le monde entier
|
|
|
|
|
|
|
|
echo -e "\n récupération de données depuis OpenStreetMap \n"
|
|
|
|
|
|
|
|
url='https://overpass-api.de/api/interpreter?data=%5Bout%3Ajson%5D%5Btimeout%3A25%5D%3B%0Aarea(id%3A3602202162)-%3E.searchArea%3B%0Anode%5B%22tourism%22%3D%22museum%22%5D(area.searchArea)%3B%0Aout+geom%3B'
|
|
|
|
|
2024-10-17 13:40:46 +02:00
|
|
|
export_file="museum_zone_france_from_openstreetmap"
|
2024-10-17 12:25:25 +02:00
|
|
|
|
|
|
|
# Télécharger le fichier GeoJSON
|
2024-10-17 13:40:46 +02:00
|
|
|
curl -X GET -o "$export_file.geojson" -g $url
|
|
|
|
|
2024-10-17 12:25:25 +02:00
|
|
|
echo -e "\n OK \n"
|
|
|
|
date
|
|
|
|
echo -e "nombre de points extraits :"
|
2024-10-17 13:40:46 +02:00
|
|
|
jq '.elements | length' $export_file.geojson
|
|
|
|
mv "$export_file.geojson" "../../osm_output/$export_file.geojson"
|
|
|
|
|
|
|
|
python3 geojson_to_csv.py "../../osm_output/$export_file.geojson" -o "../../osm_output/$export_file.csv"
|