MCPcopy Index your code
hub / github.com/MapServer/MapServer / msWCSDescribeCoverage_CoverageOffering

Function msWCSDescribeCoverage_CoverageOffering

mapwcs.c:1130–1325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1128/************************************************************************/
1129
1130static int msWCSDescribeCoverage_CoverageOffering(layerObj *layer, wcsParamsObj *params)
1131{
1132 char **tokens;
1133 int numtokens;
1134 const char *value;
1135 coverageMetadataObj cm;
1136 int i, status;
1137
1138 if ( msCheckParentPointer(layer->map,"map")==MS_FAILURE )
1139 return MS_FAILURE;
1140
1141 if(!msWCSIsLayerSupported(layer)) return MS_SUCCESS; /* not an error, this layer cannot be served via WCS */
1142
1143
1144 status = msWCSGetCoverageMetadata(layer, &cm);
1145 if(status != MS_SUCCESS) return MS_FAILURE;
1146
1147 /* fill in bands rangeset info, if required. */
1148 msWCSSetDefaultBandsRangeSetInfo( params, &cm, layer );
1149
1150 /* start the Coverage section */
1151 msIO_printf(" <CoverageOffering>\n");
1152
1153 /* optional metadataLink */
1154 msOWSPrintURLType(stdout, &(layer->metadata), "CO", "metadatalink",
1155 OWS_NOERR,
1156 " <metadataLink%s%s%s%s xlink:type=\"simple\"%s/>",
1157 NULL, " metadataType=\"%s\"", NULL, NULL, NULL,
1158 " xlink:href=\"%s\"", MS_FALSE, MS_FALSE, MS_FALSE,
1159 MS_FALSE, MS_TRUE, "other", NULL, NULL, NULL, NULL, NULL);
1160
1161 msOWSPrintEncodeMetadata(stdout, &(layer->metadata), "CO", "description", OWS_NOERR, " <description>%s</description>\n", NULL);
1162 msOWSPrintEncodeMetadata(stdout, &(layer->metadata), "CO", "name", OWS_NOERR, " <name>%s</name>\n", layer->name);
1163
1164 msOWSPrintEncodeMetadata(stdout, &(layer->metadata), "CO", "label", OWS_WARN, " <label>%s</label>\n", NULL);
1165
1166 /* TODO: add elevation ranges to lonLatEnvelope (optional) */
1167 msIO_printf(" <lonLatEnvelope srsName=\"urn:ogc:def:crs:OGC:1.3:CRS84\">\n");
1168 msIO_printf(" <gml:pos>%.15g %.15g</gml:pos>\n", cm.llextent.minx, cm.llextent.miny);
1169 msIO_printf(" <gml:pos>%.15g %.15g</gml:pos>\n", cm.llextent.maxx, cm.llextent.maxy);
1170
1171 msOWSPrintEncodeMetadataList(stdout, &(layer->metadata), "CO", "timeposition", NULL, NULL, " <gml:timePosition>%s</gml:timePosition>\n", NULL);
1172
1173 msIO_printf(" </lonLatEnvelope>\n");
1174
1175 /* we are not supporting the optional keyword type, at least not yet */
1176 msOWSPrintEncodeMetadataList(stdout, &(layer->metadata), "CO", "keywordlist", " <keywords>\n", " </keywords>\n", " <keyword>%s</keyword>\n", NULL);
1177
1178 /* DomainSet: starting simple, just a spatial domain (gml:envelope) and optionally a temporal domain */
1179 msIO_printf(" <domainSet>\n");
1180
1181 /* SpatialDomain */
1182 msIO_printf(" <spatialDomain>\n");
1183
1184 /* envelope in lat/lon */
1185 msIO_printf(" <gml:Envelope srsName=\"EPSG:4326\">\n");
1186 msIO_printf(" <gml:pos>%.15g %.15g</gml:pos>\n", cm.llextent.minx, cm.llextent.miny);
1187 msIO_printf(" <gml:pos>%.15g %.15g</gml:pos>\n", cm.llextent.maxx, cm.llextent.maxy);

Callers 1

msWCSDescribeCoverageFunction · 0.85

Calls 14

msCheckParentPointerFunction · 0.85
msWCSIsLayerSupportedFunction · 0.85
msWCSGetCoverageMetadataFunction · 0.85
msIO_printfFunction · 0.85
msOWSPrintURLTypeFunction · 0.85
msOWSPrintEncodeMetadataFunction · 0.85
msOWSGetEPSGProjFunction · 0.85
msOWSLookupMetadataFunction · 0.85
msStringSplitFunction · 0.85

Tested by

no test coverage detected