Skip to content

Commit

Permalink
reduce dem range to minimise occlusion
Browse files Browse the repository at this point in the history
  • Loading branch information
dugalh committed Sep 28, 2023
1 parent 20e0bdd commit 5adb038
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion simple_ortho/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _configure_logging(verbosity: int):
log_level = max(10, 20 - 10 * verbosity)

# apply config to package logger, rather than root logger
pkg_logger = logging.getLogger(__package__)
pkg_logger = logging.getLogger('simple_ortho')
formatter = PlainInfoFormatter()
handler = logging.StreamHandler(sys.stderr)
handler.setFormatter(formatter)
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def create_dem(
bounds = np.array(ortho_bounds(camera, include_camera=include_camera))
size = 1 + np.ceil((bounds[2:] - bounds[:2]) / resolution).astype('int')
array = np.stack(
(sinusoidal(size[::-1]) * 250 + camera._T[2] - 200, np.ones(size[::-1]) * (250 / 2) + camera._T[2] - 200,),
(sinusoidal(size[::-1]) * 50 + camera._T[2] - 200, np.ones(size[::-1]) * (50 / 2) + camera._T[2] - 200,),
axis=0
).astype(dtype) # yapf: disable

Expand Down Expand Up @@ -391,7 +391,7 @@ def float_utm34n_partial_dem_file(tmpdir_factory: pytest.TempdirFactory, pinhole
"""
filename = Path(tmpdir_factory.mktemp('data')).joinpath('float_utm34n_dem.tif')
array, profile = create_dem(pinhole_camera, utm34n_crs, resolution=_dem_resolution, dtype='float32')
mask = np.tril(np.ones(array.shape, dtype='bool'), k=-1)
mask = np.fliplr(np.tril(np.ones(array.shape, dtype='bool'), k=1))
array[mask] = profile['nodata']
with rio.open(filename, 'w', **profile) as im:
im.write(array)
Expand Down

0 comments on commit 5adb038

Please sign in to comment.