[ms4w-users] wms and wfs in one mapfile?

Andre van Atten AvanAtten at reisinformatiegroep.nl
Fri Dec 7 04:59:42 EST 2007


Robert,
 
I serve WMS and WFS successfully from one and the same map file.
You have to be very clear if you want to use MS4W as a WFS/WMS server or as a WMS/WFS client from another server. 
Your web-metadata tells me that you want to use MS4W to act as a server. But your wfs_onlineresource links to another (external ?) server, so that looks as if you want to include another wfs server as a layer in your map file. In that case your server and map file acts like a WFS client for that layer.
Look to http://mapserver.gis.umn.edu/docs/reference/vector_data/wfs <http://mapserver.gis.umn.edu/docs/reference/vector_data/wfs>   and http://mapserver.gis.umn.edu/docs/howto/wfs_client, that explains how to use another web server as a client layer in your own web server. In that case you have to define CONNECTION, CONNECTIONTYPE and "wfs_request_method" "GET" parameters in your request.
 
My map file differs from yours on some points, but looks fine to me, your web-metadata too. But I don't use GROUP, CONNECTION and CONNECTIONTYPE in my layer definitions. That is, because I use MS4W only as a SERVER of WMS an WFS. See http://mapserver.gis.umn.edu/docs/howto/wfs_server And that works fine (for me). You can use other clients like MapInfo or uDig to act as a client to your ms4w wms/wfs server. MapInfo uses a WFS layer just as a normal layer, it displays the map, and you can use infotool and query and select just as a normal layer.
In case you only want to use MS4W as a client itself to other wms/wms servers you don't have to use the WEB-metadata .
 
So, don't mix it up, would be my advise. Define what you want from your MS4W, do you want it to act as a server, that servers WMS and/or WFS layers from your MS4W map file configuration to other WFS or WMS clients, or do you just want to show WMS or WFS layers form different server out there in this world.
 
Andre van Atten  

________________________________

Van: ms4w-users-bounces at lists.maptools.org namens Buchholz, Robert
Verzonden: do 6-12-2007 15:41
Aan: ms4w-users at lists.maptools.org
Onderwerp: [ms4w-users] wms and wfs in one mapfile?



Hello List,

maybe i have a missunderstanding, -off course a lack of experiance. Here is my question:
-can I use WMS and WFS in one mapfile?
-or schould I decide at once to offer WMS or WFS?
>From http://www.opengeospatial.org/resource/products/implementing I find that UMN can handle WMS and WFS. But how can I use them in one application?
WMS gives the image and
WFS give the polygon geometry and its data

My mapfile
...
WEB
    IMAGEPATH "/ms4w/tmp/ms_tmp/"
    IMAGEURL "/ms_tmp/"
      METADATA
         "original_projection" "init=epsg:25833"
        "wms_title" "wms_rob"
        "wms_onlineresource" "http://localhost:8080/cgi-bin/mapserv?"
        "wms_srs" "EPSG:25833"
        "wfs_title" "wfs_rob"
        "wfs_onlineresource" "http://localhost:8080/cgi-bin/mapserv?"
        "wfs_srs" "EPSG:25833"
      END
    QUERYFORMAT text/html
  END
...
LAYER
        GROUP "WMS"
                CONNECTION "server/wfsconnector/...?"
                   CONNECTIONTYPE WFS
                   METADATA
                        ...
                  END
...
END
...
LAYER
    GROUP "WFS"
    CONNECTION "server/wfsconnector/...?"
    CONNECTIONTYPE WFS
      METADATA
        "wfs_onlineresource" "http://server/wfsconnector/...?"
        "wfs_version"  "1.0.0"
        "wfs_title" "xyz"
        "gml_featureid" "table column name"
        "GML_INCLUDE_ITEMS" "all"      
      END
    NAME MY_WFS
    DUMP TRUE
        CLASS
            Name "MY_WFS"
            Style
                COLOR 200 255 000
                OUTLINECOLOR 120 120 120
            END
            TEMPLATE "ttt_query.html"
        END
    STATUS OFF
    TYPE POLYGON
  END
...

Does the WEB-METADATA makes sence?
The WFS basic Requests are working via Browser.
Using without WFS it works (WMS without GetFeatureInfo)!

Thanks in advance for your help,
Robert

-----------------------------------------
Robert Buchholz
Sachbearbeiter (Trainee)
Referat GIS-Zentrale
Landesumweltamt Brandenburg
Tel.: (033201)-442-127
Mail: Robert.Buchholz at LUA.Brandenburg.de
Internet: http://www.brandenburg.de/lua
Kein Zugang für elektronisch signierte sowie für verschlüsselte elektronische Daten.
-----------------------------------------

_______________________________________________
ms4w-users mailing list
ms4w-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/ms4w-users





More information about the ms4w-users mailing list