Skip to content

Commit

Permalink
WCS output: fix handling of multiple bands when setting band-specific…
Browse files Browse the repository at this point in the history
… creation options or metada items
  • Loading branch information
rouault committed Jan 27, 2022
1 parent e74a176 commit 31f95ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mapwcs.cpp
Expand Up @@ -1599,7 +1599,7 @@ void msWCSApplyLayerCreationOptions(layerObj* lp,
char szKeyBeginning[256];
size_t nKeyBeginningLength;
int nBands = 0;
char** papszBandNumbers = msStringSplit(bandlist, ' ', &nBands);
char** papszBandNumbers = msStringSplit(bandlist, ',', &nBands);

snprintf(szKeyBeginning, sizeof(szKeyBeginning),
"wcs_outputformat_%s_creationoption_", format->name);
Expand Down Expand Up @@ -1701,7 +1701,7 @@ void msWCSApplyDatasetMetadataAsCreationOptions(layerObj* lp,
if( !bWCSMetadataFound )
{
int nBands = 0;
char** papszBandNumbers = msStringSplit(bandlist, ' ', &nBands);
char** papszBandNumbers = msStringSplit(bandlist, ',', &nBands);
int i;
for(i = 0; i < nBands; i++ )
{
Expand Down Expand Up @@ -1756,7 +1756,7 @@ void msWCSApplyLayerMetadataItemOptions(layerObj* lp,
char szKeyBeginning[256];
size_t nKeyBeginningLength;
int nBands = 0;
char** papszBandNumbers = msStringSplit(bandlist, ' ', &nBands);
char** papszBandNumbers = msStringSplit(bandlist, ',', &nBands);

snprintf(szKeyBeginning, sizeof(szKeyBeginning),
"wcs_outputformat_%s_mdi_", format->name);
Expand Down Expand Up @@ -1888,7 +1888,7 @@ void msWCSApplySourceDatasetMetadata(layerObj* lp,
}

int nBands = 0;
char** papszBandNumbers = msStringSplit(bandlist, ' ', &nBands);
char** papszBandNumbers = msStringSplit(bandlist, ',', &nBands);
int i;
for(i = 0; i < nBands; i++ )
{
Expand Down

0 comments on commit 31f95ba

Please sign in to comment.