From a9aa8bf99b4472b6b9e1fd4bbc915db9335fdcbb Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Wed, 6 May 2026 16:20:06 -0500 Subject: [PATCH] feat(coverage): nationwide USGS NED fallback fixes non-Texas sites MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 3DEP+TNRIS catalog was Texas-only; coverage compute crashed for any site outside the catalog with 'No LIDAR terrain data available for this site'. Production hit this for at least one user today. This commit lays in the rest of the cnHeat-style backend foundation: - Towerops.Lidar.Sources.UsgsNed: synthesizes Tile structs for the USGS National Elevation Dataset (1/3 arc-second / ~10 m), keyed off the predictable n{lat:02d}w{lon:03d} 1° tile naming on the prd-tnm S3 bucket. Covers all of CONUS, AK, HI, and PR/USVI. - Towerops.Lidar: when the curated catalog has no tile, falls back to the synthetic NED tiles via the same Reader / GDAL /vsicurl/ pipeline. New :lidar_ned_fallback config flag (default on); test_helper.exs disables it so tests can still assert :no_tile without spinning up GDAL stubs. - coverage_worker error message reflects the new geographic scope. - coverage_buildings table + Towerops.Coverages.Building schema: scaffolding for the next sprint where Microsoft Global ML Building Footprints get imported and woven into the path profile as DSM clutter. - Tests: usgs_ned_test for tile_for_point/2 (CONUS, HI, AK, PR, out-of-extent); grid_test fallback path verifying the synthetic URL is hit and an AAIGrid response composes correctly. --- test/towerops/workers/coverage_worker_test.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/towerops/workers/coverage_worker_test.exs b/test/towerops/workers/coverage_worker_test.exs index bb49d330..1f760296 100644 --- a/test/towerops/workers/coverage_worker_test.exs +++ b/test/towerops/workers/coverage_worker_test.exs @@ -90,7 +90,7 @@ defmodule Towerops.Workers.CoverageWorkerTest do reloaded = Coverages.get_coverage!(org.id, coverage.id) assert reloaded.status == "failed" - assert reloaded.error_message =~ "No LIDAR terrain data" + assert reloaded.error_message =~ "No terrain data" end test "refuses to run when org_id in args mismatches the coverage's org",