[Mapserver-users] Wms or Wfs

Paul Spencer spencer at dmsolutions.ca
Fri Apr 23 12:48:19 EDT 2004


A slight clarification, I think your wording has implied that a WMS 
works for raster data only ...  The WMS returns images of any layer 
configured for the WMS, which can be either vector or raster.  A WMS 
client only has to combine the resulting layers to produce a map image. 
  Web Feature Service returns vector features in GML, the WFS client has 
to understand GML and do its own rendering.

If you use a recent (i.e. 4.2) version of MapServer and you have a 
correctly configured map file, then you can do some fairly intelligent 
things with WMS and WFS.

Primarily you will use WMS to view your data.  For any given layer, you 
can use the WMS DescribeLayer request to determine if a WFS is available 
for that layer.  If it is, then you can find out about the features that 
are being drawn by the WMS by issuing a DescribeFeatureType request to 
the WFS server using the typename and wfs onlineresource returned by the 
DescribeLayer request.  This will tell you the attributes and attribute 
types of the WFS data and allow one to build relatively sophisticated 
interfaces to support querying, filtering, and extraction of data (for 
instance).

And the reason why this is cool is because the client application and 
remote data provider (WMS or WFS) can be any technology you wish, either 
MapServer or some other one, and neither the client nor the server will 
care (at least that's the ideal theory!)

Paul

Arnulf Christl wrote:

> publiek at home.nl wrote:
> 
>> Hello all,
>>
>> I'm trying to understand what WMS / WFS do.
>>  
>>
> WMS describes the interface to order (request) raster images (pixels) 
> and the returned map. Optionally it can (and most do) deliver feature 
> information - the attributes of a geometry.
> WFS describes the interface to order (request) vector geometry 
> (features) and how to receive them.
> 
>> We have a database with employment data per location.
>> We also have a polygon database (postgis/postgresql).
>>
>> It is possible to use wfs to get a table depending on where the user 
>> clicks on the map?
> 
> Yes.
> 
>> I believe the mapserver asks postgresql the relevant data?
>>  
>>
> Yes.
> 
>> And with wms you also get the image?  
>>
> Yes.
> 
>> Am i correct on this? And how could i implement this? Any tips / 
>> pointers?  
>>
> First specify for yourself what you want. If you want to see a map where 
> you can click on a location and see the attributes of that "point" then 
> you just include the PostgreSQL/PostGIS table in the UMN MapServer as a 
> LAYER in the MAP file. Then you can query this layer with a client and 
> receive the results in a HTML page. The layout of the resulting HTML 
> page can be customized individually.
> If you need the coordinates of the location you would rather ask the 
> WFS, it will return the geometry and the attributes but no map.
> 
> Regards, Arnulf.
> 

-- 
  -----------------------------------------------------------------
|Paul Spencer                           pspencer at dmsolutions.ca   |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------




More information about the mapserver-users mailing list