get surveillance osm in france

This commit is contained in:
Tykayn 2024-10-08 15:16:40 +02:00 committed by tykayn
parent cb75a7d711
commit 3b2aa25489
3 changed files with 600536 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@ curl -H 'Accept-Encoding: identity' 'https://overpass-api.de/api/interpreter' -X
if [ $? -eq 0 ]; then
echo "Export réussi! Le fichier $OUTPUT_FILE a été créé."
geojson2osm "$OUTPUT_FILE" "$OUTPUT_FILE_GEO" -f
date2name "$OUTPUT_FILE" "$OUTPUT_FILE_GEO"
date2name "$OUTPUT_FILE_GEO" "$OUTPUT_FILE_GEO"
else
echo "Erreur lors de l'export : $?"
fi

View File

@ -0,0 +1,23 @@
#!/bin/bash
# Définir la requête Overpass
OVERPASS_QUERY='[out:json][timeout:200];
area["ISO3166-1"="FR"]["admin_level"="2"];
nwr(area)["man_made"="surveillance"];
out geom;
'
# Définir le nom du fichier de sortie
OUTPUT_FILE="cameras_in_france.json"
OUTPUT_FILE_GEO="cameras_in_france.geojson"
# Exécuter la requête Overpass avec Overpass Turbo
curl -H 'Accept-Encoding: identity' 'https://overpass-api.de/api/interpreter' -X POST -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0' -H 'Accept: */*' -H 'Accept-Language: fr,en-US;q=0.7,en;q=0.3' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Origin: https://overpass-turbo.eu' -H 'Connection: keep-alive' -H 'Referer: https://overpass-turbo.eu/' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: cross-site' -H 'Sec-GPC: 1' -H 'Priority: u=1' --data-raw "data=${OVERPASS_QUERY}" -o "$OUTPUT_FILE"
# Vérifier si la requête a réussi
if [ $? -eq 0 ]; then
echo "Export réussi! Le fichier $OUTPUT_FILE a été créé."
geojson2osm "$OUTPUT_FILE" "$OUTPUT_FILE_GEO" -f
date2name "$OUTPUT_FILE" "$OUTPUT_FILE_GEO"
else
echo "Erreur lors de l'export : $?"
fi