Compare commits
3 commits
1b34b64d88
...
62a177108c
| Author | SHA1 | Date | |
|---|---|---|---|
| 62a177108c | |||
| c3e8809548 | |||
| 0002901152 |
5 changed files with 7 additions and 12 deletions
10
.gitignore
vendored
10
.gitignore
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ---
|
||||
|
|
|
|||
BIN
datenvisualisierung/tif_check.png
Normal file
BIN
datenvisualisierung/tif_check.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 244 KiB |
BIN
datenvisualisierung/trinkbrunnen_karte.png
Normal file
BIN
datenvisualisierung/trinkbrunnen_karte.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 143 KiB |
BIN
trinkbrunnen_pixel_positions.npy
Normal file
BIN
trinkbrunnen_pixel_positions.npy
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue