[mapserver-users] How Interval is defined for WMS-T

Even Rouault even.rouault at spatialys.com
Tue Feb 16 06:43:43 PST 2016


Le mardi 16 février 2016 15:21:17, Yves Jacolin a écrit :
> Hello,
> 
> I have a WMS-T layer. The datasource is in a postgis layer. The SQL request
> send by MapServer is something like this:
> 
> ("timestamp" between date_trunc('second',timestamp
> '2016-02-17T15:00:00.000Z') and date_trunc('second',timestamp
> '2016-02-17T15:00:00.000Z') + interval '1 second' - interval '1 second')
> 
> I understand the + interval '1 second' - interval '1second', but I can't
> understand how the first interval resolution come from, see [1].
> 
> I guess this is calculated from wms_timedefault or wms_timeextent. Here my
> METADATA LAYER of my mapfile:
> 
>             "wms_timeextent" "2016-02-16T22:20/2016-02-17T21:20/PT1H"
>             "wms_timeitem" "timestamp"
>             "wms_timedefault" "2016-02-16T23:20"
> 
> Any idea how I can "force" the interval resolution to minute?

Yves,

The resolution comes from the value of time parameter passed in the WMS 
request (or the timedefault value if time is not specified). To get a one 
minute resolution, the time parameter must be expressed in minutes.	This is 
actually explained in http://mapserver.org/ogc/wms_time.html ( "Interpreting 
Time Values", "Exceptions to this rule")

AFAICS there's no way to override that currently (although it might 
potentially be desirable, for example by taking into account the resolution in 
the timeextent syntax)

One workaround to indicate the intent to the client is to specify 
"wms_timeformat". Although it doesn't seem to work properly currently, ie if 
you specify "YYYY-MM-DDTHH:MM", a value with seconds will be accepted as 
validating the beginning of the pattern. Hum looks like a bug.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com



More information about the MapServer-users mailing list