Database Reference
In-Depth Information
WMSisaservicethatisusedtogeneratethemapstobedisplayedbyclients.Those
maps are generated using image formats, such as PNG, JPEG, and many others.
Some of the most typical WMS requests are as follows:
GetCapabilities :ItoffersanoverviewoftheservicesofferedbyWMS,par-
ticularly a list of the available layers and some of the details of each layer
(layer extent, coordinate reference systems, URI of the data, and so on).
GetMap :Itreturnsamapimagerepresentingoneormorelayersforaspeci-
fied extent and spatial reference, in a specified image file format and size.
GetFeatureInfo : It is an optional request by WMS that returns, in different
formats,theattributevaluesforthefeaturesofagivenpointinthemap.You
haveseenhowtocustomizetheresponsebyintroducingatemplatefilethat
must be set in the mapfile.
WFS provides a convenient, standard way to access the features of a vector layer
with a web request. The service response streams to the client the requested fea-
tures using GML (an XML markup defined by OGC to define geographical features).
Some of the WFS requests are as follows:
GetCapabilities :Itgivesadescriptionoftheservicesandlayersofferedby
the WFS service
GetFeature :Itallowstheclienttogetasetoffeaturesofagivenlayer,cor-
responding to a given criteria
TheseWMSandWFSrequestscanbeconsumedbytheclientusingtheHTTPpro-
tocol. You have seen how to query and get a response from the client by typing
a URL in a browser with several parameters appended to it. As an example, the
following WMS GetMap request will return a map image of the layers (using the
LAYERS parameter)inaspecifiedformat(usingthe FORMAT parameter),size(using
the WIDTH and HEIGHT parameters),extent(usingthe BBOX parameter),andspatial
reference system (using CRS ):
http://localhost/cgi-bin/mapserv?map=/var/www/data/coun-
tries.map&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-26,-111,36,-38&CRS=EPSG:4326&WIDTH=806&HEIGHT=688&LAYERS=countries&STYLES=&FORMAT=image/
png .
InMapServer,youcancreateWMSandWFSservicesinthemapfileusingitsdirect-
ives.Themapfileisatextfilethatiscomposedofseveralsectionsandistheheart
Search WWH ::




Custom Search