- Notifications
You must be signed in to change notification settings - Fork1
Fetch information about paragliding flights from alpine peaks.
dbrgn/hnf-peaks
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Fetch information about paragliding flights from alpine peaks.
Map:https://dbrgn.github.io/hnf-peaks/
- Bash
- PostgreSQL + PostGIS
- Python 3
- The following Python packages: beautifulsoup4, psycopg2
The easiest way to run PostGIS is through Docker:
docker run -d --name hnf-peaks-pg \ -e POSTGRES_USER=$(id -u -n) \ -e POSTGRES_HOST_AUTH_METHOD=trust \ -p 127.0.0.1:5432:5432 \ docker.io/postgis/postgis:16-3.4-alpine
This will download the OpenStreetMap database and extract all peaks with anelevation >1000m:
./1-load-osm-data.sh <country>
This will process all peaks and query XContest for the number of flights thatlaunched from within 350 m around the peak:
export XCONTEST_USER=...export XCONTEST_PASS=..../2-query-xcontest.py <country>
The data will be written to a file calleddata-YYYY-MM-DD.csv
.
WARNING: X-Contest does rate limiting, so unless you are whitelisted bythem, you will probably get blocked after a while. Furthermore, do not run thiscommand on the evening of a hammer day, choose a time when XContest is notbusy.
To calculate some aggregations:
./3-postprocessing.py <data-in.csv> pilots <pilots-out.csv>
To generate GeoJSON from the data:
./3-postprocessing.py <data-in.csv> geojson <geojson-out.json>
- Code: GPLv3 or later
- Data: © OpenStreetMap contributors
About
Fetch information about paragliding flights from alpine peaks.