[gdal-dev] inconsistent naming for the CLI "input" argument

Chris Toney jctoney at gmail.com
Sat Apr 4 23:21:00 PDT 2026


A large majority of the CLI algorithms use `-i, --input <INPUT>` for
the input arg, and those are the names generally described in
specifications. There is a lot of variation though. I'm not suggesting
they should all be made entirely consistent. Various aliases make
sense to have in some cases. But several cases seem worth considering.

The main issue is the occasional use of "dataset" as an alias for
"input". It's inconsistently available as an alias which seems not
ideal, but it also shows up in unexpected ways.

"raster edit" has only --dataset with no --input or -i:
--dataset <DATASET>

"raster overview add" has:
-i, --dataset, --input <INPUT>

But "raster overview delete" and "raster overview refresh" have only:
--dataset <DATASET>

A dataset-specific one "dataset check" doesn't use it:
-i, --input <INPUT>

Is the "dataset" alias really worth having?

A couple others are unique cases that may not be a problem. These just
stand out as different since meta_var rarely deviates from the naming
pattern.

"raster calc" has:
-i, --input <INPUTS>

"raster blend" has:
-i, --color-input, --input <COLOR-INPUT>

Those are the only cases I've found where the meta_var name is
different than the long name. Nearly all have <INPUT> for --input even
if there is an alias, e.g., "raster pansharpen" has `-i,
--panchromatic, --input <INPUT>`. I checked several others that can
take multiple input datasets, and "raster calc" is the only one I
found with plural INPUTS. Maybe that's not a big deal because the
meta_var is only for display in the documentation? It could still be
worth making them consistent for readability. Since <INPUT> is almost
always used for the positional input dataset(s), when I see
<COLOR-INPUT> it looks like possibly something other than a raster
dataset.

Thanks.

Chris


More information about the gdal-dev mailing list