Compare commits

...

3 commits

Author SHA1 Message Date
62a177108c Merge branch 'main' of https://forgejo.petau.net/aron/cdec 2025-10-12 10:41:52 +02:00
c3e8809548 repair align trinkbrunnen 2025-10-12 10:41:41 +02:00
0002901152 repair align trinkbrunnen 2025-10-12 10:32:53 +02:00
5 changed files with 7 additions and 12 deletions

10
.gitignore vendored
View file

@ -13,12 +13,6 @@ ENV/
# Jupyter Notebook checkpoints
.ipynb_checkpoints/
# Raster and geodata outputs
*.tif
*.npy
*.png
trinkbrunnen_pixel_positions.npy
trinkbrunnen_karte.png
# Matplotlib figures
*.pdf
@ -43,9 +37,7 @@ htmlcov/
*.bak
*.tmp
# Ignore results folder except source data
results/
!results/s2_2025.tif
# Ignore geodata except source files
!geodata/Trinkbrunnen_Berlin.geojson

View file

@ -2,10 +2,13 @@ import rasterio
import geopandas as gpd
import numpy as np
import matplotlib.pyplot as plt
import os
# --- CONFIG ---
raster_path = 'geodata/s2_2025.tif'
geojson_path = 'geodata/Trinkbrunnen_Berlin.geojson'
raster_path = os.path.join('geodata', 's2_2025.tif')
geojson_path = os.path.join('geodata', 'Trinkbrunnen_Berlin.geojson')
output_dir = os.path.join('datenvisualisierung')
os.makedirs(output_dir, exist_ok=True)
# --- LOAD RASTER ---
with rasterio.open(raster_path) as src:
@ -38,7 +41,7 @@ for px, py in pixel_positions:
plt.scatter(px, py, c='deepskyblue', s=40, edgecolors='black', label='Trinkbrunnen')
plt.title('Trinkbrunnen auf der Berlin-Karte')
plt.axis('off')
plt.savefig('datenvisualisierung/trinkbrunnen_karte.png', bbox_inches='tight', dpi=200)
plt.savefig(os.path.join(output_dir, 'trinkbrunnen_karte.png'), bbox_inches='tight', dpi=200)
plt.show()
# --- EXPORT PIXEL POSITIONS FOR GAME ---

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.