Skip to content

gdal_calc incorrectly reports requiring no arguments for the --debug option #11312

@aalakbarova

Description

@aalakbarova

What is the bug?

the help page gdal_calc lists a --debug option, but says that it requires no arguments. In reality however, it seems to require a int value passed - the more sensible options being 0, 1 (but true and false also work)

Steps to reproduce the issue

gdal_calc --debug

returns ERROR 1: --debug option given without debug level.


Passing --debug before another option results in a cryptic error message:

gdal_calc.bat --calc "A+B" --format SAGA --type Float32 -A foo --A_band 1 -B bar --B_band 1 --debug --outfile baz

returns: gdal_calc.py: error: argument --B_band: invalid int value: 'baz'

Versions and provenance

OS: Windows 11
GDAL version: GDAL 3.9.3, released 2024/10/07 (the newest available version)
Source of the GDAL binary: OSGeo4W

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions