@@ -634,8 +634,8 @@ static int msWCSParseScaleString20(char *string,
634
634
/* Subset string: axis ( value ) */
635
635
/************************************************************************/
636
636
637
- static int msWCSParseScaleExtentString20 (char * string , char * outAxis ,
638
- size_t axisStringLen ,
637
+ static int msWCSParseScaleExtentString20 (char * string , char * outAxis ,
638
+ size_t axisStringLen ,
639
639
int * outMin , int * outMax )
640
640
{
641
641
char * number = NULL ;
@@ -720,7 +720,7 @@ xmlNodePtr msLibXml2GetFirstChild(xmlNodePtr parent, const char *name) {
720
720
721
721
722
722
/*
723
- Utility function to get the first child of a node with a given node name and
723
+ Utility function to get the first child of a node with a given node name and
724
724
namespace.
725
725
*/
726
726
@@ -736,7 +736,7 @@ xmlNodePtr msLibXml2GetFirstChildNs(xmlNodePtr parent, const char *name, xmlNsPt
736
736
return node ;
737
737
}
738
738
}
739
- return NULL ;
739
+ return NULL ;
740
740
}
741
741
742
742
/************************************************************************/
@@ -1243,7 +1243,7 @@ static int msWCSParseRequest20_XMLGetCoverage(
1243
1243
XML_FOREACH_CHILD (extensionNode , rangeItemNode ) {
1244
1244
1245
1245
XML_LOOP_IGNORE_COMMENT_OR_TEXT (rangeItemNode );
1246
-
1246
+
1247
1247
XML_ASSERT_NODE_NAME (rangeItemNode , "RangeItem" );
1248
1248
1249
1249
if (!rangeItemNode -> children ) {
@@ -1278,7 +1278,7 @@ static int msWCSParseRequest20_XMLGetCoverage(
1278
1278
value = msSmallCalloc (length , sizeof (char ));
1279
1279
1280
1280
snprintf (value , length , "%s:%s" , start , stop );
1281
-
1281
+
1282
1282
xmlFree (start );
1283
1283
xmlFree (stop );
1284
1284
@@ -1296,7 +1296,7 @@ static int msWCSParseRequest20_XMLGetCoverage(
1296
1296
1297
1297
else if (EQUAL ((char * ) extensionNode -> name , "outputCrs" )) {
1298
1298
msFree (params -> outputcrs );
1299
- params -> outputcrs = (char * )xmlNodeGetContent (extensionNode );
1299
+ params -> outputcrs = (char * )xmlNodeGetContent (extensionNode );
1300
1300
}
1301
1301
1302
1302
else if (EQUAL ((char * ) extensionNode -> name , "Interpolation" )) {
@@ -1316,7 +1316,7 @@ static int msWCSParseRequest20_XMLGetCoverage(
1316
1316
}
1317
1317
1318
1318
/* GeoTIFF parameters */
1319
- else if (EQUAL ((char * ) extensionNode -> name , "parameters" )
1319
+ else if (EQUAL ((char * ) extensionNode -> name , "parameters" )
1320
1320
&& extensionNode -> ns
1321
1321
&& EQUAL ((char * )extensionNode -> ns -> href , "http://www.opengis.net/gmlcov/geotiff/1.0" )) {
1322
1322
@@ -1328,7 +1328,7 @@ static int msWCSParseRequest20_XMLGetCoverage(
1328
1328
1329
1329
content = (char * )xmlNodeGetContent (parameter );
1330
1330
1331
- params -> format_options =
1331
+ params -> format_options =
1332
1332
CSLAddNameValue (params -> format_options , (char * )parameter -> name , content );
1333
1333
xmlFree (content );
1334
1334
}
@@ -1574,7 +1574,7 @@ int msWCSParseRequest20(mapObj *map,
1574
1574
char axisName [500 ];
1575
1575
int min , max ;
1576
1576
1577
- if (msWCSParseScaleExtentString20 (tokens [j ], axisName , sizeof (axisName ),
1577
+ if (msWCSParseScaleExtentString20 (tokens [j ], axisName , sizeof (axisName ),
1578
1578
& min , & max ) != MS_SUCCESS ) {
1579
1579
msFreeCharArray (tokens , num );
1580
1580
return MS_FAILURE ;
@@ -1685,7 +1685,7 @@ int msWCSParseRequest20(mapObj *map,
1685
1685
}
1686
1686
msFreeCharArray (tokens , num );
1687
1687
} else if (EQUALN (key , "GEOTIFF:" , 8 )) {
1688
- params -> format_options =
1688
+ params -> format_options =
1689
1689
CSLAddNameValue (params -> format_options , key , value );
1690
1690
}
1691
1691
/* Ignore all other parameters here */
@@ -1711,7 +1711,7 @@ static int msWCSValidateAndFindAxes20(
1711
1711
static const int numAxis = 2 ;
1712
1712
char * validXAxisNames [] = {"x" , "xaxis" , "x-axis" , "x_axis" , "long" , "long_axis" , "long-axis" , "lon" , "lon_axis" , "lon-axis" , NULL };
1713
1713
char * validYAxisNames [] = {"y" , "yaxis" , "y-axis" , "y_axis" , "lat" , "lat_axis" , "lat-axis" , NULL };
1714
- char * * validAxisNames [2 ];
1714
+ char * * validAxisNames [2 ];
1715
1715
int iParamAxis , iAcceptedAxis , iName , i ;
1716
1716
1717
1717
validAxisNames [0 ] = validXAxisNames ;
@@ -3081,7 +3081,7 @@ static int msWCSGetCapabilities20_CreateProfiles(
3081
3081
3082
3082
/* navigate to node where profiles shall be inserted */
3083
3083
for (psTmpNode = psServiceIdentification -> children ; psTmpNode -> next != NULL ; psTmpNode = psTmpNode -> next ) {
3084
- if (EQUAL ((char * )psTmpNode -> name , "ServiceTypeVersion" ))
3084
+ if (EQUAL ((char * )psTmpNode -> name , "ServiceTypeVersion" ) && ! EQUAL (( char * ) psTmpNode -> next -> name , "ServiceTypeVersion" ) )
3085
3085
break ;
3086
3086
}
3087
3087
@@ -3237,7 +3237,7 @@ int msWCSGetCapabilities20(mapObj *map, cgiRequestObj *req,
3237
3237
/* -------------------------------------------------------------------- */
3238
3238
if ( MS_WCS_20_CAPABILITIES_INCLUDE_SECTION (params , "ServiceIdentification" ) ) {
3239
3239
psNode = xmlAddChild (psRootNode , msOWSCommonServiceIdentification (
3240
- psOwsNs , map , "OGC WCS" , params -> version , "CO" , NULL ));
3240
+ psOwsNs , map , "OGC WCS" , "2.0.1,1.1.1,1.0.0" , "CO" , NULL ));
3241
3241
msWCSGetCapabilities20_CreateProfiles (map , psNode , psOwsNs );
3242
3242
}
3243
3243
@@ -3321,11 +3321,11 @@ int msWCSGetCapabilities20(mapObj *map, cgiRequestObj *req,
3321
3321
/* TODO: use URIs/URLs once they are specified */
3322
3322
char * interpolation_methods [] = {"NEAREST" , "AVERAGE" , "BILINEAR" };
3323
3323
int i ;
3324
- xmlNodePtr imNode = xmlNewChild (psExtensionNode , psIntNs ,
3324
+ xmlNodePtr imNode = xmlNewChild (psExtensionNode , psIntNs ,
3325
3325
BAD_CAST "InterpolationMetadata" , NULL );
3326
3326
3327
3327
for (i = 0 ; i < 3 ; ++ i ) {
3328
- xmlNewChild (imNode , psIntNs , BAD_CAST "InterpolationSupported" ,
3328
+ xmlNewChild (imNode , psIntNs , BAD_CAST "InterpolationSupported" ,
3329
3329
BAD_CAST interpolation_methods [i ]);
3330
3330
}
3331
3331
}
@@ -3339,7 +3339,7 @@ int msWCSGetCapabilities20(mapObj *map, cgiRequestObj *req,
3339
3339
if ((crs_list = msOWSGetProjURI (& (map -> projection ),
3340
3340
& (map -> web .metadata ),
3341
3341
"CO" , MS_FALSE )) != NULL ) {
3342
- msLibXml2GenerateList (crsMetadataNode , psCrsNs , "crsSupported" ,
3342
+ msLibXml2GenerateList (crsMetadataNode , psCrsNs , "crsSupported" ,
3343
3343
crs_list , ' ' );
3344
3344
} else {
3345
3345
/* could not determine list of CRSs */
@@ -3611,7 +3611,7 @@ static int msWCSGetCoverage20_FinalizeParamsObj(wcs20ParamsObjPtr params, wcs20A
3611
3611
char * crs = NULL ;
3612
3612
int have_scale , have_size , have_resolution ;
3613
3613
int have_global_scale = (params -> scale != MS_WCS20_UNBOUNDED ) ? 1 : 0 ;
3614
-
3614
+
3615
3615
if (axes [0 ] != NULL ) {
3616
3616
if (axes [0 ]-> subset != NULL ) {
3617
3617
msDebug ("Subset for X-axis found: %s\n" , axes [0 ]-> subset -> axis );
@@ -4544,7 +4544,7 @@ this request. Check wcs/ows_enable_request settings.", "msWCSGetCoverage20()", p
4544
4544
/* set the imagetype from the original outputformat back (it was removed by msSelectOutputFormat() */
4545
4545
msFree (map -> imagetype );
4546
4546
map -> imagetype = origImageType ;
4547
-
4547
+
4548
4548
}
4549
4549
}
4550
4550
0 commit comments