This thread may or may not help: <a href="http://osgeo-org.1803224.n2.nabble.com/WFS-intersect-request-td6458533.html">http://osgeo-org.1803224.n2.nabble.com/WFS-intersect-request-td6458533.html</a><div><br></div><div>I have not tried using AND compound filters. The following format does work for me using the BBOX filter. </div>
<div><br></div><div><span><ogc:BBOX></span><br><span><ogc:PropertyName>SHAPE</ogc:PropertyName></span><br><span><gml:Envelope xmlns:gml="</span><a href="http://www.opengis.net/gml" target="_top" rel="nofollow" link="external"><span>http://www.opengis.net/gml</span></a><span>" srsName="EPSG:26957"></span><br>
<span>
<gml:lowerCorner>149081.76574899518 163078.62572595105</gml:lowerCorner></span><br><span><gml:upperCorner>205627.85303800018 194899.95291598293</gml:upperCorner></span><br><span></gml:Envelope></span><br>
<span></ogc:BBOX></span><br><div><br></div><div>- John</div><div><br clear="all">***********************************<br>John Callahan, Research Scientist<br>Delaware Geological Survey<br>University of Delaware<br>URL: <a href="http://www.dgs.udel.edu" target="_blank">http://www.dgs.udel.edu</a><br>
*******************************<br>
<br><br><div class="gmail_quote">On Fri, Aug 5, 2011 at 7:02 AM, Bryan Hempen <span dir="ltr"><<a href="mailto:bhempen@sciops.esa.int">bhempen@sciops.esa.int</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>
<div text="#000000" bgcolor="#ffffff">
The problem: I am trying to implement something similar to <a href="http://openlayers.org/dev/examples/wfs-spatial-filter.html" target="_blank">http://openlayers.org/dev/examples/wfs-spatial-filter.html</a>
with my own data served by MapServer through a WFS. I just changed
some lines in the code to make it work with MapServer, so the code
is almost equal to the code in the example at the moment. So far
it's working fine UNTIL I drag the polygon to apply the spatial
filter! According to the getCapabitilies the server should be able
to handle the request:<br>
<br>
...<br>
<ogc:Spatial_Capabilities><br>
<ogc:Spatial_Operators><br>
<ogc:Equals/><br>
<ogc:Disjoint/><br>
<ogc:Touches/><br>
<ogc:Within/><br>
<ogc:Overlaps/><br>
<ogc:Crosses/><br>
<ogc:Intersect/><br>
<ogc:Contains/><br>
<ogc:DWithin/><br>
<ogc:BBOX/><br>
</ogc:Spatial_Operators><br>
</ogc:Spatial_Capabilities><br>
...<br>
<br>
Both WFS GetFeature requests are sent via HTTP POST. The first one
that works (called on page load) looks like this: <br>
<br>
<wfs:GetFeature xmlns:wfs=<a href="http://www.opengis.net/wfs" target="_blank">"http://www.opengis.net/wfs"</a>
xmlns:xsi="http ://<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">www.w3.org/2001/XMLSchema-instance</a>"
service="WFS" version="1.0.0"
xsi:schemaLocation=<a href="http://www.opengis.net/wfshttp://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" target="_blank">"http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"</a>><br>
<wfs:Query typeName="omega"><br>
<ogc:Filter xmlns:ogc=<a href="http://www%C2%A0.opengis.net/ogc" target="_blank">"http://www .opengis.net/ogc"</a>><br>
<ogc:BBOX><br>
<ogc:PropertyName>msGeometry</ogc:PropertyName><br>
<gml:Box xmlns:gml=<a href="http:%C2%A0//www.opengis.net/gml" target="_blank">"http: //www.opengis.net/gml"</a>
srsName="EPSG:4326"><br>
<gml:coordinates decimal="." cs="," ts="
">135.45,-47.425 157.95,-36.175</gml:coordinates><br>
</gml:Box><br>
</ogc:BBOX><br>
</ogc:Filter><br>
</wfs:Query><br>
</wfs:GetFeature><br>
<br>
The request not working looks like this:<br>
<br>
<wfs:GetFeature xmlns:wfs=<a href="http://www.opengis.net/wfs" target="_blank">"http://www.opengis.net/wfs"</a>
xmlns:xsi=<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">"http://www.w3.org/2001/XMLSchema-instance"</a> service="WFS"
version="1.0.0" xsi:schemaLocation=<a href="http://www.opengis.net/wfshttp://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" target="_blank">"http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"</a>><br>
<wfs:Query xmlns:ms=<a href="http://mapserver.gis.umn.edu/mapserver" target="_blank">"http://mapserver.gis.umn.edu/mapserver"</a>
typeName="ms:omega"><br>
<ogc:Filter xmlns:ogc=<a href="http://www.opengis.net/ogc" target="_blank">"http://www.opengis.net/ogc"</a>><br>
<ogc:And><br>
<ogc:Intersects><br>
<ogc:PropertyName>msGeometry</ogc:PropertyName><br>
<gml:Polygon xmlns:gml=<a href="http://www.opengis.net/gml" target="_blank">"http://www.opengis.net/gml"</a>
srsName="EPSG:4326"><br>
<gml:outerBoundaryIs><br>
<gml:LinearRing><br>
<gml:coordinates decimal="." cs="," ts="
">145.72880866081,-40.709423872828
145.83867194206,-42.752880904078 148.34355475456,-40.995068404078
145.72880866081,-40.709423872828</gml:coordinates><br>
</gml:LinearRing><br>
</gml:outerBoundaryIs><br>
</gml:Polygon><br>
</ogc:Intersects><br>
<ogc:BBOX><br>
<ogc:PropertyName>msGeometry</ogc:PropertyName><br>
<gml:Box xmlns:gml=<a href="http://www.opengis.net/gml" target="_blank">"http://www.opengis.net/gml"</a>
srsName="EPSG:4326"><br>
<gml:coordinates decimal="." cs="," ts="
">135.45,-47.40302734375
157.95,-36.<a href="tel:15302734375" value="+15302734375" target="_blank">15302734375</a></gml:coordinates><br>
</gml:Box><br>
</ogc:BBOX><br>
</ogc:And><br>
</ogc:Filter><br>
</wfs:Query><br>
</wfs:GetFeature><br>
<br>
Does anyone have an idea? Any help is appreciated, I am stuck. <br>
<br>
The setup:<br>
<ul>
<li>OS: Red Hat Enterprise Linux 5.4</li>
<li>PostgreSQL 8.2</li>
<li>PostGIS 1.3 <br>
</li>
<li>MapServer 5.6.5</li>
<li>OpenLayers, one of the latest versions. ProxyHost set and
working (calling the proxy.cgi shows OpenLayers website)</li>
</ul>
Kind regards,<br>
Bryan<br>
<pre>================================================================================================
This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure,
use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in
error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by
the sender.
Please consider the environment before printing this email.
=================================================================================================
</pre></div>
<br>_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br></blockquote></div><br></div></div>