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

[Feature request] NBITS option for COG #7361

Closed
arkanoid87 opened this issue Mar 6, 2023 · 1 comment
Closed

[Feature request] NBITS option for COG #7361

arkanoid87 opened this issue Mar 6, 2023 · 1 comment
Assignees

Comments

@arkanoid87
Copy link

The current COG driver does not support NBITS option, which is available in GTIFF driver.

with COG:

gdal_translate -of byte -of COG -co NBITS=1 input.tif output_1bpp.tif
Warning 6: driver COG does not support creation option NBITS
# option ignored                                                                                                                                               

With GTIFF:

gdal_translate -of byte -of gtiff -co NBITS=1 input.tif output_1bpp.tif
# success                                                                                                                                                     

To get the equivalent of a COG with NBITS < 8 with GEOTIFF, it would be required to manually add all the settings collected into aosOptions variable here as creation options of a GTIFF file

poGTiffDrv->CreateCopy(pszFilename, poCurDS, false, aosOptions.List(),

But the contents of the variable is not dumped in debug log

Having a COG with smaller-than-byte NBITS is useful to get faster I/O using less CPU, and possibly also smaller files depending on compression strategy.

@rouault rouault self-assigned this Mar 30, 2023
rouault added a commit that referenced this issue Apr 12, 2023
COG: add NBITS creation option (fixes #7361)
@arkanoid87
Copy link
Author

thanks!

tschaub pushed a commit to tschaub/gdal that referenced this issue Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants