[mapserver-users] WMS-T support for vector data using OGR

Hari Pradhan starling.lucky at gmail.com
Mon Jun 9 12:15:05 PDT 2014


Hello List,

I have been trying to implement MapServer WMS -T using tile index. But I am
not able to make it work. I made some changes to the mapfile defined for "WMS-T
for raster imagery" in the link "http://mapserver.org/ogc/wms_time.html" to
make it work for vector data and followed the post in the link "
http://osgeo-org.1560.x6.nabble.com/WMS-WFS-and-yearly-time-dependent-data-td4275270.html",
but it didn't fix it out.

The thing that I did:
1. I had a set of vector shape file captured at different time frame. Say
v1.shp, v2.shp,...
2. I used ogrtindex to generate a tileindex (say 'VectorLayer2.shp) for
above shape files. The dbf file of this tileindex has 'location' attribute.
3. I ran my script to add 'Time' field to this tileindex such that the
final dbf file has two fields as location and Time.
   My dfb file looks like:
        LOCATION                                        Time
       C:\data\tif\VectorLayer\SiteAddress_1.shp,0    20070301
       C:\data\tif\VectorLayer\SiteAddress_2.shp,0    20070302

4. Then finally I wrote the map file with layer section as:

LAYER
    NAME "states"
        DEBUG 5
        CONNECTIONTYPE OGR
        TILEINDEX "VectorLayer2.shp"
        TILEITEM "Location"
        TYPE POLYGON
    STATUS ON

    METADATA
      "wms_title"    "states"
          "wms_include_items"   "all"
          "wms_dataurl_format" "text/HTML"
      "ows_include_items"     "all"
      "wms_exceptions_format" "application/vnd.ogc.se_xml"
          'wms_srs'             'EPSG:42304'
          "wms_timeextent" "20070301/20070302"
          "wms_timeitem" "Time"
          "wms_timedefault" "20070302"
    END
        FILTER "Time = '20070302'"
                PROJECTION
      "init=epsg:42304"
    END
                CLASS
      NAME       "The Upper Great Lakes States"
      STYLE
        COLOR        232 232 232
        OUTLINECOLOR 32 32 32
      END
    END
  END

By doing this, I got the following error.
msOGRLayerInitItemInfo(): OGR error. Invalid Field name: Time".

Could anyone please help me to resolve this problem?

Thanks in advance.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140609/0706e429/attachment.html>


More information about the mapserver-users mailing list