Hi,
thank you Alex. I found the solution in the same thread, you've posted: 
http://www.mail-archive.com/[email protected]/msg10704.html

I must add the <BBOX> of the whole map to the filter and I'll get all matches.

Regards,
Cathleen





________________________________
Von: Alexander Petkov <[email protected]>
An: leene <[email protected]>
CC: [email protected]
Gesendet: Mittwoch, den 3. November 2010, 20:30:39 Uhr
Betreff: Re: [mapserver-users] Filter elements on multiple layers

Hmm, I just tested this--it seems that you'd always get features where
the envelopes for the results from each layer spatially intersect,
(i.e. anything within the blue rectangle of your image).

Alex

On Wed, Nov 3, 2010 at 11:37 AM, Alexander Petkov <[email protected]> wrote:
> 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/[email protected]/msg10695.html
>
>
> Alex
>
> On Wed, Nov 3, 2010 at 8:44 AM, leene <[email protected]> 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
>> [email protected]
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>


_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to