<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>WFS Getfeature returning incorrect features</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>
<P><FONT SIZE=2 FACE="Arial">Hello,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I have a mapserver (5.2.1) setup that is returning incorrect features from a WFS getfeature request. For example, if a bbox is specified: bbox=-100,50,-99,51, then some point features outside of bbox get returned. However, the overall bounding box of the features (in the gml:boundedBy element) looks right and is inside the bbox, but is not representative of the features that are returned (see below). Also, if I try different bboxes, it would appear that it's always taking the first N (which varies) features in the layer (sites.1, sites.2 always appear). </FONT></P>
<P><FONT SIZE=2 FACE="Arial">What is going on and how to fix? Has anyone else encountered this odd behaviour? The point features are stored in a database table (mssql to be specific) and connection is using OGR (through ODBC). Mapserver is running in Windows Server 2003 (64-bit).</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Thanks for any help.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">-Phil</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial"><?xml version='1.0' encoding="ISO-8859-1" ?></FONT>
<BR><FONT SIZE=2 FACE="Arial"><wfs:FeatureCollection</FONT>
<BR><FONT SIZE=2 FACE="Arial"> xmlns:ms="<A HREF="http://mapserver.gis.umn.edu/mapserver">http://mapserver.gis.umn.edu/mapserver</A>"</FONT>
<BR><FONT SIZE=2 FACE="Arial"> xmlns:wfs="<A HREF="http://www.opengis.net/wfs">http://www.opengis.net/wfs</A>"</FONT>
<BR><FONT SIZE=2 FACE="Arial"> xmlns:gml="<A HREF="http://www.opengis.net/gml">http://www.opengis.net/gml</A>"</FONT>
<BR><FONT SIZE=2 FACE="Arial"> xmlns:ogc="<A HREF="http://www.opengis.net/ogc">http://www.opengis.net/ogc</A>"</FONT>
<BR><FONT SIZE=2 FACE="Arial"> xmlns:xsi="<A HREF="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</A>"</FONT>
<BR><FONT SIZE=2 FACE="Arial"> xsi:schemaLocation="<A HREF="http://www.opengis.net/wfs">http://www.opengis.net/wfs</A> </FONT><A HREF="http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd</FONT></U></A><FONT SIZE=2 FACE="Arial"> </FONT>
<BR><FONT SIZE=2 FACE="Arial"> </FONT><A HREF="http://mapserver.gis.umn.edu/mapserver"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://mapserver.gis.umn.edu/mapserver</FONT></U></A><FONT SIZE=2 FACE="Arial"> </FONT><A HREF="http://ecburlwbidev/ms/mapserv.exe?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=sites&OUTPUTFORMAT=XMLSCHEMA"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://ecburlwbidev/ms/mapserv.exe?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=sites&OUTPUTFORMAT=XMLSCHEMA</FONT></U></A><FONT SIZE=2 FACE="Arial">"></FONT></P>
<P><FONT SIZE=2 FACE="Arial"> <gml:boundedBy></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:Box srsName="EPSG:4326"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:coordinates>-99.976390,50.190280 -99.675000,50.675000</gml:coordinates></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </gml:Box></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </gml:boundedBy></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:featureMember></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <ms:sites fid="sites.1"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:boundedBy></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:Box srsName="EPSG:4326"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:coordinates>-97.429440,49.679170 -97.429440,49.679170</gml:coordinates></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </gml:Box></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </gml:boundedBy></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <ms:msGeometry></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:Point srsName="EPSG:4326"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:coordinates>-97.429440,49.679170</gml:coordinates></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </gml:Point></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </ms:msGeometry></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </ms:sites></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </gml:featureMember></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:featureMember></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <ms:sites fid="sites.2"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:boundedBy></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:Box srsName="EPSG:4326"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:coordinates>-97.261670,49.696670 -97.261670,49.696670</gml:coordinates></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </gml:Box></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </gml:boundedBy></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <ms:msGeometry></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:Point srsName="EPSG:4326"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> <gml:coordinates>-97.261670,49.696670</gml:coordinates></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </gml:Point></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </ms:msGeometry></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </ms:sites></FONT>
<BR><FONT SIZE=2 FACE="Arial"> </gml:featureMember></FONT>
</P>
<BR>
<BR>
<BR>
</BODY>
</HTML>