get surveillance osm in france
This commit is contained in:
parent
cb75a7d711
commit
3b2aa25489
600512
ponts-export-osm/2024-10-08_cameras_in_france.json
Normal file
600512
ponts-export-osm/2024-10-08_cameras_in_france.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -20,7 +20,7 @@ curl -H 'Accept-Encoding: identity' 'https://overpass-api.de/api/interpreter' -X
|
|||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Export réussi! Le fichier $OUTPUT_FILE a été créé."
|
echo "Export réussi! Le fichier $OUTPUT_FILE a été créé."
|
||||||
geojson2osm "$OUTPUT_FILE" "$OUTPUT_FILE_GEO" -f
|
geojson2osm "$OUTPUT_FILE" "$OUTPUT_FILE_GEO" -f
|
||||||
date2name "$OUTPUT_FILE" "$OUTPUT_FILE_GEO"
|
date2name "$OUTPUT_FILE_GEO" "$OUTPUT_FILE_GEO"
|
||||||
else
|
else
|
||||||
echo "Erreur lors de l'export : $?"
|
echo "Erreur lors de l'export : $?"
|
||||||
fi
|
fi
|
||||||
|
23
ponts-export-osm/surveillance_get_whole_france.sh
Normal file
23
ponts-export-osm/surveillance_get_whole_france.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user