add code to generate member map

This commit is contained in:
Lukas Grossberger
2022-10-09 14:03:18 +02:00
parent 4d92a749f7
commit e2b6c2b3b6
5 changed files with 162 additions and 2 deletions

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM ubuntu:22.04
ARG PLZ_DATA=Postleitzahlengebiete_-_OSM.geojson
ARG PLZ_HIGHLIGHT=wtf_member_plz_prefixes.json
# Set up environment with dependencies
RUN apt-get update && apt-get install libblas-dev python3-pip libgeos-dev wget -y
COPY requirements.txt ./
RUN pip install -r requirements.txt
# Copy all relevant data
COPY $PLZ_DATA ./
COPY $PLZ_HIGHLIGHT ./
# Render map
COPY main.py ./
RUN python3 main.py --plz-data $PLZ_DATA --plz-highlight $PLZ_HIGHLIGHT --out /tmp/map.png
# Output map; use with "docker build -t wtf-map . && docker run wtf-map > map.png"
CMD ["cat", "/tmp/map.png"]