|
|
@@ -78,6 +78,10 @@ class WCS(OWS):
|
|
|
lyrobj.type = mapscript.MS_LAYER_RASTER
|
|
|
lyrobj.dump = mapscript.MS_TRUE
|
|
|
lyrobj.template = "foo"
|
|
|
+
|
|
|
+ # bands
|
|
|
+ if layer.axisDescriptions:
|
|
|
+ self._addBandsMetadata(layer, lyrobj)
|
|
|
if ds:
|
|
|
self.getTime(ds,lyrobj)
|
|
|
cls = mapscript.classObj(lyrobj)
|
|
|
@@ -150,3 +154,12 @@ class WCS(OWS):
|
|
|
lyrobj.tileindex = os.path.join(tindex,tindex+".shp")
|
|
|
else:
|
|
|
logging.info("No time subset found")
|
|
|
+
|
|
|
+ def _addBandsMetadata(layer, lyrobj):
|
|
|
+ """Adds wmcs_band* metadata to the lyrobj"""
|
|
|
+
|
|
|
+ for i in layer.axisDescriptions:
|
|
|
+ if layer.axisDescriptions[i].name.toLowerCase() == "bands":
|
|
|
+ lyrobj.setMetadata("wcs_bandcount",len(layer.axisDescriptions[i].values))
|
|
|
+ lyrobj.setMetadata("wcs_rangeset_axes",layer.axisDescriptions[i].name)
|
|
|
+ lyrobj.setMetadata("wcs_rangeset_name",layer.axisDescriptions[i].name)
|