<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="GENERATOR" content="MSHTML 8.00.6001.19120">
</head>
<body>
<div><font size="2" face="Arial"><span class="361554506-12102011">Hi,</span></font></div>
<div><font size="2" face="Arial"><span class="361554506-12102011"></span></font> </div>
<div><font size="2" face="Arial"><span class="361554506-12102011">I managed to make the BBOX filter to work. My original troubles came probably from a combination of two client errors. First one is that it creates a "Bbox" filter which does not exist. It
is "BBOX" instead. Another client error was to build the filter with polygon geometry even only envelope is accepted. This belief is based on these e</span></font><font size="2" face="Arial"><span class="361554506-12102011">xcerpts from Filter Encoding 1.1
standard</span></font></div>
<div><font size="2" face="Arial"><span class="361554506-12102011"></span></font> </div>
<div><font face="Arial"><font size="2"><span class="361554506-12102011">"</span> The <BBOX> element is defined as a convenient and more compact way of encoding the very common bounding box constraint based on the gml:Envelope geometry. It is equivalent to the
spatial operation <Not><Disjoint> … </Disjoint></Not> meaning that the <BBOX> operator should identify all geometries that spatially interact with the box. If the optional <propertyName> element is not specified, the calling service must determine which spatial
property is the spatial key and apply the BBOX operator accordingly. <span class="361554506-12102011">"</span></font></font></div>
<div><font face="Arial"><font size="2"><span class="361554506-12102011"></span></font></font> </div>
<div><font face="Arial"><font size="2"><span class="361554506-12102011"><xsd:complexType name="BBOXType"><br>
<xsd:complexContent><br>
<xsd:extension base="ogc:SpatialOpsType"><br>
<xsd:sequence><br>
<xsd:element ref="ogc:PropertyName" minOccurs="0"/><br>
<xsd:element ref="gml:Envelope"/><br>
</xsd:sequence><br>
</xsd:extension><br>
</xsd:complexContent><br>
</xsd:complexType></span></font></font></div>
<div><font face="Arial"><font size="2"><span class="361554506-12102011"></span></font></font> </div>
<div><font face="Arial"><font size="2"><span class="361554506-12102011">An interesting additional point is that the geometry property name is optional with BBOX.</span></font></font></div>
<div><font face="Arial"><font size="2"><span class="361554506-12102011"></span></font></font> </div>
<div><font size="2" face="Arial"><span class="361554506-12102011">But I am still puzzled. Now I have both Intersects and BBOX filter which are returning me results from the "france" layer but those filters seem to require different x-y coordinate order.</span></font></div>
<div><font size="2" face="Arial"><span class="361554506-12102011"></span></font> </div>
<div><font size="2" face="Arial"><span class="361554506-12102011">This Intersects sends features with Easting-Northing order</span></font></div>
<div><font size="2" face="Arial"><span class="361554506-12102011"></span></font> </div>
<div><font size="2" face="Arial"><span class="361554506-12102011"><wfs:GetFeature xmlns:ogc="<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>"
<br>
xmlns:gml="<a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>" xmlns:wfs="<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a>"
<br>
service="WFS" version="1.1.0" maxFeatures="1000" outputFormat="text/xml; subtype=gml/3.1.1"><br>
<wfs:Query xmlns:tows="<a href="http://www.tinyows.org/">http://www.tinyows.org/</a>"
<br>
srsName="urn:ogc:def:crs:EPSG::27582" typeName="tows:france"><br>
<wfs:PropertyName>tows:the_geom</wfs:PropertyName><br>
<ogc:Filter><ogc:Intersects><ogc:PropertyName>tows:the_geom</ogc:PropertyName><br>
<gml:Surface srsName='urn:ogc:def:crs:EPSG::27582'><br>
<gml:patches><br>
<gml:PolygonPatch><br>
<gml:exterior><gml:LinearRing><gml:posList srsDimension='2' count='5'>500117.5483503982 2150739.771331058 500117.5483503982 2315484.2195676905 658849.4254835041 2315484.2195676905 658849.4254835041 2150739.771331058 500117.5483503982 2150739.771331058</gml:posList></gml:LinearRing></gml:exterior></gml:PolygonPatch><br>
</gml:patches><br>
</gml:Surface><br>
</ogc:Intersects></ogc:Filter></wfs:Query></wfs:GetFeature></span></font></div>
<div><font size="2" face="Arial"><span class="361554506-12102011"></span></font> </div>
<div><font size="2" face="Arial"><span class="361554506-12102011">With BBOX I must use Northing-Easting instead</span></font></div>
<div><font size="2" face="Arial"><span class="361554506-12102011"></span></font> </div>
<div><font size="2" face="Arial"><span class="361554506-12102011"><wfs:GetFeature xmlns:ogc="<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>"
<br>
xmlns:gml="<a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>" xmlns:wfs="<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a>"
<br>
service="WFS" version="1.1.0" maxFeatures="1000" outputFormat="text/xml; subtype=gml/3.1.1"><br>
<wfs:Query xmlns:tows="<a href="http://www.tinyows.org/">http://www.tinyows.org/</a>"
<br>
srsName="urn:ogc:def:crs:EPSG::27582" typeName="tows:france"><br>
<wfs:PropertyName>tows:the_geom</wfs:PropertyName><br>
<ogc:Filter><ogc:BBOX><ogc:PropertyName>tows:the_geom</ogc:PropertyName><br>
<gml:Envelope srsName='urn:ogc:def:crs:EPSG::27582'><br>
<gml:lowerCorner>2150739 500117</gml:lowerCorner><br>
<gml:upperCorner>2315484 658850</gml:upperCorner><br>
</gml:Envelope><br>
</ogc:BBOX></ogc:Filter></wfs:Query></wfs:GetFeature></span></font></div>
<div><font size="2" face="Arial"><span class="361554506-12102011"></span></font> </div>
<div><font size="2" face="Arial"><span class="361554506-12102011">Obviously there is something wrong with BBOX because EPSG:27582 (which does not exist any more but is renamed to 27572?) is an Easting-Northing system.</span></font></div>
<div><font size="2" face="Arial"><span class="361554506-12102011">Filters can be tested by sending them with POST into
<a href="http://188.64.1.61/cgi-bin/tinyows">http://188.64.1.61/cgi-bin/tinyows</a></span></font></div>
<div><font size="2" face="Arial"><span class="361554506-12102011"></span></font><font size="2" face="Arial"><span class="361554506-12102011"></span></font> </div>
<div><font size="2" face="Arial"><span class="361554506-12102011">-Jukka Rahkonen-</span></font></div>
</body>
</html>