Skip to content

gdal CLI: add mention in --help when argument not available in a pipeline step#14393

Merged
rouault merged 4 commits into
OSGeo:masterfrom
rouault:fix_14389
Apr 20, 2026
Merged

gdal CLI: add mention in --help when argument not available in a pipeline step#14393
rouault merged 4 commits into
OSGeo:masterfrom
rouault:fix_14389

Conversation

@rouault
Copy link
Copy Markdown
Member

@rouault rouault commented Apr 18, 2026

and gdal vector edit: add --output-layer in pipeline mode too

Fixes #14389

$ gdal vector edit --help
Usage: gdal vector edit [OPTIONS] <INPUT> <OUTPUT>

Edit metadata of a vector dataset.

Positional arguments:
  -i, --input <INPUT>                                  Input vector datasets [required] [not in pipelines]
  -o, --output <OUTPUT>                                Output vector dataset [required] [not in pipelines]

Common Options:
  -h, --help                                           Display help message and exit
  --json-usage                                         Display usage as JSON document and exit
  --config <KEY>=<VALUE>                               Configuration option [may be repeated]
  -q, --quiet                                          Quiet mode (no progress bar or warning message) [not in pipelines]

Options:
  -l, --layer, --input-layer <INPUT-LAYER>             Input layer name(s) [may be repeated] [not in pipelines]
  -f, --of, --format, --output-format <OUTPUT-FORMAT>  Output format ("GDALG" allowed) [not in pipelines]
  --co, --creation-option <KEY>=<VALUE>                Creation option [may be repeated] [not in pipelines]
  --lco, --layer-creation-option <KEY>=<VALUE>         Layer creation option [may be repeated] [not in pipelines]
  --overwrite                                          Whether overwriting existing output dataset is allowed [not in pipelines]
  --update                                             Whether to open existing dataset in update mode [not in pipelines]
  --overwrite-layer                                    Whether overwriting existing output layer is allowed [not in pipelines]
  --append                                             Whether appending to existing layer is allowed [not in pipelines]
                                                       Mutually exclusive with --upsert
  --output-layer <OUTPUT-LAYER>                        Output layer name
  --skip-errors                                        Skip errors when writing features [not in pipelines]
  --active-layer <ACTIVE-LAYER>                        Set active layer (if not specified, all)
  --geometry-type <GEOMETRY-TYPE>                      Layer geometry type
  --crs <CRS>                                          Override CRS (without reprojection)
  --metadata <KEY>=<VALUE>                             Add/update dataset metadata item [may be repeated]
  --unset-metadata <KEY>                               Remove dataset metadata item [may be repeated]
  --layer-metadata <KEY>=<VALUE>                       Add/update layer metadata item [may be repeated]
  --unset-layer-metadata <KEY>                         Remove layer metadata item [may be repeated]
  --unset-fid                                          Unset the identifier of each feature and the FID column name

Advanced Options:
  --if, --input-format <INPUT-FORMAT>                  Input formats [may be repeated] [not in pipelines]
  --oo, --open-option <KEY>=<VALUE>                    Open options [may be repeated] [not in pipelines]
  --output-oo, --output-open-option <KEY>=<VALUE>      Output open options [may be repeated] [not in pipelines]
  --upsert                                             Upsert features (implies 'append') [not in pipelines]
                                                       Mutually exclusive with --append

@rouault rouault added this to the 3.13.0 milestone Apr 18, 2026
@rouault rouault added enhancement funded through GSP Work funded through the GDAL Sponsorship Program gdal_cli Anything related to the new 3.11 "gdal" CLI frontend labels Apr 18, 2026
@ctoney
Copy link
Copy Markdown
Contributor

ctoney commented Apr 18, 2026

Should there be a C API GDALAlgorithmArgIsAvailableInPipelineStep() so bindings can query it that way?

@rouault rouault force-pushed the fix_14389 branch 2 times, most recently from 451ac74 to 9dfa861 Compare April 18, 2026 19:54
@rouault
Copy link
Copy Markdown
Member Author

rouault commented Apr 18, 2026

Should there be a C API GDALAlgorithmArgIsAvailableInPipelineStep() so bindings can query it that way?

good point, added

@geographika
Copy link
Copy Markdown
Collaborator

Thanks, @rouault - that information would have saved me some confusion (..could just have been me though).

"(not available in a pipeline step)" is maybe a bit verbose here, and clutters the output?
Perhaps one of these options?

  • "(not supported in pipelines)"
  • "(not in pipelines)"
  • "[pipeline=false]" similar to the quare brackets for "[may be repeated]"

Also:

  --output-layer <OUTPUT-LAYER>                        Output layer name

Shouldn't this be marked as not available in a pipeline as noted in the original issue at #14389 ?
Most of the unavailable options make sense (inputs and outputs), but I'm still not sure why --output-layer is available for some steps in a pipeline but not others.

@rouault
Copy link
Copy Markdown
Member Author

rouault commented Apr 19, 2026

  • "(not in pipelines)"

I've opted for "[not in pipelines"]

Shouldn't this be marked as not available in a pipeline

I've actually added support for --output-layer in vector edit as pipeline step in a commit of this PR

@rouault rouault force-pushed the fix_14389 branch 3 times, most recently from f3f8184 to 91fd670 Compare April 19, 2026 15:03
@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 71.787% (-0.02%) from 71.803% — rouault:fix_14389 into OSGeo:master

Comment thread gcore/gdalalgorithm.cpp Outdated
@rouault rouault merged commit 146f54c into OSGeo:master Apr 20, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement funded through GSP Work funded through the GDAL Sponsorship Program gdal_cli Anything related to the new 3.11 "gdal" CLI frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation clarifications over available pipeline parameters

5 participants