Reduce location map context to 30km and use zoom 12

The 80km context made the red LiDAR zone rectangle too small to see.
30km (15km radius) at zoom 12 gives a clear view where the 1km data
zone is visible as a distinct red rectangle in the inset map.
This commit is contained in:
Antoine Jacquin
2026-05-15 12:01:37 +02:00
parent 5af53a390f
commit 9e89686ac5

View File

@ -274,8 +274,8 @@ def _apply_colormap(data, tif_file):
def _download_location_map(min_x, max_x, min_y, max_y):
"""Download a wide-area IGN topographic map for location context.
Downloads a zoomed-out IGN PLANIGNV2 tile covering ~80km around the
processed zone, giving wider geographic context. Results are cached to
Downloads a zoomed-out IGN PLANIGNV2 tile covering ~30km around the
processed zone, giving regional context. Results are cached to
avoid re-downloading for each visualization in the same tile.
Args:
@ -305,12 +305,13 @@ def _download_location_map(min_x, max_x, min_y, max_y):
center_lat = clats[0]
center_lon = clons[0]
# Use zoom 10 for context (wider view: ~150m/px)
context_zoom = 10
# Use zoom 12 for context (~30m/px — good detail at 15km radius)
context_zoom = 12
# Expand bounds to ~80km for regional context (shows nearby cities/rivers)
# At zoom 10, this gives ~500px wide image — ideal for a small inset
context_half = 40000 # 40km each side = 80km total
# Expand bounds to ~30km for regional context
# Large enough to see surrounding towns/rivers, small enough that
# the processed zone (typically 1km) is clearly visible as a red rectangle
context_half = 15000 # 15km each side = 30km total
context_min_x = center_x - context_half
context_max_x = center_x + context_half
context_min_y = center_y - context_half