Remove RRIM and Multi-Hillshade RGB, fix DTM resolution reuse bug, add --init to docker run
- Remove generate_rrim, generate_multi_hillshade, _compute_openness_both - Remove corresponding VIZ_STEPS entries, COLORMAPS, RGB_LEGENDS, and tests - Fix DTM resolution mismatch: existing DTM at different resolution is now regenerated instead of silently reused - Propagate actual DTM resolution to visualizations and rendering - Add --init to docker run commands for proper signal handling on Ctrl+C - Add .playwright-mcp/ to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@ -201,71 +201,6 @@ class TestFlow:
|
||||
assert np.nanmin(valid) >= 0
|
||||
|
||||
|
||||
class TestRRIM:
|
||||
def test_generates_tif(self, synthetic_dem, tmp_output_dir):
|
||||
from lidar_pipeline.visualizations import generate_rrim
|
||||
result = generate_rrim(synthetic_dem, "test", tmp_output_dir, 5.0)
|
||||
assert result is not None
|
||||
assert result.exists()
|
||||
assert result.suffix == ".tif"
|
||||
|
||||
def test_rrim_is_rgb_3band(self, synthetic_dem, tmp_output_dir):
|
||||
import rasterio
|
||||
from lidar_pipeline.visualizations import generate_rrim
|
||||
result = generate_rrim(synthetic_dem, "test", tmp_output_dir, 5.0)
|
||||
with rasterio.open(result) as src:
|
||||
assert src.count == 3, f"Expected 3 bands, got {src.count}"
|
||||
assert src.dtypes[0] == 'uint8'
|
||||
|
||||
def test_rrim_values_0_255(self, synthetic_dem, tmp_output_dir):
|
||||
import rasterio
|
||||
from lidar_pipeline.visualizations import generate_rrim
|
||||
result = generate_rrim(synthetic_dem, "test", tmp_output_dir, 5.0)
|
||||
with rasterio.open(result) as src:
|
||||
for band in range(1, 4):
|
||||
data = src.read(band)
|
||||
assert data.min() >= 0
|
||||
assert data.max() <= 255
|
||||
|
||||
def test_rrim_no_nan(self, synthetic_dem, tmp_output_dir):
|
||||
"""RRIM is uint8 RGB — NaN zones are set to 0 (black)."""
|
||||
import rasterio
|
||||
from lidar_pipeline.visualizations import generate_rrim
|
||||
result = generate_rrim(synthetic_dem, "test", tmp_output_dir, 5.0)
|
||||
with rasterio.open(result) as src:
|
||||
# uint8 bands should not have NaN
|
||||
for band in range(1, 4):
|
||||
data = src.read(band)
|
||||
assert not np.isnan(data).any(), f"Band {band} has NaN values"
|
||||
|
||||
|
||||
class TestMultiHillshade:
|
||||
def test_generates_tif(self, synthetic_dem, tmp_output_dir):
|
||||
from lidar_pipeline.visualizations import generate_multi_hillshade
|
||||
result = generate_multi_hillshade(synthetic_dem, "test", tmp_output_dir, 5.0)
|
||||
assert result is not None
|
||||
assert result.exists()
|
||||
assert result.suffix == ".tif"
|
||||
|
||||
def test_multi_hillshade_is_rgb_3band(self, synthetic_dem, tmp_output_dir):
|
||||
import rasterio
|
||||
from lidar_pipeline.visualizations import generate_multi_hillshade
|
||||
result = generate_multi_hillshade(synthetic_dem, "test", tmp_output_dir, 5.0)
|
||||
with rasterio.open(result) as src:
|
||||
assert src.count == 3, f"Expected 3 bands, got {src.count}"
|
||||
assert src.dtypes[0] == 'uint8'
|
||||
|
||||
def test_multi_hillshade_values_0_255(self, synthetic_dem, tmp_output_dir):
|
||||
import rasterio
|
||||
from lidar_pipeline.visualizations import generate_multi_hillshade
|
||||
result = generate_multi_hillshade(synthetic_dem, "test", tmp_output_dir, 5.0)
|
||||
with rasterio.open(result) as src:
|
||||
for band in range(1, 4):
|
||||
data = src.read(band)
|
||||
assert data.min() >= 0
|
||||
assert data.max() <= 255
|
||||
|
||||
|
||||
class TestLocalDominance:
|
||||
def test_generates_tif(self, synthetic_dem, tmp_output_dir):
|
||||
from lidar_pipeline.visualizations import generate_local_dominance
|
||||
|
||||
Reference in New Issue
Block a user