WMS server time tests and issues

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Mon Nov 8 18:56:35 EST 2004


> -----Original Message-----
> From: Yewondwossen Assefa [mailto:assefa at dmsolutions.ca] 
> Sent: Monday, 08 November, 2004 18:53
> To: Kralidis,Tom [Burlington]
> Cc: MAPSERVER-DEV at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-DEV] WMS server time tests and issues
> 
> 
> Kralidis,Tom [Burlington] wrote:
> 
> > 
> >>-----Original Message-----
> >>From: Yewondwossen Assefa [mailto:assefa at dmsolutions.ca]
> >>Sent: Monday, 08 November, 2004 18:37
> >>To: Kralidis,Tom [Burlington]
> >>Cc: MAPSERVER-DEV at LISTS.UMN.EDU
> >>Subject: Re: [UMN_MAPSERVER-DEV] WMS server time tests and issues
> >>
> >>
> >>Kralidis,Tom [Burlington] wrote:
> >>
> >>
> >>>>-----Original Message-----
> >>>>From: Yewondwossen Assefa [mailto:assefa at dmsolutions.ca]
> >>>>Sent: Monday, 08 November, 2004 16:00
> >>>>To: Kralidis,Tom [Burlington]
> >>>>Cc: MAPSERVER-DEV at LISTS.UMN.EDU
> >>>>Subject: Re: [UMN_MAPSERVER-DEV] WMS server time tests and issues
> >>>>
> >>>>
> >>>>Kralidis,Tom [Burlington] wrote:
> >>>>
> >>>>
> >>>>>Hi,
> >>>>>
> >>>>>I've been testing this out on latest CVS.  Observations:
> >>>>>
> >>>>>- OS: FC2
> >>>>>Linux devgeo.cciw.ca 2.6.5-1.358smp #1 SMP Sat May 8
> >>>>
> >>>>09:25:36 EDT 2004
> >>>>
> >>>>
> >>>>>i686 i686 i386 GNU/Linux
> >>>>>- httpd: Apache 2.0.49
> >>>>>
> >>>>>I constructed a dummy .shp/.shx/.dbf with 4 columns 3
> >>>>
> >>>>records with a
> >>>>
> >>>>
> >>>>>timefield.
> >>>>>
> >>>>>Here's a dump of what the shapefile is:
> >>>>>
> >>>>>stid | lat          | lon        | obsdate
> >>>>>----------------------------------------------
> >>>>>tom  | 45.412766    | -71.920082 | 2004-10-12
> >>>>>bob  | 45.399400    | -75.704200 | 2003-09-30
> >>>>>joe  | 55.399400    | -95.704200 | 2002-03-17
> >>>>>
> >>>>>
> >>>>>...and here's the time defines in LAYER/METADATA in mapfile:
> >>>>>
> >>>>>  "wms_timeextent" "2002-03-17/2004-10-12"  "wms_timedefault" 
> >>>>> "2003-09-30"  "wms_timeitem" "obsdate"
> >>>>>
> >>>>>
> >>>>>...and here's my tests:
> >>>>>
> >>>>>Single value:
> >>>>>
> >>>>>
> >>>>
> >>>>http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?version=1.1.1&se
> >>
> >>rvice=WMS&
> >>
> >>>>>re
> >>>>>
> >>>>
> >>>>quest=GetMap&layers=obs&format=image/gif&srs=EPSG:4326&transpa
> >>>>rent=TRUE&
> >>>>
> >>>>exceptions=application%2Fvnd.ogc.se_inimage&bbox=-140.243500,2
> >>>
> >>>8.606653,-
> >>>
> >>>
> >>>>51.243500,81.998653&width=500&height=300&time=2004-10-12-T00:0
> >>>>0:00&style
> >>>>
> >>>>
> >>>>>s=default
> >>>>>
> >>>>>Result: no problem, as expected
> >>>>>
> >>>>>Multple value:
> >>>>>
> >>>>>
> >>>>
> >>>>http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?version=1.1.1&se
> >>
> >>rvice=WMS&
> >>
> >>>>>re
> >>>>>
> >>>>
> >>>>quest=GetMap&layers=obs&format=image/gif&srs=EPSG:4326&transpa
> >>>>rent=TRUE&
> >>>>
> >>>>exceptions=application%2Fvnd.ogc.se_inimage&bbox=-140.243500,2
> >>>
> >>>8.606653,-
> >>>
> >>>
> >>>>51.243500,81.998653&width=500&height=300&time=2004-10-12-T00:0
> >>>>0:00,2003-
> >>>>
> >>>>
> >>>>>09-30-T00:00:00&styles=default
> >>>>>
> >>>>>Result: no problem, as expected
> >>>>>
> >>>>>Single range:
> >>>>>
> >>>>>
> >>>>
> >>>>http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?version=1.1.1&se
> >>
> >>rvice=WMS&
> >>
> >>>>>re
> >>>>>
> >>>>
> >>>>quest=GetMap&layers=obs&format=image/gif&srs=EPSG:4326&transpa
> >>>>rent=TRUE&
> >>>>
> >>>>exceptions=application%2Fvnd.ogc.se_inimage&bbox=-140.243500,2
> >>>
> >>>8.606653,-
> >>>
> >>>
> >>>>51.243500,81.998653&width=500&height=300&time=2002-03-17-T00:0
> >>>>0:00/2004-
> >>>>
> >>>>
> >>>>>10-12-T00:00:00&styles=default
> >>>>>
> >>>>>
> >>>>>Result: when the start time or end time is out of range of the 
> >>>>>default. For example, if you change the start year to 2001,
> >>>>
> >>>>only one
> >>>>
> >>>>
> >>>>>point shows
> >>>>>up:
> >>>>>
> >>>>>
> >>>>
> >>>>http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?version=1.1.1&se
> >>
> >>rvice=WMS&
> >>
> >>>>>re
> >>>>>
> >>>>
> >>>>quest=GetMap&layers=obs&format=image/gif&srs=EPSG:4326&transpa
> >>>>rent=TRUE&
> >>>>
> >>>>exceptions=application%2Fvnd.ogc.se_inimage&bbox=-140.243500,2
> >>>
> >>>8.606653,-
> >>>
> >>>
> >>>>51.243500,81.998653&width=500&height=300&time=2001-03-17-T00:0
> >>>>0:00/2004-
> >>>>
> >>>>
> >>>>>10-12-T00:00:00&styles=default
> >>>>>
> >>>>>...so it looks like the default is returned when the 
> range given is 
> >>>>>outside the range defined in "wms_timeextent".
> >>>>>
> >>>>>Is this the expected behaviour?  As a WMS client, I would
> >>>>
> >>>>expect that
> >>>>
> >>>>
> >>>>>temporal queries would return everything inside two given
> >>>>
> >>>>dates, just
> >>>>
> >>>>
> >>>>>like a spatial query does.
> >>>>>
> >>>>>..Tom
> >>>>>
> >>>>>
> >>>>
> >>>>I think that the specs indicates that if the given values are 
> >>>>"incorrect" the server would return values for the default
> >>
> >>declared :
> >>
> >>>>Section C5.1 (Annexe C wms 1.1.1 ):
> >>>>" ...An OGC Web Service may declare a default for any 
> dimension. A 
> >>>>'default' is optional but recommended. If a request does 
> not include 
> >>>>a value along this dimension, and a default has been
> >>
> >>declared, then the
> >>
> >>>>server shall send the default value..."
> >>>>
> >>>> The implementation was the interpretation of this text.
> >>>>
> >>>
> >>>
> >>>Thanks for the clarification -- being a spec zealot I
> >>
> >>should have read
> >>
> >>>up on this!!
> >>>
> >>>At any rate, if I comment out "wms_timedefault", and I specify:
> >>>
> >>>
> >>
> >>http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?version=1.1.1&se
> rvice=WMS&
> >>
> >>>re
> >>>
> >>
> >>quest=GetMap&layers=obs&format=image/gif&srs=EPSG:4326&transpa
> >>rent=TRUE&
> >>
> >>exceptions=application%2Fvnd.ogc.se_inimage&bbox=-140.243500,2
> > 
> > 8.606653,-
> > 
> >>51.243500,81.998653&width=500&height=300&time=2002-03-17-T00:0
> >>0:00/2004-
> >>
> >>>10-12-T00:00:00&styles=default
> >>> 
> >>>...it works as expected.  If I specify a range outside the time
> >>>extents,
> >>>i.e.:
> >>>
> >>>
> >>
> >>http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?version=1.1.1&se
> rvice=WMS&
> >>
> >>>re
> >>>
> >>
> >>quest=GetMap&layers=obs&format=image/gif&srs=EPSG:4326&transpa
> >>rent=TRUE&
> >>
> >>exceptions=application%2Fvnd.ogc.se_inimage&bbox=-140.243500,2
> > 
> > 8.606653,-
> > 
> >>51.243500,81.998653&width=500&height=300&time=2001-03-17-T00:0
> >>0:00/2004-
> >>
> >>>10-12-T00:00:00&styles=default
> >>>
> >>>I get prompted to download image/tiff.  What happens in this case?
> >>>
> >>
> >>It should normally send an exception of this nature :
> >>
> >><?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
> >><!DOCTYPE ServiceExceptionReport SYSTEM 
> >>"http://ogc.dmsolutions.ca/wms/1.1.1/exception_1_1_1.dtd">
> >><ServiceExceptionReport version="1.1.1">
> >><ServiceException code="InvalidDimensionValue">
> >>msWMSApplyTime: WMS server error. Time value(s) 2003-01-01 
> >>14:10 given 
> >>is invalid or outside the time extent defined 
> >>(2004-01-01/2004-02-01). </ServiceException> 
> </ServiceExceptionReport>
> >>
> >>Not sure where the image/tiff comes from.
> >>
> > 
> > 
> > For WCS support, I have an OUTPUTFORMAT object defined:
> > 
> >  OUTPUTFORMAT
> >   NAME GEOTIFF_RGB
> >   DRIVER "GDAL/GTiff"
> >   MIMETYPE "image/tiff"
> >   IMAGEMODE RGB
> >   EXTENSION "tif"
> >  END
> > 
> > ...when I commented this out, I get the error message as 
> per above, so 
> > that's good.
> > 
> > So why is the OUTPUTFORMAT object messing things up?
> > 
> 
> I just did a quick test on windows using latest cvs (and the 
> outputformat set to tiff) and I get the usual mapserv.exe 
> download with 
> the exception in it.  Do you get the same result for other wms 
> exceptions ? (the time exception is not set diffrently from other wms 
> excpetions)
> 
> 

Yes.  If I botch the request (i.e. request=GetMapPlease):

http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?version=1.1.1&service=WMS&re
quest=GetMapPlease&layers=obs&format=image/gif&srs=EPSG:4326&transparent
=TRUE&exceptions=application%2Fvnd.ogc.se_inimage&bbox=-140.243500,28.60
6653,-51.243500,81.998653&width=500&height=300&time=2001-03-17-T00:00:00
/2004-10-12-T00:00:00&styles=default

...I get image/tiff back.

It looks like if an OUTPUTFORMAT is defined, it overrides the mime type
of exceptions.

???

..Tom


> 
> -- 
> ----------------------------------------------------------------
> Assefa Yewondwossen
> Software Analyst
> 
> Email: assefa at dmsolutions.ca
> http://www.dmsolutions.ca/
> 
> Phone: (613) 565-5056 (ext 14)
> Fax:   (613) 565-0925
> ----------------------------------------------------------------
> 
> 
> 



More information about the mapserver-dev mailing list