Skip to content

Commit

Permalink
Fix after test run
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Apr 24, 2024
1 parent d00a3a8 commit 2cb0219
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/gdal_contour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ GDALContourAppOptionsGetParser(GDALContourOptions *psOptions)

group.add_argument("-fl")
.metavar("<level>")
.nargs(argparse::nargs_pattern::at_least_one)
.scan<'g', double>()
.append()
.action([psOptions](const std::string &s)
{ psOptions->adfFixedLevels.push_back(CPLAtof(s.c_str())); })
.help(_("Name one or more \"fixed levels\" to extract."));
Expand Down Expand Up @@ -328,7 +328,7 @@ MAIN_START(argc, argv)
/* Create the output file. */
/* -------------------------------------------------------------------- */
CPLString osFormat;
if (!sOptions.osFormat.empty())
if (sOptions.osFormat.empty())
{
const auto aoDrivers = GetOutputDriversFor(
sOptions.aosDestFilename.c_str(), GDAL_OF_VECTOR);
Expand Down Expand Up @@ -411,12 +411,12 @@ MAIN_START(argc, argv)
CreateElevAttrib(sOptions.osElevAttrib.c_str(), hLayer);
}

if (sOptions.osElevAttribMin.empty())
if (!sOptions.osElevAttribMin.empty())
{
CreateElevAttrib(sOptions.osElevAttribMin.c_str(), hLayer);
}

if (sOptions.osElevAttribMax.empty())
if (!sOptions.osElevAttribMax.empty())
{
CreateElevAttrib(sOptions.osElevAttribMax.c_str(), hLayer);
}
Expand Down

0 comments on commit 2cb0219

Please sign in to comment.