Dave Weaver wrote:
(Apologies if this is a duplicate - I posted on Friday but haven't seen the
message appear on the list, so I'm trying once again...)

I'm having some difficulty displaying images using the WMS TIME=
parameter to select different time periods. I've scoured the
documentation, and although I get the general idea I don't see any
document that explains the basic steps needed to get this working (the
"WMS Time Support" document gives a rough idea, but misses out on some
of the details), so I suspect I've missed something or got something
wrong, but I've no idea what!

This is what I've done:

* I have done the following in Postgis:

 create table satellite (image_path text, image_time timestamp);
 select AddGeometryColumn('satellite', 'the_geom', 4326, 'POLYGON', 2);
 insert into satellite (image_path, image_time, the_geom) values,
'/home/map/fgs/www/htdocs/maps/images/sat1.tiff', '2007-05-11 10:00Z',
null);
 insert into satellite (image_path, image_time, the_geom) values
('/home/map/fgs/www/htdocs/maps/images/sat2.tiff', '2007-05-11
11:00Z', null);

*  My .map file has (amongst others) these layers:

 LAYER
   NAME            "time_idx"
   TYPE            POLYGON
   STATUS          ON
   CONNECTIONTYPE  POSTGIS
   CONNECTION      "dbname=map host=localhost"
   DATA            "the_geom from satellite using unique oid using srid = 4326"
   METADATA
       "wms_title"         "time index"
       "wms_srs"           "EPSG:4326"
       "wms_timeextent"    "2007-01-01/2007-12-31"
       "wms_timeitem"      "image_time" #a column in postgis table of
type timestamp
       "wms_timedefault"   "2007-05-11T10:00:00Z"
   END
 END

 LAYER
   NAME    "sat"
   METADATA
       "wms_title"         "Satellite"
       "wms_srs"           "EPSG:4326"
       "wms_timeextent"    "2007-01-01/2007-12-31"
       "wms_timeitem"      "image_time" #a column in postgis table of
type timestamp
       "wms_timedefault"   "2007-05-11T10:00:00Z"
   END
   STATUS  ON
   TYPE    RASTER
   PROJECTION
     "init=epsg:4326"
   END
   TILEINDEX "time_idx"        # Layer name containing time index
   TILEITEM  "image_path"      # DB column containing path to image
 END

* The URL I'm using to access the data is:
http://localhost:8080/cgi-bin/mapserv?map=/home/map/fgs/www/htdocs/maps/postgis2.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=world,sat,radar&WIDTH=800&HEIGHT=400&FORMAT=image/png&TRANSPARENT=false&&BBOX=-90,-25,90,85&TIME=2007-05-11T11:00

When I use this URL in my browser I see the underlying vector map
layer, but no satellite image appears.

So...

1) What am I doing wrong (or not doing at all) ?

  Do you have your imagery displaying when doing a simple draw map ?
(either a wms getmap or mapserver cgi). This is to make sure that the
tile index and the pg layers are set properly.

2) Am I right in thinking the geometry column can be null and the rows
will still be considered, depending on image_time ?

I think the geometry needs to be valid, each row of geometry should normally represent the bbox of the image.

3) Is the duplication of the metadata in the 2 layers above necessary?
I've done it this way because that's what's in the example in the "WMS
Time Support" document, but do I really need to repeat all this
information?

 The matadata should only be necessary on the tileindex layer.

4) How can I debug this - is there some way I can find out *why* it's
not displaying the raster layer? Is there maybe some way to show which
time periods it's considering?


  the wms time in your case ends up setting the filter element on your
postgis layer to something like :
"(date_trunc('minute',image_time) = '2007-05-11T11:00:00')" .
 Assuming that your imagery is displayed without a time request,you can
manually set the filter element and see if that is working.


5) Is there some basic HowTo document that explains what I'm trying to
do? (I couldn't find one).

Thanks a lot
Dave.



--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: [EMAIL PROTECTED]
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------

Reply via email to