Skip to main content

sample_window

Function sample_window 

Source
pub fn sample_window(
    data: &Array2<f64>,
    d_lat0: f64,
    d_lon0: f64,
    d_span: f64,
    lat0: f64,
    lon0: f64,
    lat1: f64,
    lon1: f64,
    num_lines: usize,
    elevation_pts: usize,
) -> Array2<f64>
Expand description

Sample an ANISOTROPIC display window from a preprocessed square data grid. The window covers lat0..lat1 x lon0..lon1 at num_lines x elevation_pts samples (cells of (lat1-lat0)/num_lines x (lon1-lon0)/elevation_pts degrees), reading the data grid at nearest nodes; positions outside the data grid become NaN.

This is the rectangle view: the window keeps the upstream bbox extent, line count and cell shape at every angle, while the underlying square disc (rotation-invariant) supplies previously unused terrain as the window sweeps around.