Skip to content

Commit

Permalink
add to dos
Browse files Browse the repository at this point in the history
  • Loading branch information
dugalh committed Dec 9, 2024
1 parent 316e2ac commit 3353142
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion orthority/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
# enable on-demand download and caching of proj transformation grids (NB must be done before
# importing rasterio)
# TODO: can this be called in CLI, then document and leave it up to the API user to call themselves?
# it needs to be done before importing rasterio though...
# it needs to be done before importing rasterio though... Also, it is worth investigating, and
# documenting if the cache is permanent and or manually downloading grids with projsync would
# speed things up.
os.environ.update(PROJ_NETWORK='ON')

import logging
Expand Down
4 changes: 3 additions & 1 deletion orthority/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,9 @@ def create_profile(
raise OrthorityError(
f"JPEG compression is supported for 'uint8' and 'uint16' data types only."
)

# TODO: pixel interleaving with deflate compression can be much bigger than band
# interleaving - does it depend on data being written band-by=band? (see e.g.
# geedim/scripts/xee_rioxarray_exp.py)
profile.update(compress=compress.value)

if driver is Driver.gtiff:
Expand Down
2 changes: 2 additions & 0 deletions orthority/ortho.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ def _remap(
try:
future.result()
except Exception as ex:
# TODO: add cancel_futures=True here and in all executors when min
# supported python >= 3.9
executor.shutdown(wait=False)
raise RuntimeError('Could not remap tile.') from ex
progress.update()
Expand Down

0 comments on commit 3353142

Please sign in to comment.