[mapserver-users] time enabled WCS with tile index

Rousseau Lambert2, Louis-Philippe (EC) louis-philippe.rousseaulambert2 at canada.ca
Thu Jun 28 06:20:04 PDT 2018


Hi guys,


I'm working on a project which requires WMS and WCS time enabled layers.


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...


In my shapefile I have a column for the data path and one (timestamp) for the time.


Exemple request form Qgis WCS:

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


I get an error:

 <?xml version='1.0' encoding="UTF-8" ?>                                                                                                                 <ServiceExceptionReport version="1.2.0"                                                                                                                 xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.o
pengis.net/wcs/1.0.0/OGC-exception.xsd">
  <ServiceException>msGetGDALBandList(): Image handling error. BANDS PROCESSING directive has wrong number of bands, expected at most 4, got 55.
  </ServiceException>
</ServiceExceptionReport>


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...


Here is my mapfile:

MAP
    STATUS ON
    WEB
        METADATA
            "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"
            "ows_extent" "-141,42,-52,84"
            "ows_contactinstructions" "During hours of service"
            "wcs_label" "Meteorological Service of Canada Geospatial Web Services 0.1.0"
            "ows_title" "title"
            "wcs_enable_request" "*"
        END
    END
    PROJECTION
        "init=epsg:4326"
    END
    NAME "climate"
    QUERYMAP
        STATUS OFF
        COLOR 255 255 0
        STYLE HILITE
        SIZE 500 300
    END
    LAYER
        STATUS OFF
        NAME "DCS.TN.HISTO.YEAR.ABS_PCTL25-tileindex"
        DATA "/path/to/tileindex/ts_absolute_p25_historical_1951_2005_tn_ann.shp"
        TYPE POLYGON
        FILTERITEM 'timestamp'
        FILTER '%timestamp%'
        METADATA
            "ows_enable_request" "!*"
        END
    END
    LAYER
        STATUS ON
        TILEITEM "location"
        NAME "DCS.TN.HISTO.YEAR.ABS_PCTL25"
        DUMP TRUE
        TILEINDEX "DCS.TN.HISTO.YEAR.ABS_PCTL25-tileindex"
        CLASS
            GROUP "TEMP-ABSOLUTE"
            STYLE
                DATARANGE -60 -28
                COLORRANGE 10 40 100 51 102 217
            END
            EXPRESSION ([pixel] < -28 AND [pixel] > -95)
            NAME "< -28"
        END
        TEMPLATE "ttt.html"
        CLASSGROUP "TEMP-ABSOLUTE"
        METADATA
            "ows_timeextent" "1951/2005/P1Y"
            "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'
            "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"
            "wms_timeitem" "timestamp"
            "wcs_timeitem" "timestamp"
            "ows_extent" "-140.9999644 41.0000051 -52.0000051 83.4999949"
            "ows_title" "title"
            "wms_timedefault" "2005"
            "ows_enable_request" "*"
            "ows_layer_group" "//Downscale climate scenarios (DCS)/Maximum temperature/Historical/Annual"
            "wcs_label" "Mean temperature"
            "wcs_resolution" "0.083333295198278 -0.083333313348017"
            "wcs_size" "1068 510"
            "wcs_bandcount" "55"

        END
        TYPE RASTER
        PROJECTION
            "+proj=longlat +datum=WGS84 +no_defs "
        END
    END
    IMAGECOLOR 255 255 255
    MAXSIZE 4096
    OUTPUTFORMAT
        MIMETYPE "image/tiff"
        NAME "GEOTIFF_32"
        EXTENSION "tif"
        DRIVER "GDAL/GTiff"
        IMAGEMODE FLOAT32
    END
    END
    EXTENT -141 42 -52 84
    DEBUG OFF
    TRANSPARENT ON
    IMAGETYPE "PNG"
    SIZE 500 300
END

Thanks for the help!


LP


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20180628/574b4c9c/attachment.html>


More information about the mapserver-users mailing list