Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use NBITS=16 when saving LOS files #51

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

scottstanie
Copy link
Contributor

In [5]: fn = 'los_east.tif'
In [6]: r1 = io.load_gdal(Path("current") / fn); r2 = io.load_gdal(Path("nbits16") / fn)

# Largest difference between `main` and new version
In [7]: np.max(np.abs(r1 - r2))
Out[7]: 0.00048828125

# relative error:
In [10]: np.max(np.abs(r1 - r2)) / np.max(np.abs(r1))
Out[10]: 0.00068804994

New version is ~1/4 the size for the LOS files

(mapping-311) staniewi:opera-utils$ ls -lh l*tif current/
-rw-r--r--  1 staniewi  staff   156K Jul 15 21:50 layover_shadow_mask.tif
-rw-r--r--  1 staniewi  staff   1.3M Jul 15 21:50 los_east.tif
-rw-r--r--  1 staniewi  staff   1.5M Jul 15 21:50 los_north.tif
(mapping-311) staniewi:opera-utils$ ls -lh nbits16/
total 1672
-rw-r--r--  1 staniewi  staff   156K Jul 15 20:45 layover_shadow_mask.tif
-rw-r--r--  1 staniewi  staff   350K Jul 15 20:45 los_east.tif
-rw-r--r--  1 staniewi  staff   328K Jul 15 20:45 los_north.tif

@scottstanie scottstanie merged commit 1610ba9 into opera-adt:main Jul 16, 2024
5 checks passed
@scottstanie scottstanie deleted the compress-more branch July 16, 2024 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant