Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# dev
- Fix bug 2461, due to an error on ZIP compression while making buffered tile.
The temporary buffered tile is now a LAS (instead of a LAZ), so there is no compression.
- Adapt ci for github
- host docker image on ghcr.io
- update dependencies
Expand Down
9 changes: 6 additions & 3 deletions ctview/main_ctview.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ def main_ctview(config: DictConfig):

# Buffer
log.info(f"\nStep 1: Create buffered las file with buffer = {config.buffer.size}")
# Use .las extension (instead of .laz) to avoid a bug with LAZ compression
buffered_las = Path(initial_las_filename).stem + ".las"
if config.buffer.output_subdir:
las_with_buffer = Path(out_dir) / config.buffer.output_subdir / initial_las_filename
las_with_buffer = Path(out_dir) / config.buffer.output_subdir / buffered_las
else:
las_with_buffer = Path(tmpdir_buffer) / initial_las_filename
las_with_buffer.parent.mkdir(parents=True, exist_ok=True)
las_with_buffer = Path(tmpdir_buffer) / buffered_las

las_with_buffer.parent.mkdir(parents=True, exist_ok=True)
print("las with buffer:", las_with_buffer)
epsg = config.io.spatial_reference
create_las_with_buffer(
input_dir=str(in_dir),
Expand Down
2 changes: 1 addition & 1 deletion test/test_add_color.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ def test_color_raster_with_interpolation():
# pixel with value = 5
assert np.all(data[:, 1, 2] == np.array([255, 255, 255]))
# The central pixel value (4) is surrounded with [0, 0, 0] and [255, 255, 255] values
assert np.all(data[:, 1, 1] == np.array([127, 127, 127]))
assert np.all(data[:, 1, 1] == np.array([128, 128, 128]))
# pixel with value = 0 (= no data, but is defined in the colormap)
assert np.all(data[:, 0, 0] == np.array([1, 2, 3]))
2 changes: 1 addition & 1 deletion test/test_main_ctview.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def assert_las_buffer_is_not_empty(output: str, filename: str):
def test_main_modif_config():
input_dir = Path("data") / "las" / "classee"
output_dir = OUTPUT_DIR / "main_modif_config"
outfile_buffer = output_dir / "tmp" / "buffer" / "test_data_77050_627755_LA93_IGN69_buildings.laz"
outfile_buffer = output_dir / "tmp" / "buffer" / "test_data_77050_627755_LA93_IGN69_buildings.las"
outfile_density = output_dir / "density" / "test_data_77050_627755_LA93_IGN69_buildings_density.tif"
outfile_class_raw = (
output_dir / "class" / "tmp" / "binary" / "test_data_77050_627755_LA93_IGN69_buildings_class_raw.tif"
Expand Down