up script ponts
This commit is contained in:
parent
faf763d80c
commit
b0bb8ea1db
|
@ -0,0 +1 @@
|
|||
{"type": "FeatureCollection", "features": [{"type": "Feature", "properties": {"type": "node", "id": 669161207, "tags": {"amenity": "social_facility", "check_date": "2023-10-24", "healthcare:speciality": "family_planning", "name": "Le planning familial 44", "social_facility": "outreach"}}, "geometry": {"type": "Point", "coordinates": [-1.5725557, 47.2076003]}}, {"type": "Feature", "properties": {"type": "node", "id": 1817801880, "tags": {"contact:city": "Chalon-sur-Sa\u00f4ne", "contact:housenumber": "3", "contact:postcode": "71100", "contact:street": "Place du Th\u00e9\u00e2tre", "healthcare:speciality": "family_planning", "name": "Planning Familial", "office": "government", "opening_hours": "mo-su 9:00-12:00,14:00-18:00"}}, "geometry": {"type": "Point", "coordinates": [4.8567996, 46.783092]}}, {"type": "Feature", "properties": {"type": "node", "id": 9739960886, "tags": {"healthcare:speciality": "family_planning", "name": "Le planning familial", "office": "association"}}, "geometry": {"type": "Point", "coordinates": [-0.374171, 43.2997804]}}, {"type": "Feature", "properties": {"type": "node", "id": 11874180234, "tags": {"amenity": "social_facility", "healthcare:speciality": "family_planning", "name": "Planning familial"}}, "geometry": {"type": "Point", "coordinates": [1.9115478, 48.9810064]}}, {"type": "Feature", "properties": {"type": "node", "id": 11874187084, "tags": {"amenity": "social_facility", "healthcare:speciality": "family_planning", "name": "Planning familial"}}, "geometry": {"type": "Point", "coordinates": [2.081406, 49.0372102]}}]}
|
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
"version": 0.6,
|
||||
"generator": "Overpass API 0.7.62.1 084b4234",
|
||||
"osm3s": {
|
||||
"timestamp_osm_base": "2024-07-09T14:56:33Z",
|
||||
"timestamp_areas_base": "2024-07-09T10:18:02Z",
|
||||
"copyright": "The data included in this document is from www.openstreetmap.org. The data is made available under ODbL."
|
||||
},
|
||||
"elements": [
|
||||
|
||||
{
|
||||
"type": "node",
|
||||
"id": 669161207,
|
||||
"lat": 47.2076003,
|
||||
"lon": -1.5725557,
|
||||
"tags": {
|
||||
"amenity": "social_facility",
|
||||
"check_date": "2023-10-24",
|
||||
"healthcare:speciality": "family_planning",
|
||||
"name": "Le planning familial 44",
|
||||
"social_facility": "outreach"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"id": 1817801880,
|
||||
"lat": 46.7830920,
|
||||
"lon": 4.8567996,
|
||||
"tags": {
|
||||
"contact:city": "Chalon-sur-Saône",
|
||||
"contact:housenumber": "3",
|
||||
"contact:postcode": "71100",
|
||||
"contact:street": "Place du Théâtre",
|
||||
"healthcare:speciality": "family_planning",
|
||||
"name": "Planning Familial",
|
||||
"office": "government",
|
||||
"opening_hours": "mo-su 9:00-12:00,14:00-18:00"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"id": 9739960886,
|
||||
"lat": 43.2997804,
|
||||
"lon": -0.3741710,
|
||||
"tags": {
|
||||
"healthcare:speciality": "family_planning",
|
||||
"name": "Le planning familial",
|
||||
"office": "association"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"id": 11874180234,
|
||||
"lat": 48.9810064,
|
||||
"lon": 1.9115478,
|
||||
"tags": {
|
||||
"amenity": "social_facility",
|
||||
"healthcare:speciality": "family_planning",
|
||||
"name": "Planning familial"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "node",
|
||||
"id": 11874187084,
|
||||
"lat": 49.0372102,
|
||||
"lon": 2.0814060,
|
||||
"tags": {
|
||||
"amenity": "social_facility",
|
||||
"healthcare:speciality": "family_planning",
|
||||
"name": "Planning familial"
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Définir la requête Overpass
|
||||
OVERPASS_QUERY='[out:json][timeout:200];
|
||||
area["ISO3166-1"="FR"]["admin_level"="2"];
|
||||
nwr(area)["healthcare:speciality"="family_planning"];
|
||||
out geom;
|
||||
area(-60.0,-20.0,10.0,52.0)["ISO3166-1"="FR"]["admin_level"="4"];
|
||||
nwr(area)["healthcare:speciality"="family_planning"];
|
||||
out geom;'
|
||||
|
||||
# Définir le nom du fichier de sortie
|
||||
OUTPUT_FILE="family_planning.json"
|
||||
OUTPUT_FILE_GEOJSON="family_planning.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éé."
|
||||
else
|
||||
echo "Erreur lors de l'export : $?"
|
||||
fi
|
||||
|
||||
osm2geojson $OUTPUT_FILE $OUTPUT_FILE_GEOJSON -f
|
||||
date2name $OUTPUT_FILE $OUTPUT_FILE_GEOJSON
|
|
@ -11,6 +11,7 @@ out geom;'
|
|||
|
||||
# Définir le nom du fichier de sortie
|
||||
OUTPUT_FILE="bridges_in_france.json"
|
||||
OUTPUT_FILE_GEO="bridges_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"
|
||||
|
@ -18,6 +19,8 @@ curl -H 'Accept-Encoding: identity' 'https://overpass-api.de/api/interpreter' -X
|
|||
# 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