From 07875b1cdefa34d3e5a7cb21b9e93070d0d93d87 Mon Sep 17 00:00:00 2001 From: core Date: Sun, 20 Oct 2024 10:40:00 -0400 Subject: [PATCH] remove --- wxbox-tiler/src/sources/noaa/mod.rs | 47 ----------------------------- 1 file changed, 47 deletions(-) diff --git a/wxbox-tiler/src/sources/noaa/mod.rs b/wxbox-tiler/src/sources/noaa/mod.rs index 2f6d854..0a178cd 100644 --- a/wxbox-tiler/src/sources/noaa/mod.rs +++ b/wxbox-tiler/src/sources/noaa/mod.rs @@ -151,53 +151,6 @@ async fn mrms_cref(path: web::Path<(i32, i32, i32)>, data: Data) -> Ht } } -/* - for (lat, row) in map.range(closest_south..=closest_north) { - let closest_west = match closest_key(&row, bbox.west) { - Some(c) => c, - None => { eprintln!("row LUT is empty?"); return HttpResponse::new(StatusCode::NOT_FOUND); } - }; - let closest_east = match closest_key(&row, bbox.east) { - Some(c) => c, - None => { eprintln!("row LUT is empty?"); return HttpResponse::new(StatusCode::NOT_FOUND); } - }; - for (long, gridpoint) in row.range(closest_west..=closest_east) { - let epsg_lon = **long; - let epsg_lat = **lat; - - let wm_x = epsg_lon; - let wm_y = epsg_lat.tan().asinh(); - - let x = 0.5 + wm_x / 360.0; - let y = 0.5 - wm_y / (2.0 * std::f64::consts::PI); - - let zoom = z; - let n = 2.0_f64.powi(zoom); - - let x_tile = n * x; - let y_tile = n * y; - - let x_pixel = x_tile.fract() * 256.0; - let y_pixel = y_tile.fract() * 256.0; - - let xf = x_pixel.trunc() as usize; - let yf = y_pixel.trunc() as usize; - - println!("@{} -> {}: {} -> {} -> {} -> {} -> {} => {}\n{} -> {} -> {} -> {} -> {} => {}", z, n, epsg_lon, wm_x, x, x_tile, x_pixel, xf, epsg_lat, wm_y, y, y_tile, y_pixel, yf); - - let mut color = pal.color_for(*gridpoint); - - let existing = image.get(xf, yf); - if existing != (Color { red: 0, green: 0, blue: 0, alpha: 0 }) { - color = color.average(existing); - } - - image.set(xf, yf, color); - } - } - - */ - let mut buf: Vec = vec![]; // borrow checker insanity {