Skip to content

Commit

Permalink
Merge pull request #11030 from elpaso/bugfix-gh11028-gdal_rasterize-a…
Browse files Browse the repository at this point in the history
…llow-q-in-library-mode

[gdal_rasterize] allow -q in library mode
  • Loading branch information
rouault authored Oct 16, 2024
2 parents c72acef + 7477f13 commit 5033ea2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/gdal_rasterize_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,17 @@ GDALRasterizeOptionsGetParser(GDALRasterizeOptions *psOptions,
.action([psOptions](const std::string &)
{ psOptions->bCreateOutput = true; });

// Written that way so that in library mode, users can still use the -q
// switch, even if it has no effect
argParser->add_quiet_argument(
psOptionsForBinary ? &(psOptionsForBinary->bQuiet) : nullptr);

if (psOptionsForBinary)
{

argParser->add_open_options_argument(
psOptionsForBinary->aosOpenOptions);

argParser->add_quiet_argument(&psOptionsForBinary->bQuiet);

argParser->add_argument("src_datasource")
.metavar("<src_datasource>")
.store_into(psOptionsForBinary->osSource)
Expand Down

0 comments on commit 5033ea2

Please sign in to comment.