#!/bin/sh
# Appendix D.2 and D.3: re-run the Flemish AWV and OpenStreetMap queries; prints HTTP status and size.
UA=fsd-atlas/1.0
AWV=https://opendata.apps.mow.vlaanderen.be/opendata-geoserver/awv/wfs
for L in Afgeleide_snelheidsregimes Afgeleide_zones_zone30 Afgeleide_zones_woonerf Afgeleide_zones_fietsstraten; do
  curl -s -m 90 -A $UA -o awv_$L.json -w "$L %{http_code} %{size_download}\n" \
    "$AWV?service=WFS&version=2.0.0&request=GetFeature&typeNames=awv:$L&outputFormat=application/json&bbox=144000,176000,148000,180000,urn:ogc:def:crs:EPSG::31370"
done
curl -s -m 90 -A $UA -o osm_living.json -w "overpass %{http_code} %{size_download}\n" \
  --data-urlencode 'data=[out:json][timeout:60];area["name"="Région de Bruxelles-Capitale - Brussels Hoofdstedelijk Gewest"]->.a;way(area.a)["highway"="living_street"];out tags center;' \
  https://overpass-api.de/api/interpreter
