Database Reference
In-Depth Information
2013-05-27
http://localhost/cgi-bin/mapserv?map=/var/www/data/hot-
spots.map&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-25,-100,35,-35&CRS=EPSG:4326&WIDTH=1000&HEIGHT=800&LAYERS=hotspots&STYLES=&FORMAT=image/
png&TIME=2013-05-29
How it works...
Inthisrecipe,youhaveseenhowtocreateaWMSTimeserviceusingtheMapServ-
er open-source web-mapping engine. A WMS Time service is useful for whenever
youhavetemporalseriesandgeographicdatavaryingintheTime.TheWMSTime
service allows the user to filter the requested data by providing a
TIME
parameter
with a time value in the WMS requests.
Forthispurpose,youfirstcreatedaplainWMS;ifyouarenewtotheWMSstandard,
mapfileandMapServer,youcancheckoutthefirstrecipeinthischapter.Youhave
imported in PostGIS a points shapefile with one week's worth of hotspots derived
from the MODIS satellite, and created asimple WMS for this layer.
After verifying that this WMS works well by testing the WMS
GetCapabilities
and
GetMap
requests,youhavetime-enabledtheWMSbyaddingthreeparameters
inthe
LAYER METADATA
mapfilesection:
wms_timeextent
,
wms_timeitem
,and
wms_timedefault
.
The
wms_timeextent
parameter is the time extent supported by the WMS Time
service.The
wms_timeitem
parameterdefinesthePostGIS tablefieldtobeused
tofilterthe
TIME
parameter(
acq_date
fieldinthiscase).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
GetCapabil-
ities
requestnowincludesthetime-dimensiondefinitionforthePostGIShotspots