Skip to content

Commit

Permalink
Pansharpening: fix error messages on consistency checks (#9361)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Mar 1, 2024
1 parent 0e7bb3a commit a032c1a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions alg/gdalpansharpen.cpp
Expand Up @@ -307,7 +307,7 @@ GDALPansharpenOperation::Initialize(const GDALPansharpenOptions *psOptionsIn)
CPLError(CE_Failure, CPLE_AppDefined,
"Dimensions of input spectral band %d different from "
"first spectral band",
i);
i + 1);
return CE_Failure;
}

Expand All @@ -317,8 +317,8 @@ GDALPansharpenOperation::Initialize(const GDALPansharpenOptions *psOptionsIn)
{
CPLError(CE_Failure, CPLE_AppDefined,
"Cannot retrieve dataset associated with "
"ahInputSpectralBands[%i]",
i);
"input spectral band %d",
i + 1);
return CE_Failure;
}
// Make sure that the band is really a first level child of the owning dataset
Expand All @@ -334,16 +334,16 @@ GDALPansharpenOperation::Initialize(const GDALPansharpenOptions *psOptionsIn)
{
CPLError(
CE_Failure, CPLE_AppDefined,
"ahInputSpectralBands[%d] band has no associated geotransform",
i);
"input spectral band %d band has no associated geotransform",
i + 1);
return CE_Failure;
}
if (adfMSGT != adfRefMSGT)
{
CPLError(CE_Failure, CPLE_AppDefined,
"ahInputSpectralBands[%d] band has a different "
"geotransform than ahInputSpectralBands[0]",
i);
"input spectral band %d has a different "
"geotransform than the first spectral band",
i + 1);
return CE_Failure;
}

Expand Down

0 comments on commit a032c1a

Please sign in to comment.