[OpenLayers-Users] Creating an ogc:Filter combining ogc:BBOX and others

dalsinao dalsinao at yahoo.es
Thu Apr 23 12:55:13 EDT 2009


Your interpretation is correct, it shouldn't affect me...
It affects me though because I use a limited self-developed WFS server,
which up to now has only been serving to OL clients; so some time ago when I
needed to add some extra filtering I had to tailor it to support Filter and
BBOX together, even though it is not allowed by the specification (what I
actually do is in the server side to take the BBOX, generate an ogc:BBOX out
of it and combine it with the Filter parameter to produce an ogc:Filter like
the one I put below).

We chose WFS because we expect to be serving features to other WFS compliant
clients, but up to now only OL.

Thanks for the fast reply.
Cheers,
David


Christopher Schmidt-2 wrote:
> 
> On Thu, Apr 23, 2009 at 09:08:02AM -0700, dalsinao wrote:
>> 
>> Hello,
>> 
>> I have seen that there are some changes in the WFS protocol coming in the
>> next release.
>> One that particularly affects me is that now the BBOX parameter is not
>> always added in the WFS requests as before. That's fine, but now I have a
>> related question.
> 
> I'm curious how this affects you. I'm assuming you're currently using
> the Layer.WFS code, and you're speaking of the change that causes the
> WFS layer to not send the bbox when there is a 'filter' in the
> paramters. Since no existing server that I'm aware of supported both
> 'filter' and 'bbox' -- because the spec says you shouldn't, as I
> understand it -- I don't know how this could cause things that were
> working before to stop working. Can you explain this?
> 
>> If you have your own ogc:filter and you want to combine it with BBOX, how
>> can you do it?
> 
> "Use the WFS Protocol, instead of Layer.WFS." Someone who is more
> fmailiar with the WFS Protocol can probably give you more help here.
> 
>> I would like to combine my ogc:filter (static) with the dynamically
>> generated ogc:BBOX filter (changing according to the viewport I
>> understand). 
>> 
>> Is it possible to do so? and if so, how? 
>> 
>> I have seen the example in wfs-protocol.html, using "strategies" and
>> "protocol", which at the end produces an HTTP/POST request having an
>> ogc:filter like the one (for WFS 1.1.0):
>> 
>> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
>>     <ogc:BBOX>
>>         <ogc:PropertyName>the_geom</ogc:PropertyName>
>>         <gml:Envelope xmlns:gml="http://www.opengis.net/gml"
>> srsName="EPSG:4326">
>>             <gml:lowerCorner>-37.4060546875
>> 15.1189453125</gml:lowerCorner>
>>             <gml:upperCorner>-14.9939453125
>> 26.2810546875</gml:upperCorner>
>>         </gml:Envelope>
>>     </ogc:BBOX>
>> </ogc:Filter>
>> 
>> What I would like to do is to combine this ogc:filter with mine to get
>> e.g
>> something like this:
>> 
>> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
>>     <ogc:And>
>>         <ogc:BBOX>
>>             <ogc:PropertyName>the_geom</ogc:PropertyName>
>>             <gml:Envelope xmlns:gml="http://www.opengis.net/gml"
>> srsName="EPSG:4326">
>>                 <gml:lowerCorner>-37.4060546875
>> 15.1189453125</gml:lowerCorner>
>>                 <gml:upperCorner>-14.9939453125
>> 26.2810546875</gml:upperCorner>
>>             </gml:Envelope>
>>         </ogc:BBOX>
>>         <ogc:PropertyIsEqualTo>
>>             <ogc:PropertyName>Scenario</ogc:PropertyName>
>>             <ogc:Literal>Demo</
>>             ogc:Literal>
>>         </ogc:PropertyIsEqualTo>
>>     </ogc:And>
>> </ogc:Filter>
>> 
>> 
>> And parallel to this. Is it the intention in the long term to get rid of
>> the
>> OpenLayers.Layer.WFS layer and use only the OpenLayers.Layer.Vector?
> 
> Yes.
> 
> Regards,
> -- 
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Creating-an-ogc%3AFilter-combining-ogc%3ABBOX-and-others-tp2684197p2684502.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list