<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} @font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Consolas}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif}
a:link, span.MsoHyperlink
        {color:#0563C1;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:#954F72;
        text-decoration:underline}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New"}
span.HTML-esimuotoiltuChar
        {font-family:Consolas}
span.Shkpostityyli20
        {font-family:"Calibri",sans-serif;
        color:#1F497D}
.MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:70.85pt 2.0cm 70.85pt 2.0cm}
div.WordSection1
        {}--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Thanks for your answer, I'm indeed now testing my build in my command line. </p>
<p><br>
</p>
<p>But I'm still having the issue... </p>
<p><br>
</p>
<p>Query:</p>
<p>mapserv -nh "QUERY_STRING=map=/path/to/mapfile/climate-WCS-en.map&SERVICE=WCS&VERSION=2.0.1&REQUEST=GetCoverage&COVERAGEID=DCS.TN.HISTO.YEAR.ABS_PCTL25&FORMAT=image/tiff&SUBSET=time(%221978%22)"
<br>
</p>
<p><br>
</p>
<p>I get the error: </p>
<p> <?xml version="1.0" encoding="UTF-8"?>                                                                                                                  <ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 version="2.0.1" xml:lang="en-US" x<br>
si:schemaLocation="http://www.opengis.net/ows/2.0 http://schemas.opengis.net/ows/2.0/owsExceptionReport.xsd"><br>
  <ows:Exception exceptionCode="InvalidSubsetting" locator="subset"><br>
    <ows:ExceptionText>msWCSParseTimeOrScalar20(): WCS server error. String "1978" could not be parsed to a time or scalar value<br>
msParseTime(): Regular expression error. Unrecognized date or time format ("1978").</ows:ExceptionText><br>
  </ows:Exception><br>
</ows:ExceptionReport><br>
</p>
<p><br>
</p>
<p>Any idea what might be causing this ?</p>
<p><br>
</p>
<p>I also tried adding the "ows_timeformat" "YYYY" at the WEB metadata level without success...
<br>
</p>
<p><br>
</p>
<p>Thanks</p>
<p>LP<br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>De :</b> Rahkonen Jukka (MML) <jukka.rahkonen@maanmittauslaitos.fi><br>
<b>Envoyé :</b> 28 juin 2018 09:46<br>
<b>À :</b> Rousseau Lambert2, Louis-Philippe (EC); mapserver-users@lists.osgeo.org<br>
<b>Objet :</b> Re: time enabled WCS with tile index</font>
<div> </div>
</div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D" lang="EN-US">Hi,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D" lang="EN-US">I would like to say that you should not waste your time with using QGIS as a WCS client because it is rather useless for that. It tries to use
 WCS as a poor substitute for WMS as you can see from your example query that includes &WIDTH=6&HEIGHT=3.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D" lang="EN-US">I suggest to switch to WCS 2.0.1, write your requests by hand and send them with curl, wget, or browser.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D" lang="EN-US">Here is an example about WCS 2.0.1 GetCoverage query syntax with time dimension<br>
