problem with WMS TIME support and PostGIS

Bruno Canessa b.canessa at IOL.IT
Thu Jan 18 07:06:40 EST 2007


Hi all,

I have a problem with WMS with TIME support and Postgis.
Inilially I created a map file where layers access direct to files, and 
it works fine. I mean, the web service is able to  process the TIME 
parameter:

LAYER
    NAME "Anomalie"
    GROUP "Anomalie"
    TYPE RASTER
    STATUS ON
    METADATA
      "queryable" "true"
      "tile_source" "nocache"
      "wms_title" "Anomalie"
      "wms_timeextent" "2006-05-01/2006-10-31"
      "wms_timeitem" "datetime"
      "wms_timedefault" "2006-05-10"
      "wms_srs" "EPSG:4326"
    END
    TILEINDEX "epluie_a_idx.shp"
    TILEITEM "Location"
    CLASSITEM "[pixel]"
      CLASS
        (......)
      END
  END

On the contrary, if I try to access through Postgis it seems that the 
TIME parameter is not recognised, it always shows the last image of the 
index list.

 LAYER
    NAME "anomalie_idx"
    STATUS ON
    TYPE POLYGON
    DATA "wkb_geometry from tileindex_table"
    METADATA
      "wms_title" "ANOMALIE INDEX"
      "wms_srs"   "EPSG:4326"
      "wms_timeextent" "2006-05-01/2006-10-31"
      "wms_timeitem" "datetime"  #column in postgis table of type date
      "wms_timedefault" "2006-05-10"
      "tile_source" "nocache"
    END
    CONNECTION "dbname=test user=xxx host=localhost port=5432"
    CONNECTIONTYPE postgis
  END
  
  LAYER
    NAME "Anomalie"
    GROUP "Anomalie"
    TYPE RASTER
    STATUS ON
    DEBUG ON
    PROJECTION
      "init=epsg:4326"
    END   
    METADATA
      "queryable" "true"
      "tile_source" "nocache"
      "wms_title" "Anomalie"
      "wms_timeextent" "2006-05-01/2006-10-31"
      "wms_timeitem" "datetime"
      "wms_timedefault" "2006-05-10"
      "wms_srs" "EPSG:4326"
    END
    TILEINDEX "anomalie_idx"
    TILEITEM "Location"
    CLASSITEM "[pixel]"
      CLASS
        (...)
      END
  END

I tried to perform queries in PostgreSQL such as
SELECT * FROM tileindex_table WHERE date_trunc('day', datetime) = 
'2006-10-10';
and it works fine.

I use mapserver 4.8.4, PostgreSQL 8.1.4 and  PostGIS 1.1.3

Any suggestion?

Thanks,

Bruno.
--------
Dott. Bruno Canessa
National Research Council - Institute of Biometeorology (CNR-IBIMET)
Via G.Caproni, 8
50145 Firenze (Italy)
Tel. +39 055 3033719
Fax +39 055 308910
E-mail: b.canessa at iol.it <mailto:b.canessa at ibimet.cnr.it>

 

 



More information about the mapserver-users mailing list