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

gdal2tiles: Error Encountered When Specifying PNG Driver Parameter -co ZLEVEL=1 #9905

Open
whisper-bye opened this issue May 11, 2024 · 3 comments

Comments

@whisper-bye
Copy link

What is the bug?

When I attempt to use the gdal2tiles.py tool and specify the PNG driver parameter -co ZLEVEL=1, I encounter an error.

$ gdal2tiles.py -co ZLEVEL=1 input.tif output_folder
Usage: gdal2tiles.py [options] input_file [output]

gdal2tiles.py: error: Processing of several input files is not supported.


Please first use a tool like gdal_vrtmerge.py or gdal_merge.py on the files: gdal_vrtmerge.py -o merged.vrt ZLEVEL=1 input.tif output_folder

Steps to reproduce the issue

$ gdal2tiles.py -co ZLEVEL=1 input.tif output_folder

Versions and provenance

gdal2tiles.py --version
GDAL 3.8.5, released 2024/04/02

Additional context

No response

@jratike80
Copy link
Collaborator

By the documentation https://gdal.org/programs/gdal2tiles.html creation options are not supported. I added an "enhancement" label.

@rouault
Copy link
Member

rouault commented May 11, 2024

-co is not a supported option of gdal2tiles. The argument parser is a bit confused because I believe it somehow starts to interprets -co as the -c (--copyright) option

@rouault
Copy link
Member

rouault commented May 11, 2024

ok, digging further, "-co" is interpreted as "--copyright=o", and then ZLEVEL=1 is considered as an input file name, so the utility sees ZLEVEL=1 and input.tif as 2 input filenames, which isn't supported

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

3 participants