@@ -1157,6 +1157,26 @@ const char *msOWSGetSchemasLocation(mapObj *map)
1157
1157
return schemas_location ;
1158
1158
}
1159
1159
1160
+ /* msOWSGetInspireSchemasLocation()
1161
+ **
1162
+ ** schemas location is the root of the web tree where all Inspire-related
1163
+ ** schemas can be found on this server. These URLs must exist in order
1164
+ ** to validate xml.
1165
+ **
1166
+ ** Use value of "inspire_schemas_location" metadata
1167
+ */
1168
+ const char * msOWSGetInspireSchemasLocation (mapObj * map )
1169
+ {
1170
+ const char * schemas_location ;
1171
+
1172
+ schemas_location = msLookupHashTable (& (map -> web .metadata ),
1173
+ "inspire_schemas_location" );
1174
+ if (schemas_location == NULL )
1175
+ schemas_location = "http://inspire.ec.europa.eu/schemas" ;
1176
+
1177
+ return schemas_location ;
1178
+ }
1179
+
1160
1180
/* msOWSGetLanguage()
1161
1181
**
1162
1182
** returns the language via MAP/WEB/METADATA/ows_language
@@ -1252,16 +1272,19 @@ char *msOWSGetLanguageFromList(mapObj *map, const char *namespaces, const char *
1252
1272
** Returns a status code; MS_NOERR if all ok, action_if_not_found otherwise
1253
1273
*/
1254
1274
int msOWSPrintInspireCommonExtendedCapabilities (FILE * stream , mapObj * map , const char * namespaces ,
1255
- int action_if_not_found , const char * tag_name ,
1256
- const char * validated_language , const int service )
1275
+ int action_if_not_found , const char * tag_name , const char * tag_ns ,
1276
+ const char * validated_language , const OWSServiceType service )
1257
1277
{
1258
1278
1259
1279
int metadataStatus = 0 ;
1260
1280
int languageStatus = 0 ;
1261
1281
1262
- msIO_fprintf (stream , " <%s>\n" , tag_name );
1282
+ if ( tag_ns )
1283
+ msIO_fprintf (stream , " <%s %s>\n" , tag_name , tag_ns );
1284
+ else
1285
+ msIO_fprintf (stream , " <%s>\n" , tag_name );
1263
1286
1264
- metadataStatus = msOWSPrintInspireCommonMetadata (stream , map , namespaces , action_if_not_found );
1287
+ metadataStatus = msOWSPrintInspireCommonMetadata (stream , map , namespaces , action_if_not_found , service );
1265
1288
languageStatus = msOWSPrintInspireCommonLanguages (stream , map , namespaces , action_if_not_found , validated_language );
1266
1289
1267
1290
msIO_fprintf (stream , " </%s>\n" , tag_name );
@@ -1276,7 +1299,7 @@ int msOWSPrintInspireCommonExtendedCapabilities(FILE *stream, mapObj *map, const
1276
1299
** Returns a status code; MS_NOERR if all OK, action_if_not_found otherwise
1277
1300
*/
1278
1301
int msOWSPrintInspireCommonMetadata (FILE * stream , mapObj * map , const char * namespaces ,
1279
- int action_if_not_found )
1302
+ int action_if_not_found , const OWSServiceType service )
1280
1303
{
1281
1304
1282
1305
int status = MS_NOERR ;
@@ -1303,7 +1326,7 @@ int msOWSPrintInspireCommonMetadata(FILE *stream, mapObj *map, const char *names
1303
1326
}
1304
1327
}
1305
1328
} else if (strcasecmp ("embed" ,inspire_capabilities ) == 0 ) {
1306
- msOWSPrintEncodeMetadata (stream , & (map -> web .metadata ), namespaces , "inspire_resourcelocator" , OWS_NOERR , " <inspire_common:ResourceLocator>\n <inspire_common:URL>%s</inspire_common:URL>\n </inspire_common:ResourceLocator>\n" , NULL );
1329
+ msOWSPrintEncodeMetadata (stream , & (map -> web .metadata ), namespaces , "inspire_resourcelocator" , OWS_WARN , " <inspire_common:ResourceLocator>\n <inspire_common:URL>%s</inspire_common:URL>\n </inspire_common:ResourceLocator>\n" , NULL );
1307
1330
msIO_fprintf (stream ," <inspire_common:ResourceType>service</inspire_common:ResourceType>\n" );
1308
1331
msOWSPrintEncodeMetadata (stream , & (map -> web .metadata ), namespaces , "inspire_temporal_reference" , OWS_WARN , " <inspire_common:TemporalReference>\n <inspire_common:DateOfLastRevision>%s</inspire_common:DateOfLastRevision>\n </inspire_common:TemporalReference>\n" , "" );
1309
1332
msIO_fprintf (stream , " <inspire_common:Conformity>\n" );
@@ -1318,7 +1341,10 @@ int msOWSPrintInspireCommonMetadata(FILE *stream, mapObj *map, const char *names
1318
1341
msOWSPrintEncodeMetadata (stream , & (map -> web .metadata ), namespaces , "inspire_mpoc_email" , OWS_WARN , " <inspire_common:EmailAddress>%s</inspire_common:EmailAddress>\n" , "" );
1319
1342
msIO_fprintf (stream , " </inspire_common:MetadataPointOfContact>\n" );
1320
1343
msOWSPrintEncodeMetadata (stream , & (map -> web .metadata ), namespaces , "inspire_metadatadate" , OWS_WARN , " <inspire_common:MetadataDate>%s</inspire_common:MetadataDate>\n" , "" );
1321
- msIO_fprintf (stream ," <inspire_common:SpatialDataServiceType>view</inspire_common:SpatialDataServiceType>\n" );
1344
+ if ( service == OWS_WFS )
1345
+ msIO_fprintf (stream ," <inspire_common:SpatialDataServiceType>download</inspire_common:SpatialDataServiceType>\n" );
1346
+ else
1347
+ msIO_fprintf (stream ," <inspire_common:SpatialDataServiceType>view</inspire_common:SpatialDataServiceType>\n" );
1322
1348
msOWSPrintEncodeMetadata (stream , & (map -> web .metadata ), namespaces , "inspire_keyword" , OWS_WARN , " <inspire_common:MandatoryKeyword xsi:type='inspire_common:classificationOfSpatialDataService'>\n <inspire_common:KeywordValue>%s</inspire_common:KeywordValue>\n </inspire_common:MandatoryKeyword>\n" , "" );
1323
1349
} else {
1324
1350
status = action_if_not_found ;
@@ -2023,7 +2049,7 @@ void msOWSPrintEX_GeographicBoundingBox(FILE *stream, const char *tabspace,
2023
2049
*/
2024
2050
void msOWSPrintLatLonBoundingBox (FILE * stream , const char * tabspace ,
2025
2051
rectObj * extent , projectionObj * srcproj ,
2026
- projectionObj * wfsproj , int nService )
2052
+ projectionObj * wfsproj , OWSServiceType nService )
2027
2053
{
2028
2054
const char * pszTag = "LatLonBoundingBox" ; /* The default for WMS */
2029
2055
rectObj ext ;
0 commit comments