<a href="https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?service=WCS&version=2.0.1&request=GetCoverage&CoverageID=ortokuva__ortokuva&SUBSET=E(393450,393650)&SUBSET=N(7495450,7495650)&format=image/tiff&SUBSET=time(%222010-12-31T00:00:00.000Z%22)">https://beta-karttakuva.maanmittauslaitos.fi/wcs/service/ows?service=WCS&version=2.0.1&request=GetCoverage&CoverageID=ortokuva__ortokuva&SUBSET=E(393450,393650)&SUBSET=N(7495450,7495650)&format=image/tiff&SUBSET=time(%222010-12-31T00:00:00.000Z%22)</a></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D" lang="EN-US">-Jukka Rahkonen-</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri",sans-serif; color:#1F497D" lang="EN-US"> </span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif" lang="EN-US">Lähettäjä:</span></b><span style="font-size:11.0pt; font-family:"Calibri",sans-serif" lang="EN-US"> mapserver-users [mailto:mapserver-users-bounces@lists.osgeo.org]
<b>Puolesta </b>Rousseau Lambert2, Louis-Philippe (EC)<br>
<b>Lähetetty:</b> 28. kesäkuuta 2018 16:20<br>
<b>Vastaanottaja:</b> mapserver-users@lists.osgeo.org<br>
<b>Aihe:</b> [mapserver-users] time enabled WCS with tile index</span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US">Hi guys,
</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US">I'm working on a project which requires WMS and WCS time enabled layers.
</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US">I'm using the tile index for time support, which is working fine for WMS but I can't get the time to work for WCS request...</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US">In my shapefile I have a column for the data path and one (timestamp) for the time.
</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US">Exemple request form Qgis WCS: </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US">mapserv -nh "QUERY_STRING=map=/path/to/mapfile/WCS-en.map&SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&FORMAT=GTiff&COVERAGE=DCS.TN.HISTO.YEAR.ABS_PCTL25&TIME=1978&BBOX=-96.74998463567416707,62.12500003000000248,-96.2499848643258531,62.37499996999999752&CRS=EPSG:4326&RESPONSE_CRS=EPSG:4326&WIDTH=6&HEIGHT=3"
 > dcs.tif</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US">I get an error:
</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US"> <?xml version='1.0' encoding="UTF-8" ?>                                                                                                                 <ServiceExceptionReport version="1.2.0"                                                                                                                
 xmlns="</span><a href="http://www.opengis.net/ogc"><span style="font-family:"Calibri",sans-serif" lang="EN-US">http://www.opengis.net/ogc</span></a><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US">" xmlns:xsi="</span><a href="http://www.w3.org/2001/XMLSchema-instance"><span style="font-family:"Calibri",sans-serif" lang="EN-US">http://www.w3.org/2001/XMLSchema-instance</span></a><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US">"
 xsi:schemaLocation="</span><a href="http://www.opengis.net/ogc%20http:/schemas.o%0bpengis.net/wcs/1.0.0/OGC-exception.xsd"><span style="font-family:"Calibri",sans-serif" lang="EN-US">http://www.opengis.net/ogc http://schemas.o<br>
pengis.net/wcs/1.0.0/OGC-exception.xsd</span></a><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US">"><br>
  <ServiceException>msGetGDALBandList(): Image handling error. BANDS PROCESSING directive has wrong number of bands, expected at most 4, got 55.<br>
  </ServiceException><br>
</ServiceExceptionReport></span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US">At the base I have one netcdf file with 55 bands each representing a different time step. In order to use the shapefile index, I created 55 VRTs each pointing to a band in the original
 NetCDF. Than in the shapefile index, I'm pointing to those VRT for each time step. It works fine for WMS but not WCS...
