https://github.com/dbrgn/hnf-peaks
Fetch information about paragliding flights from alpine peaks.
https://github.com/dbrgn/hnf-peaks
paragliding xcontest
Last synced: 7 months ago
JSON representation
Fetch information about paragliding flights from alpine peaks.
- Host: GitHub
- URL: https://github.com/dbrgn/hnf-peaks
- Owner: dbrgn
- Created: 2020-08-03T06:55:48.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-08-26T22:22:34.000Z (about 1 year ago)
- Last Synced: 2025-03-06T08:51:05.886Z (7 months ago)
- Topics: paragliding, xcontest
- Language: HTML
- Homepage: https://dbrgn.github.io/hnf-peaks/
- Size: 8.21 MB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hike&Fly Peaks Switzerland
Fetch information about paragliding flights from alpine peaks.
Map: https://dbrgn.github.io/hnf-peaks/
## Prerequisites
- Bash
- PostgreSQL + PostGIS
- Python 3
- The following Python packages: beautifulsoup4, psycopg2## 0: Start services
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## 1: Download OSM Data
This will download the OpenStreetMap database and extract all peaks with an
elevation >1000m:./1-load-osm-data.sh
## 2: Query XContest
This will process all peaks and query XContest for the number of flights that
launched from within 350 m around the peak:export XCONTEST_USER=...
export XCONTEST_PASS=...
./2-query-xcontest.pyThe data will be written to a file called `data-YYYY-MM-DD.csv`.
**WARNING:** X-Contest does rate limiting, so unless you are whitelisted by
them, you will probably get blocked after a while. Furthermore, do not run this
command on the evening of a hammer day, choose a time when XContest is not
busy.## 3: Postprocess Data
To calculate some aggregations:
./3-postprocessing.py pilots
To generate GeoJSON from the data:
./3-postprocessing.py geojson
## License
- Code: GPLv3 or later
- Data: © OpenStreetMap contributors