[MapServer-users] wms time validation of time parameter against timeextent gives unexpected results
Marcel.Clausen at swisstopo.ch
Marcel.Clausen at swisstopo.ch
Tue Feb 7 05:37:27 PST 2023
Hello Steve
Thank you for your response,
we would have expected that too.
with wms 1.1 the service response is the same.
with this metadata "wms_timeextent" "2005/2022"
the service response is:
http://localhost:7777/local/?SERVICE=WMS&VERSION=1.1.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&LAYERS=ch.swisstopo.lubis-bildstreifen&SRS=EPSG:2056&STYLES=&WIDTH=860&HEIGHT=600&BBOX=2420000,1050000,2850000,1350000&TIME=2022-01-01/2022-12-31
<?xml version='1.0' encoding="UTF-8" standalone="no" ?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd">
<ServiceExceptionReport version="1.1.0">
<ServiceException code="InvalidDimensionValue">
msWMSApplyTime: WMS server error. Time value(s) 2022-01-01/2022-12-31 given is invalid or outside the time extent defined (2005/2022).
</ServiceException>
</ServiceExceptionReport>
The only work-around we found so far is to set the time-range in the metadata with a date precision of day:
"wms_timeextent" "2005-01-01/2022-12-31" but then in the getcap we would have this information:
<Dimension name="time" units="ISO8601" nearestValue="0">2005-01-01/2022-12-31</Dimension>
which is not representing the real nature of this dataset, the time resolution here should be a year.
Best regards
Marcel
________________________________
Von: Steve Lime <sdlime at gmail.com>
Gesendet: Montag, 6. Februar 2023 17:48:26
An: Clausen Marcel swisstopo
Cc: mapserver-users at lists.osgeo.org
Betreff: Re: [MapServer-users] wms time validation of time parameter against timeextent gives unexpected results
Does WMS 1.1 behave the same? I suppose it comes down to how 2022 is interpreted as part of a range, I would have expected it would mean any date in that year. Sounds like it's behaving like strictly less than 2022-01-01. What happens if you set the range using full dates, so something like: 20050101/20221231?
--Steve
On Thu, Feb 2, 2023 at 3:33 AM Clausen Marcel via MapServer-users <mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>> wrote:
Dear all
We have the following question concerning the configuration and usage of time enabled wms layers.
We are using the following metadata section for a time-enabled layer:
METADATA
"wms_enable_request" "*"
"wms_title" "lubis_bildstreifen"
"wms_extent" "2100000 1050000 2850000 1400000"
"wms_timeextent" "2005/2022"
"wms_timeitem" "flugdatum" # this is a date column in postgres
END
The time precision/resolution of the timeextent has to be set as year.
The validation of the time parameter against the time extent with year precision gives some strange results. We were using the following getmap request for the tests:
localhost:7777/local/?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&LAYERS=ch.swisstopo.lubis-bildstreifen&CRS=EPSG:2056&STYLES=&WIDTH=860&HEIGHT=600&BBOX=2420000,1050000,2850000,1350000&TIME=2022
parameter: time=2005
result: returns all features of 2005
expected result: ok
parameter: time=2022
result: returns all features of 2022
expected result: ok
parameter: time=2023
result: returns ServiceException [1]
expected result: ok
parameter: time=2022-01-01
result: returns ServiceException [2]
expected result: we would expect this to be a valid timestamp
parameter: time=2022-01-01/2022-12-31
result: returns ServiceException [3]
expected result: we would expect this to be a valid timestamp
It seems that if the precision of the time parameter is of YYYY-MM or YYYY-MM-TT the upper bound of the defined timextent 2005/2022 is not respected correctly.
We got the same result with the timextent defined as: 2005/2022/P1Y
our mapserver version is:
<!-- MapServer version 7.6.4 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS SUPPORTS=POINT_Z_M SUPPORTS=PBF INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->
Does someone have some insights or hints?
Best regards
Clausen Marcel
[1]
<ServiceException code="InvalidDimensionValue">msWMSApplyTime: WMS server error. Time value(s) 2023 given is invalid or outside the time extent defined (2005/2022).</ServiceException>
[2]
<ServiceException code="InvalidDimensionValue"> msWMSApplyTime: WMS server error. Time value(s) 2022-01-01 given is invalid or outside the time extent defined (2005/2022). </ServiceException>
[3]
<ServiceException code="InvalidDimensionValue"> msWMSApplyTime: WMS server error. Time value(s) 2022-01-01/2022-12-31 given is invalid or outside the time extent defined (2005/2022). </ServiceException>
_______________________________________________
MapServer-users mailing list
MapServer-users at lists.osgeo.org<mailto:MapServer-users at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list