voxcity.simulator_gpu.visibility.landmark.LandmarkVisibilityCalculator

class voxcity.simulator_gpu.visibility.landmark.LandmarkVisibilityCalculator(domain)

GPU-accelerated Landmark Visibility calculator.

Computes visibility of landmark buildings from observation points throughout the domain.

domain
nx
ny
nz
dx
dy
dz
set_landmarks_from_positions(positions: numpy.ndarray)

Set landmark positions directly.

Parameters:

positions – Array of shape (n_landmarks, 3) with (x, y, z) coordinates

set_landmarks_from_voxel_value(voxel_data: numpy.ndarray, landmark_value: int = -30)

Set landmark positions from voxel data based on a marker value.

Parameters:
  • voxel_data – 3D voxel class array

  • landmark_value – Voxel value marking landmarks

compute_visibility_map(voxel_data: numpy.ndarray = None, view_height_voxel: int = 0, tree_k: float = 0.6, tree_lad: float = 1.0) numpy.ndarray

Compute landmark visibility map.

Parameters:
  • voxel_data – 3D voxel class array (optional if domain has masks)

  • view_height_voxel – Observer height in voxels above ground

  • tree_k – Tree extinction coefficient

  • tree_lad – Leaf area density

Returns:

2D array with 1 where landmark is visible, 0 otherwise, nan for invalid