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