[mapserver-users] Filter elements on multiple layers

Alexander Petkov greenkov at gmail.com
Wed Nov 3 13:37:15 EDT 2010


You might have to specify your filter for each typename, as in:
http://my-server/fcgi-bin/mapserv&map=mymap.map&service=WFS&version=1.1.0&request=GetFeature&typename=layer1,layer2&FILTER=(<Filter>...</Filter>)(<Filter>...</Filter>)


See this thread:
http://www.mail-archive.com/mapserver-users@lists.osgeo.org/msg10695.html


Alex

On Wed, Nov 3, 2010 at 8:44 AM, leene <leene_85 at yahoo.de> wrote:
> Hey,
> I have a problem with filtering elements of multiple layers.
> My mapserver (version 5.2.1) is configured with two layers - layer1 and
> layer2. For better understanding see attachment: layer1 has black crosses
> and layer2 has red points. Now I try to get features by id - but I don't
> know the corresponding layer. Therefore I send the following request:
>
> http://my-server/fcgi-bin/mapserv?map=mymap.map&service=WFS&version=1.1.0&request=GetFeature&typename=layer1,layer2&filter=
> <Filter><OR>
> <PropertyIsEqualTo><PropertyName>ID</PropertyName><Literal>idAofLayer1</Literal></PropertyIsEqualTo>
> <PropertyIsEqualTo><PropertyName>ID</PropertyName><Literal>idBofLayer1</Literal></PropertyIsEqualTo>
> <PropertyIsEqualTo><PropertyName>ID</PropertyName><Literal>idCofLayer2</Literal></PropertyIsEqualTo>
> </OR></Filter>
>
> In the response are some features missing but they exist in the shapefile. I
> found out following rules:
> 1. All features of layer2 (red points in attachment) are returned correctly.
> 2. Features of layer1 (black crosses) which are inside the blue frame are
> also returned correctly.
> 3. Features of layer1 which are outside the blue frame (bounds of layer2)
> are missing - if I filter the missing elements only on layer1 I get the
> features.
>
> Is this a bug or where is my mistake?
>
> Regards,
> Cathleen
>
> By the way: Is there a date of mapserver 6 release?
> http://trac.osgeo.org/mapserver/wiki/60ReleasePlan doesn't seem to be up to
> date.
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>


More information about the mapserver-users mailing list