Skip to content

Commit

Permalink
Fix agl image endpoint on empty flight cones
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoff97 committed Oct 2, 2024
1 parent 912b178 commit 0fdf96a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions backend-rust/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,17 @@ fn get_agl_image<'a>(
}
}

imgx = (x_upper - x_lower) + 1;
imgy = (y_upper - y_lower) + 1;
if x_lower == usize::MAX {
imgx = 1;
imgy = 1;
x_lower = 0;
x_upper = 0;
y_lower = 0;
y_upper = 0;
} else {
imgx = (x_upper - x_lower) + 1;
imgy = (y_upper - y_lower) + 1;
}

let heights_sub = heights.slice(s![x_lower..(x_upper + 1), y_lower..(y_upper + 1)]);

Expand Down

0 comments on commit 0fdf96a

Please sign in to comment.