Hi, It seems to be a bit complicated but perhaps reading this thread helps http://osgeo-org.1560.n6.nabble.com/WFS-multiple-typenames-in-request-only-one-in-reply-td4232816.html
Strictly speaking your filter is rather bad. You are using WFS 1.1.0 and GML 3 but your filter is using GML 2 "box" which does not exist at all in GML 3 and "coordinates" which is deprecated. I would suggest to use WFS 1.0.0 when your filter is OK or then build correct GML 3 filters. Your mixture may work with Mapserver but most probably not with schema validating servers like TinyOWS and deegree. -Jukka Rahkonen- ________________________________________ Lähettäjä: Donald Kerr [donald.k...@dkerr.co.uk] Lähetetty: 26. kesäkuuta 2012 11:46 Vastaanottaja: Rahkonen Jukka; 'MAPSERVER USERS' Aihe: RE: [mapserver-users] Grouping WFS Layers to Output One GML file I need some further help if possible. I have got more than one layer to work but am getting an error "Wrong number of filter elements" when trying to apply a BBOX filter to the GetFeature request. I can get the WFS GetFeature query to work for a single layer as follows: localhost/cgi-bin/mapserv.exe?map=MyMap.map&service=wfs&version=1.1.0&reques t=getfeature&typename=Layer1&maxfeatures=50&outputformat=gml3 And for two layers as follows: localhost/cgi-bin/mapserv.exe?map=MyMap.map&service=wfs&version=1.1.0&reques t=getfeature&typename=Layer1,Layer2&maxfeatures=50&outputformat=gml3 I can also filter the single layer as follows: localhost/cgi-bin/mapserv.exe?map=MyMap.map&service=wfs&version=1.1.0&reques t=getfeature&typename=Layer1&maxfeatures=50&outputformat=gml3&Filter=<Filter ><BBOX><PropertyName>msGeometry</PropertyName><box srsName="EPSG:27700"><coordinates>56273,779431 56273,779431</coordinates></box></BBOX></filter> But, if I try to filter on two layers as follows: localhost/cgi-bin/mapserv.exe?map=MyMap.map&service=wfs&version=1.1.0&reques t=getfeature&typename=Layer1,Layer2&maxfeatures=50&outputformat=gml3&Filter= <Filter><BBOX><PropertyName>msGeometry</PropertyName><box srsName="EPSG:27700"><coordinates>56273,779431 56273,779431</coordinates></box></BBOX></filter> I get an error: <?xml version="1.0" encoding="ISO-8859-1" ?> - <ows:ExceptionReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows" version="1.1.0" language="en-US" xsi:schemaLocation="http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd"> - <ows:Exception exceptionCode="InvalidParameterValue" locator="filter"> <ows:ExceptionText>msWFSGetFeature(): WFS server error. Wrong number of filter elements, one filter must be specified for each feature type listed in the TYPENAME parameter.</ows:ExceptionText> </ows:Exception> </ows:ExceptionReport> I've tried various methods for specifying multiple filters but cannot get it to work. Can anyone advise please? Many thanks. Regards, Donald -----Original Message----- From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi] Sent: 25 June 2012 21:47 To: Donald Kerr; 'MAPSERVER USERS' Subject: Re: [mapserver-users] Grouping WFS Layers to Output One GML file Hi, Have you tried what happens if you give a list of layers as typename? This should send you some data from TinyOWS http://188.64.1.61/cgi-bin/tinyows?service=WFS&version=1.0.0&request=Getfeat ure&typename=lv:puolilehti_25t,lv:puolilehti_50t -Jukka Rahkonen- ________________________________________ Donald Kerr wrote: > Is it possible to group WFS layers, in much the same way as WMS: "wms_group_title" "Several_Layers", so that a single gml file is returned from Mapserver? > To explain what I'm trying to do: I want to output several WFS layers > as GML so that they can be imported to another program as a single GML file. I would like to make this file available as a url, i.e. right click - save as, so that the user could then import the lot as a single file. The easiest way for me to do this would be if I could group the WFS layers at the Mapserver level and provide a link to that WFS request. Alternatively, can anyone provide some ideas as to how this could be done by, for example, OpenLayers (I know, wrong group!) or maybe some sort of server side joining of multiple WFS layers. Many thanks. Regards, Donald _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users = _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users