Hello Steve
Sure with the logging enabled i get the following: mapfile metadata: "wms_timeextent" "2005/2022" request: 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-01-01/2022-12-31 log: wms-bgdi_1 | [warn] [pid 9229] mod_fcgid: stderr: msWMSApplyTime: WMS server error. Time value(s) 2022-01-01/2022-12-31 given is invalid or outside the time extent defined (2005/2022). wms-bgdi_1 | [warn] [pid 9229] mod_fcgid: stderr: freeLayer(): freeing layer at 0x557566f87510. wms-bgdi_1 | [warn] [pid 9229] mod_fcgid: stderr: msPostGISLayerIsOpen called. wms-bgdi_1 | 172.26.0.1 - - [13/Feb/2023:07:23:28 +0000] "GET /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-01-01/2022-12-31 HTTP/1.1" 200 674 With this time extent definition nothing is being sent to the database. The time value is considered as invalid (outside the time extent) by the validation code -> InvalidDimensionValue. https://github.com/MapServer/MapServer/blob/f3f05d4cf30af615d5f443a1c47c20b6117e52cb/mapwms.cpp#L268 If we increase the upper bound of the time extent by one year we get the following logs: mapfile metadata: "wms_timeextent" "2005/2023" request: 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-01-01/2022-12-31 logs: msPostGISLayerWhichShapes query: select "resolution"::text,"flugdatum"::text,ST_AsBinary(("the_geom"),'NDR') as geom,"bildstreifen_nr"::text from ( SELECT the_geom , filmart , firma , flugdatum , objectid , resolution , bildstreifen_nr , bildstreifen_nr as id , bgdi_flugjahr , area , gsd , toposhop_length , toposhop_start_x , toposhop_start_y , toposhop_end_x , toposhop_end_y , toposhop_date , goal , georef_source as source_georef from ads40.view_bildstreifen WHERE firma like 'swisstopo' order by resolution desc ) AS bla where ST_Intersects("the_geom", ST_GeomFromText('POLYGON((2420250 1050250,2420250 1349750,2849750 1349750,2849750 1050250,2420250 1050250))',2056)) and (("flugdatum" >= date_trunc('day',date '2022-01-01') and "flugdatum" <= (date_trunc('day',date '2022-12-31') + interval '1 day' - interval '1 second'))) msPostGISLayerWhichShapes query status: PGRES_TUPLES_OK (2) msPostGISLayerWhichShapes got 482 records in result. msPostGISLayerNextShape called. msPostGISReadShape called. The full layer config is here: https://pastebin.com/NkJXnRJt Thank you and best regards Marcel ________________________________ Von: Lime, Steve D (MNIT) <steve.l...@state.mn.us> Gesendet: Donnerstag, 9. Februar 2023 23:04:03 An: Clausen Marcel swisstopo Cc: mapserver-users@lists.osgeo.org Betreff: RE: [MapServer-users] wms time validation of time parameter against timeextent gives unexpected results So, if you turn on logging, what shows up in terms of Pg queries. -----Original Message----- From: MapServer-users <mapserver-users-boun...@lists.osgeo.org> On Behalf Of Clausen Marcel via MapServer-users Sent: Tuesday, February 7, 2023 7:37 AM To: sdl...@gmail.com Cc: mapserver-users@lists.osgeo.org Subject: Re: [MapServer-users] wms time validation of time parameter against timeextent gives unexpected results 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 "..."> <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 <sdl...@gmail.com> Gesendet: Montag, 6. Februar 2023 17:48:26 An: Clausen Marcel swisstopo Cc: mapserver-users@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@lists.osgeo.org<mailto:mapserver-users@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@lists.osgeo.org<mailto:MapServer-users@lists.osgeo.org> https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fmapserver-users&data=05%7C01%7Csteve.lime%40state.mn.us%7C20a25ea5e6e1488c95a708db0910782a%7Ceb14b04624c445198f26b89c2159828c%7C0%7C0%7C638113738576533245%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ha1sFKw7qRtLxB7ei0D%2FjhcGNTQlgwYz5U0WhLnN3Iw%3D&reserved=0 _______________________________________________ MapServer-users mailing list MapServer-users@lists.osgeo.org https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fmapserver-users&data=05%7C01%7Csteve.lime%40state.mn.us%7C20a25ea5e6e1488c95a708db0910782a%7Ceb14b04624c445198f26b89c2159828c%7C0%7C0%7C638113738576689260%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=iDvdDXh8CCndm%2BbmfJPK1XaU5o10%2Ff9L2vp1PbvYbMA%3D&reserved=0 _______________________________________________ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users