repair align trinkbrunnen
This commit is contained in:
parent
99c95b6325
commit
0002901152
1 changed files with 6 additions and 3 deletions
|
|
@ -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 ---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue