In this recipe, you have seen how to create a WMS Time service using the MapServer open source web-mapping engine. A WMS Time service is useful for whenever you have temporal series and geographic data varying in the time. WMS Time lets the user filter the requested data by providing a TIME parameter with a time value in the WMS requests.
For this purpose, you first created a plain WMS; if you are new to the WMS standard, mapfile, and MapServer, you can check out the first recipe in this chapter. You have imported in PostGIS a points shapefile with one week's worth of hotspots derived from the MODIS satellite and created a simple WMS for this layer.
After verifying that this WMS works well by testing the WMS GetCapabilities and GetMap requests, you have time enabled the WMS by adding three parameters in the LAYER METADATA mapfile section: wms_timeextent, wms_timeitem, and wms_timedefault.
The wms_timeextent parameter is the duration of time in which the service will give a response. It defines the PostGIS table field to be used to filter the TIME parameter (the acq_date field in this case). The wms_timedefault parameter specifies a default time value to be used when the request to the WMS service does not provide the TIME parameter.
At this point, the WMS is time enabled; this means that the WMS GetCapabilities request now includes the time-dimension definition for the PostGIS hotspots layer and, more importantly, the GetMap WMS request lets the user add the TIME parameter to query the layer for a specific date.