<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.Shkpostityyli17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.Shkpostityyli18
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.Shkpostityyli19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Just a guess, but using units in filters is often poorly implemented. Have a try without units and by giving the distance in degrees.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Lähettäjä:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> mapserver-users-bounces@lists.osgeo.org [mailto:mapserver-users-bounces@lists.osgeo.org]
<b>Puolesta </b>Troy Day<br>
<b>Lähetetty:</b> 24. syyskuuta 2013 16:23<br>
<b>Vastaanottaja:</b> mapserver-users@lists.osgeo.org<br>
<b>Aihe:</b> Re: [mapserver-users] Submitting filter does not filter - returns all features<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I’m looking for advice on how to pass a GET request Filter through mapserver to an oracle spatial database connection. Although I have successfully implemented a BBOX filter, both DWithin and Intersects spatial filters
seem to be ignored during the query process because all features (up to MAXFEATURES) are returned. No errors are returned with debug set to 5.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Here is a sample URL:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="http://wfsd.visualapms.com/wfs.php?SERVICE=WFS&VERSION=1.1.0&REQUEST=getfeature&TYPENAME=parcels&SRSNAME=EPSG:4269&OUTPUTFORMAT=json&Filter=%3CFilter%3E%3CDWithin%3E%3CPropertyName%3ESHAPE%3C/PropertyName%3E%3Cgml:Point%3E%3Cgml:coordinates%3E-101.9378217465,36.758602636999996%3C/gml:coordinates%3E%3C/gml:Point%3E%3CDistance%20units=%27meters%27%3E200%3C/Distance%3E%3C/DWithin%3E%3C/Filter%3E&MAXFEATURES=300">http://wfsd.visualapms.com/wfs.php?SERVICE=WFS&VERSION=1.1.0&REQUEST=getfeature&TYPENAME=parcels&SRSNAME=EPSG:4269&OUTPUTFORMAT=json&Filter=%3CFilter%3E%3CDWithin%3E%3CPropertyName%3ESHAPE%3C/PropertyName%3E%3Cgml:Point%3E%3Cgml:coordinates%3E-101.9378217465,36.758602636999996%3C/gml:coordinates%3E%3C/gml:Point%3E%3CDistance%20units=%27meters%27%3E200%3C/Distance%3E%3C/DWithin%3E%3C/Filter%3E&MAXFEATURES=300</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Here is the filter part of that url in xml format:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">&Filter=<Filter><DWithin><PropertyName>SHAPE</PropertyName><gml:Point><gml:coordinates>-101.9378217465,36.758602636999996<gml:coordinates></gml:Point><Distance units=”meters”>200</Distance></DWithin></Filter><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">…and here is the layer definition within the map file I’m using:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> LAYER<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> NAME "parcels"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> METADATA<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "wfs_title" "Parcels"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "wfs_srs" "EPSG:4269"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "gml_include_items" "all"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "gml_featureid" "OBJECTID"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "wfs_enable_request" "*"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "wfs_getfeature_formatlist" "gml,json,geojson"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "gml_COUNTRY_ID_type" "Character"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "gml_STATE_ID_type" "Character"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "gml_COUNTY_ID_type" "Character"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "gml_PARCEL_ID_type" "Character"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> END<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> TYPE POLYGON<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> STATUS ON<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> EXTENT -180 -90 180 90<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> CONNECTIONTYPE oraclespatial<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> CONNECTION "SDE/3nz0rb4rr4g1n@ArcSDE"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> DATA "SHAPE FROM (select OBJECTID, COUNTRY_ID, STATE_ID, COUNTY_ID, PARCEL_ID, APP_USER_G, SHAPE from PARCEL) USING FILTER"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> PROJECTION<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> "init=epsg:4269"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> END<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> CLASS<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> NAME "Parcels"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> STYLE<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> COLOR 240 240 240<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> OUTLINECOLOR 0 0 0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> END<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> END<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> END<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Hoping others have gone down this rabbit hole…thanks for looking!<o:p></o:p></span></p>
</div>
</div>
</body>
</html>