I try to fix time_extends with layer and the behaivor are the same, also I logged the postgresql &amp; mapserver:<br><br>with this query show always the first image , at the 11:00:00, in the log of postgresql the query has not time parameter<br>
<br><a href="http://mapserver-tutorial/cgi-bin/mapserv?map=/home/vbox/Downloads/mapserver-tutorial/ms4w/apps/tutorial/htdocs/tile_time.map&amp;LAYERS=sat_w,time_w&amp;mode=map&amp;TIME=2007-05-11T11:00:00">http://mapserver-tutorial/cgi-bin/mapserv?map=/home/vbox/Downloads/mapserver-tutorial/ms4w/apps/tutorial/htdocs/tile_time.map&amp;LAYERS=sat_w,time_w&amp;mode=map&amp;TIME=2007-05-11T11:00:00</a><br>
<br>postgresql<br>2010-07-05 16:14:26 CEST LOG:  statement: select attname from pg_attribute, pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = &#39;p&#39; and pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = &#39;tile_index&#39; and pg_table_is_visible(pg_class.oid) and pg_constraint.conkey[2] is null<br>
2010-07-05 16:14:26 CEST LOG:  statement: select encode(AsBinary(force_collection(force_2d(&quot;tile_geom&quot;)),&#39;NDR&#39;),&#39;base64&#39;) as geom,&quot;oid&quot; from tile_index where tile_geom &amp;&amp; GeomFromText(&#39;POLYGON((165660.980559345 -371954.772084,165660.980559345 632767.19157,1506410.35680666 632767.19157,1506410.35680666 -371954.772084,165660.980559345 -371954.772084))&#39;,find_srid(&#39;&#39;,&#39;tile_index&#39;,&#39;tile_geom&#39;))<br>
2010-07-05 16:14:27 CEST LOG:  statement: select attname from pg_attribute, pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = &#39;p&#39; and pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = &#39;tile_index&#39; and pg_table_is_visible(pg_class.oid) and pg_constraint.conkey[2] is null<br>
2010-07-05 16:14:27 CEST LOG:  statement: select &quot;tile_filepath&quot;,encode(AsBinary(force_collection(force_2d(&quot;tile_geom&quot;)),&#39;NDR&#39;),&#39;base64&#39;) as geom,&quot;oid&quot; from tile_index where tile_geom &amp;&amp; GeomFromText(&#39;POLYGON((-98.0072083861835 40.1776647603121,-98.0072083861835 50.6708031292285,-79.1036733841116 50.6708031292285,-79.1036733841116 40.1776647603121,-98.0072083861835 40.1776647603121))&#39;,find_srid(&#39;&#39;,&#39;tile_index&#39;,&#39;tile_geom&#39;))<br>
<br><br><br>with this url selects first image but show the second, in this case the query take into account time parameter<br><br><a href="http://mapserver-tutorial/cgi-bin/mapserv?map=/home/vbox/Downloads/mapserver-tutorial/ms4w/apps/tutorial/htdocs/tile_time.map&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;LAYERS=time_w,sat_w&amp;WIDTH=800&amp;HEIGHT=400&amp;FORMAT=image/png&amp;TRANSPARENT=false&amp;srs=EPSG:4326&amp;BBOX=-126,24,-66,50&amp;TIME=2007-05-11T10:00:00">http://mapserver-tutorial/cgi-bin/mapserv?map=/home/vbox/Downloads/mapserver-tutorial/ms4w/apps/tutorial/htdocs/tile_time.map&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;LAYERS=time_w,sat_w&amp;WIDTH=800&amp;HEIGHT=400&amp;FORMAT=image/png&amp;TRANSPARENT=false&amp;srs=EPSG:4326&amp;BBOX=-126,24,-66,50&amp;TIME=2007-05-11T10:00:00</a><br>
<br>postgresql<br>2010-07-05 16:05:29 CEST LOG:  statement: select attname from pg_attribute, pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = &#39;p&#39; and pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = &#39;tile_index&#39; and pg_table_is_visible(pg_class.oid) and pg_constraint.conkey[2] is null<br>
2010-07-05 16:05:30 CEST LOG:  statement: select &quot;tile_timestamp&quot;,&quot;tile_filepath&quot;,encode(AsBinary(force_collection(force_2d(&quot;tile_geom&quot;)),&#39;NDR&#39;),&#39;base64&#39;) as geom,&quot;oid&quot; from tile_index where tile_geom &amp;&amp; GeomFromText(&#39;POLYGON((-126 24,-126 50,-66 50,-66 24,-126 24))&#39;,find_srid(&#39;&#39;,&#39;tile_index&#39;,&#39;tile_geom&#39;)) and (date_trunc(&#39;second&#39;, tile_timestamp) = &#39;2004-01-01T10:10:00Z&#39;) and (date_trunc(&#39;second&#39;, tile_timestamp) = &#39;2004-01-01T10:10:00Z&#39;)<br>
2010-07-05 16:05:30 CEST LOG:  statement: select &quot;image_time&quot;,encode(AsBinary(force_collection(force_2d(&quot;the_geom&quot;)),&#39;NDR&#39;),&#39;base64&#39;) as geom,&quot;oid&quot; from satellite where the_geom &amp;&amp; GeomFromText(&#39;POLYGON((-2639868.99029283 -2322020.83542886,-2639868.99029283 1072412.78850334,3408818.1364184 1072412.78850334,3408818.1364184 -2322020.83542886,-2639868.99029283 -2322020.83542886))&#39;,find_srid(&#39;&#39;,&#39;satellite&#39;,&#39;the_geom&#39;)) and (date_trunc(&#39;second&#39;, image_time) = &#39;2007-05-11T10:00:00&#39;)<br>
2010-07-05 16:05:30 CEST LOG:  statement: select &quot;image_time&quot;,&quot;image_path&quot;,encode(AsBinary(force_collection(force_2d(&quot;the_geom&quot;)),&#39;NDR&#39;),&#39;base64&#39;) as geom,&quot;oid&quot; from satellite where the_geom &amp;&amp; GeomFromText(&#39;POLYGON((-126 24,-126 50,-66 50,-66 24,-126 24))&#39;,find_srid(&#39;&#39;,&#39;satellite&#39;,&#39;the_geom&#39;)) and (date_trunc(&#39;second&#39;, image_time) = &#39;2007-05-11T10:00:00&#39;)<br>
<br>mapserver<br>[Mon Jul  5 16:44:46 2010].254344 msPostGISLayerWhichShapes query: select &quot;image_time&quot;,encode(AsBinary(force_colle<br>ction(force_2d(&quot;the_geom&quot;)),&#39;NDR&#39;),&#39;base64&#39;) as geom,&quot;oid&quot; from satellite where the_geom &amp;&amp; GeomFromText(&#39;POLYGON(<br>
(-2639868.99029283 -2322020.83542886,-2639868.99029283 1072412.78850334,3408818.1364184 1072412.78850334,3408818.1<br>364184 -2322020.83542886,-2639868.99029283 -2322020.83542886))&#39;,find_srid(&#39;&#39;,&#39;satellite&#39;,&#39;the_geom&#39;)) and (date_tr<br>
unc(&#39;second&#39;, image_time) = &#39;2007-05-11T11:00:00&#39;)<br>[Mon Jul  5 16:44:46 2010].352763 msPostGISLayerWhichShapes query status: 2<br>[Mon Jul  5 16:44:46 2010].352796 msPostGISLayerWhichShapes got 1 records in result.<br>
[Mon Jul  5 16:44:46 2010].352817 msPostGISLayerNextShape called.<br>[Mon Jul  5 16:44:46 2010].352835 msPostGISReadShape called.<br>[Mon Jul  5 16:44:46 2010].352858 msPostGISReadShape: [image_time] &quot;2007-05-11 11:00:00&quot;<br>
<br><br>the same above but with &quot;&amp;mode=map&quot; will have the same behavior than the first url, show always the first image<br><br>when you put seconds in the url postgresql recives a query with date_trunc(&#39;second&#39;, image_time) , If put only minute date_trunc(&#39;minute&#39;, image_time), it seems that mapserver detect what kind of time parameter is.<br>
<br><br>It&#39;s so tricky this mapserver :/ , thanks daryl &amp; alexander<br><br><br><div class="gmail_quote">2010/7/3 Alexander Petkov <span dir="ltr">&lt;<a href="mailto:greenkov@gmail.com">greenkov@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I suggest that you carefully inspect your definitions in your mapfile,<br>
as well as the data in the Postgis DB itself.<br>
Turn debugging on, and inspect the log file closely.<br>
Also, if you already haven&#39;t, enable PostgreSQL logging, inspect<br>
incoming requests to your database as well.<br>
<br>
For example, one inconsistency that is evident from your map file is<br>
the date format--the &quot;wms_timeextent&quot; item for the &quot;sat_w&quot; layer<br>
contains a date range, while your Postgis data also has a timestamp<br>
data type with HH24:MI data. I would eliminate those inconsistensies<br>
first.<br>
<br>
List each time step individually (comma separated) in your mapfile ,<br>
since your number of records for the time being is small, rather than<br>
specifying a date range.<br>
<br>
Again, do not be shy about inspecting the log files. Randomly trying<br>
&quot;a lot of combinations&quot;, as well as different Mapserver versions<br>
hoping that something will work will likely not help.<br>
<br>
Alex<br>
<div><div></div><div class="h5"><br>
On Fri, Jul 2, 2010 at 6:20 AM, rai 8 &lt;<a href="mailto:max1000@gmail.com">max1000@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Could you provide an example URL you are using to test out the WMS-T?  I<br>
&gt;&gt; am using WMS-T on 5.6.3 without any known issues.  Please note that if your<br>
&gt;&gt; time table gets very large, you may hit this quirk:<br>
&gt;<br>
&gt; I am using URL like:<br>
&gt; <a href="http://mapserver-tutorial/cgi-bin/mapserv?map=/home/vbox/map_directory/tile_time_2.map&amp;layer=radar&amp;layer=time_idx_pg&amp;mode=map&amp;TIME=2004-01-01T10:10:00" target="_blank">http://mapserver-tutorial/cgi-bin/mapserv?map=/home/vbox/map_directory/tile_time_2.map&amp;layer=radar&amp;layer=time_idx_pg&amp;mode=map&amp;TIME=2004-01-01T10:10:00</a><br>

&gt;<br>
&gt; It shows an image but always the first -&gt;<br>
&gt; /home/vbox/Downloads/animacio/sat1.tif , that have the timestamp: 2007-05-11<br>
&gt; 10:00Z<br>
&gt;<br>
&gt; My table its very little, I was wrong about the version, is the 5.4.2, i&#39;ll<br>
&gt; try to do the same with the 5.6 but it&#39;s very strange that any configuration<br>
&gt; that I tried doesn&#39;t work.<br>
&gt;<br>
&gt;&gt; need to be in the METADATA section of the &quot;sat_w&quot; layer.<br>
&gt;<br>
&gt; I tried a lot of combinations, also with all the metadata in sat_w like<br>
&gt; &quot;official&quot; tutorial<br>
&gt;<br>
&gt;<br>
&gt; thanks a lot!<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 2010/7/1 Alexander Petkov &lt;<a href="mailto:greenkov@gmail.com">greenkov@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Jul 1, 2010 at 6:27 AM, rai 8 &lt;<a href="mailto:max1000@gmail.com">max1000@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Hello,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I&#39;ve been working with mapserver to get a map with time support, time<br>
&gt;&gt;  &gt; parameter, I followed the tutorial in documetation<br>
&gt;&gt; &gt; <a href="http://mapserver.org/ogc/wms_time.html" target="_blank">http://mapserver.org/ogc/wms_time.html</a> and this post<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; <a href="http://osgeo-org.1803224.n2.nabble.com/Accessing-images-using-time-dimension-td1991324.html#a1991324" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Accessing-images-using-time-dimension-td1991324.html#a1991324</a><br>

&gt;&gt; &gt; and I can&#39;t run the mapserver to change the image with a time parameter.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I test several configurations but any works, the last is the same like<br>
&gt;&gt; &gt; the<br>
&gt;&gt; &gt; post in the maillist, this is what i&#39;ve done:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; in a postgis database<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; create table satellite (image_path text, image_time timestamp);<br>
&gt;&gt; &gt; select AddGeometryColumn(&#39;satellite&#39;, &#39;the_geom&#39;, 4326, &#39;POLYGON&#39;, 2);<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; insert into satellite (image_path, image_time, the_geom)<br>
&gt;&gt; &gt; values (&#39;/home/vbox/Downloads/animacio/sat1.tif&#39;, &#39;2007-05-11 10:00Z&#39;,<br>
&gt;&gt; &gt; GeomFromText(&#39;POLYGON((-31.82 75.55, -31.82 26.5, 51.31 26.5,51.31<br>
&gt;&gt; &gt; 75.55,<br>
&gt;&gt; &gt; -31.82 75.55))&#39;, 4326));<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; insert into satellite (image_path, image_time, the_geom)<br>
&gt;&gt; &gt; values (&#39;/home/vbox/Downloads/animacio/sat2.tif&#39;, &#39;2007-05-11 11:00Z&#39;,<br>
&gt;&gt; &gt; GeomFromText(&#39;POLYGON((-31.82 75.55, -31.82 26.5, 51.31 26.5,51.31<br>
&gt;&gt; &gt; 75.55,<br>
&gt;&gt; &gt; -31.82 75.55))&#39;, 4326));<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; and the map file:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;  LAYER<br>
&gt;&gt; &gt;     NAME    &quot;time_w&quot;<br>
&gt;&gt; &gt;     TYPE    POLYGON<br>
&gt;&gt; &gt;     STATUS    ON<br>
&gt;&gt; &gt;     CONNECTIONTYPE  POSTGIS<br>
&gt;&gt; &gt;     CONNECTION    &quot;dbname=tile_index host=127.0.0.1 user=postgres<br>
&gt;&gt; &gt; password=xxxxxx&quot;<br>
&gt;&gt; &gt;     DATA    &quot;the_geom from satellite using unique oid using srid = 4326&quot;<br>
&gt;&gt; &gt;     METADATA<br>
&gt;&gt; &gt;         &quot;wms_title&quot;    &quot;time_index_w&quot;<br>
&gt;&gt; &gt;         &quot;wms_srs&quot;    &quot;EPSG:4326&quot;<br>
&gt;&gt; &gt;         &quot;wms_timeextent&quot;    &quot;2007-01-01/2007-12-31&quot;<br>
&gt;&gt; &gt;         &quot;wms_timedefault&quot;   &quot;2007-05-11T11:00:00Z&quot;<br>
&gt;&gt; &gt;         &quot;wms_timeitem&quot;    &quot;image_time&quot; #a column in postgis table of<br>
&gt;&gt; &gt; type<br>
&gt;&gt; &gt;     END<br>
&gt;&gt; &gt;   END<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;   LAYER<br>
&gt;&gt; &gt;     NAME    &quot;sat_w&quot;<br>
&gt;&gt; &gt;     STATUS  ON<br>
&gt;&gt; &gt;     TYPE    RASTER<br>
&gt;&gt; &gt;     METADATA<br>
&gt;&gt; &gt;         &quot;wms_title&quot;    &quot;Satellite&quot;<br>
&gt;&gt; &gt;         &quot;wms_timeextent&quot;    &quot;2007-01-01/2007-12-31&quot;<br>
&gt;&gt; &gt;     END<br>
&gt;&gt; &gt;     PROJECTION<br>
&gt;&gt; &gt;       &quot;init=epsg:4326&quot;<br>
&gt;&gt; &gt;     END<br>
&gt;&gt; &gt;     TILEINDEX &quot;time_w&quot; # Layer name containing time index<br>
&gt;&gt; &gt;     TILEITEM  &quot;image_path&quot; # DB column containing path to image<br>
&gt;&gt; &gt;   END<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; anyone finds some error?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; thanks<br>
&gt;&gt;<br>
&gt;&gt; The time-related metadata items:<br>
&gt;&gt;<br>
&gt;&gt; &quot;wms_timeextent&quot;    &quot;2007-01-01/2007-12-31&quot;<br>
&gt;&gt;        &quot;wms_timedefault&quot;   &quot;2007-05-11T11:00:00Z&quot;<br>
&gt;&gt;        &quot;wms_timeitem&quot;    &quot;image_time&quot; #a column in postgis table of type<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; need to be in the METADATA section of the &quot;sat_w&quot; layer.<br>
&gt;&gt;<br>
&gt;&gt; Alex<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>