</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US">Here is my mapfile:
</span></p>
<pre><span style="color:black" lang="EN-US">MAP</span></pre>
<pre><span style="color:black" lang="EN-US">    STATUS ON</span></pre>
<pre><span style="color:black" lang="EN-US">    WEB</span></pre>
<pre><span style="color:black" lang="EN-US">        METADATA</span></pre>
<pre><span style="color:black" lang="EN-US">            "wcs_description" "The weather can have an incredible influence on our daily lives. It affects the growth of crops and the availability of water. It dictates which regions of the world are habitable or uninhabitable"</span></pre>
<pre><span style="color:black" lang="EN-US">            "ows_extent" "-141,42,-52,84"</span></pre>
<pre><span style="color:black" lang="EN-US">            "ows_contactinstructions" "During hours of service"</span></pre>
<pre><span style="color:black" lang="EN-US">            "wcs_label" "Meteorological Service of Canada Geospatial Web Services 0.1.0"</span></pre>
<pre><span style="color:black" lang="EN-US">            "ows_title" "title"</span></pre>
<pre><span style="color:black" lang="EN-US">            "wcs_enable_request" "*"</span></pre>
<pre><span style="color:black" lang="EN-US">        END</span></pre>
<pre><span style="color:black" lang="EN-US">    END</span></pre>
<pre><span style="color:black" lang="EN-US">    PROJECTION</span></pre>
<pre><span style="color:black" lang="EN-US">        "init=epsg:4326"</span></pre>
<pre><span style="color:black" lang="EN-US">    END</span></pre>
<pre><span style="color:black" lang="EN-US">    NAME "climate"</span></pre>
<pre><span style="color:black" lang="EN-US">    QUERYMAP</span></pre>
<pre><span style="color:black" lang="EN-US">        STATUS OFF</span></pre>
<pre><span style="color:black" lang="EN-US">        COLOR 255 255 0</span></pre>
<pre><span style="color:black" lang="EN-US">        STYLE HILITE</span></pre>
<pre><span style="color:black" lang="EN-US">        SIZE 500 300</span></pre>
<pre><span style="color:black" lang="EN-US">    END</span></pre>
<pre><span style="color:black" lang="EN-US">    LAYER</span></pre>
<pre><span style="color:black" lang="EN-US">        STATUS OFF</span></pre>
<pre><span style="color:black" lang="EN-US">        NAME "DCS.TN.HISTO.YEAR.ABS_PCTL25-tileindex"</span></pre>
<pre><span style="color:black" lang="EN-US">        DATA "/path/to/tileindex/ts_absolute_p25_historical_1951_2005_tn_ann.shp"</span></pre>
<pre><span style="color:black" lang="EN-US">        TYPE POLYGON</span></pre>
<pre><span style="color:black" lang="EN-US">        FILTERITEM 'timestamp'</span></pre>
<pre><span style="color:black" lang="EN-US">        FILTER '%timestamp%'</span></pre>
<pre><span style="color:black" lang="EN-US">        METADATA</span></pre>
<pre><span style="color:black" lang="EN-US">            "ows_enable_request" "!*"</span></pre>
<pre><span style="color:black" lang="EN-US">        END</span></pre>
<pre><span style="color:black" lang="EN-US">    END</span></pre>
<pre><span style="color:black" lang="EN-US">    LAYER</span></pre>
<pre><span style="color:black" lang="EN-US">        STATUS ON</span></pre>
<pre><span style="color:black" lang="EN-US">        TILEITEM "location"</span></pre>
<pre><span style="color:black" lang="EN-US">        NAME "DCS.TN.HISTO.YEAR.ABS_PCTL25"</span></pre>
<pre><span style="color:black" lang="EN-US">        DUMP TRUE</span></pre>
<pre><span style="color:black" lang="EN-US">        TILEINDEX "DCS.TN.HISTO.YEAR.ABS_PCTL25-tileindex"</span></pre>
<pre><span style="color:black" lang="EN-US">        CLASS</span></pre>
<pre><span style="color:black" lang="EN-US">            GROUP "TEMP-ABSOLUTE"</span></pre>
<pre><span style="color:black" lang="EN-US">            STYLE</span></pre>
<pre><span style="color:black" lang="EN-US">                DATARANGE -60 -28</span></pre>
<pre><span style="color:black" lang="EN-US">                COLORRANGE 10 40 100 51 102 217</span></pre>
<pre><span style="color:black" lang="EN-US">            END</span></pre>
<pre><span style="color:black" lang="EN-US">            EXPRESSION ([pixel] < -28 AND [pixel] > -95)</span></pre>
<pre><span style="color:black" lang="EN-US">            NAME "< -28"</span></pre>
<pre><span style="color:black" lang="EN-US">        END</span></pre>
<pre><span style="color:black" lang="EN-US">        TEMPLATE "ttt.html"</span></pre>
<pre><span style="color:black" lang="EN-US">        CLASSGROUP "TEMP-ABSOLUTE"</span></pre>
<pre><span style="color:black" lang="EN-US">        METADATA</span></pre>
<pre><span style="color:black" lang="EN-US">            "ows_timeextent" "1951/2005/P1Y"</span></pre>
<pre><span style="color:black" lang="EN-US">            "wcs_timeposition" '1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005'</span></pre>
<pre><span style="color:black" lang="EN-US">            "wcs_band_names" "B1951 B1952 B1953 B1954 B1955 B1956 B1957 B1958 B1959 B1960 B1961 B1962 B1963 B1964 B1965 B1966 B1967 B1968 B1969 B1970 B1971 B1972 B1973 B1974 B1975 B1976 B1977 B1978 B1979 B1980 B1981 B1982 B1983 B1984 B1985 B1986 B1987 B1988 B1989 B1990 B1991 B1992 B1993 B1994 B1995 B1996 B1997 B1998 B1999 B2000 B2001 B2002 B2003 B2004 B2005"</span></pre>
<pre><span style="color:black" lang="EN-US">            "wms_timeitem" "timestamp"</span></pre>
<pre><span style="color:black" lang="EN-US">            "wcs_timeitem" "timestamp"</span></pre>
<pre><span style="color:black" lang="EN-US">            "ows_extent" "-140.9999644 41.0000051 -52.0000051 83.4999949"</span></pre>
<pre><span style="color:black" lang="EN-US">            "ows_title" "title"</span></pre>
<pre><span style="color:black" lang="EN-US">            "wms_timedefault" "2005"</span></pre>
<pre><span style="color:black" lang="EN-US">            "ows_enable_request" "*"</span></pre>
<pre><span style="color:black" lang="EN-US">            "ows_layer_group" "//Downscale climate scenarios (DCS)/Maximum temperature/Historical/Annual"</span></pre>
<pre><span style="color:black" lang="EN-US">            "wcs_label" "Mean temperature"</span></pre>
<pre><span style="color:black" lang="EN-US">            "wcs_resolution" "0.083333295198278 -0.083333313348017"</span></pre>
<pre><span style="color:black" lang="EN-US">            "wcs_size" "1068 510"</span></pre>
<pre><span style="color:black" lang="EN-US">            "wcs_bandcount" "55"</span></pre>
<pre><span style="color:black" lang="EN-US"> </span></pre>
<pre><span style="color:black" lang="EN-US">        END</span></pre>
<pre><span style="color:black" lang="EN-US">        TYPE RASTER</span></pre>
<pre><span style="color:black" lang="EN-US">        PROJECTION</span></pre>
<pre><span style="color:black" lang="EN-US">            "+proj=longlat +datum=WGS84 +no_defs "</span></pre>
<pre><span style="color:black" lang="EN-US">        END</span></pre>
<pre><span style="color:black" lang="EN-US">    END</span></pre>
<pre><span style="color:black" lang="EN-US">    IMAGECOLOR 255 255 255</span></pre>
<pre><span style="color:black" lang="EN-US">    MAXSIZE 4096</span></pre>
<pre><span style="color:black" lang="EN-US">    OUTPUTFORMAT</span></pre>
<pre><span style="color:black" lang="EN-US">        MIMETYPE "image/tiff"</span></pre>
<pre><span style="color:black" lang="EN-US">        NAME "GEOTIFF_32"</span></pre>
<pre><span style="color:black" lang="EN-US">        EXTENSION "tif"</span></pre>
<pre><span style="color:black" lang="EN-US">        DRIVER "GDAL/GTiff"</span></pre>
<pre><span style="color:black" lang="EN-US">        IMAGEMODE FLOAT32</span></pre>
<pre><span style="color:black" lang="EN-US">    END</span></pre>
<pre><span style="color:black" lang="EN-US">    END</span></pre>
<pre><span style="color:black" lang="EN-US">    EXTENT -141 42 -52 84</span></pre>
<pre><span style="color:black" lang="EN-US">    DEBUG OFF</span></pre>
<pre><span style="color:black" lang="EN-US">    TRANSPARENT ON</span></pre>
<pre><span style="color:black" lang="EN-US">    IMAGETYPE "PNG"</span></pre>
<pre><span style="color:black" lang="EN-US">    SIZE 500 300</span></pre>
<pre><span style="color:black" lang="EN-US">END</span></pre>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US">Thanks for the help!</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black" lang="EN-US"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black">LP</span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
<p><span style="font-family:"Calibri",sans-serif; color:black"> </span></p>
</div>
</div>
</div>
</body>
</html>