<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:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:D="DAV:" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:Z="urn:schemas-microsoft-com:" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</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 bgcolor=white lang=EN-CA link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>This looks like it will work well. One limitation to keep
in mind when performing this secondary spatial filtering in the client is that
all of the other query criteria have already been met. Thus, the spatial
filter criterion can only be interpreted as “And” with the other
criteria. E.g. “where inside some_polygon AND parcel_owner = ‘Bob’”.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>FdoIGeometry objects have an internal pool, so it won’t
really create a new one on the heap every time. Holding onto it will save
a very small cost to find it in the pool though.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Gavin<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'>From:</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>
fdo-internals-bounces@lists.osgeo.org
[mailto:fdo-internals-bounces@lists.osgeo.org] <b>On Behalf Of </b>Traian
Stanev<br>
<b>Sent:</b> Monday, May 12, 2008 10:18 AM<br>
<b>To:</b> FDO Internals Mail List<br>
<b>Subject:</b> RE: [fdo-internals] OGR provider and intersection<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>That looks right. The place to put it would be in ReadNext() and
check features returned by OGR (which match the BBOX) for true intersection.
Also, for performance, it’s good to cache the right hand side
FdoIGeometry so that it is not created every time.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Traian<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'>From:</span></b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>
fdo-internals-bounces@lists.osgeo.org
[mailto:fdo-internals-bounces@lists.osgeo.org] <b>On Behalf Of </b>Kenneth
Skovhede, GEOGRAF A/S<br>
<b>Sent:</b> Monday, May 12, 2008 9:35 AM<br>
<b>To:</b> FDO Internals Mail List<br>
<b>Subject:</b> Re: [fdo-internals] OGR provider and intersection<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US>Ok, I'll try
that.<br>
<br>
I found some code you suggested some time ago, for testing intersection using
FDO:<br>
<br>
int fgfLen = "the length of the feature geometry
array in bytes";<br>
const FdoByte* fgf = "the feature geometry,
converted to FGF";<br>
<br>
FdoPtr<FdoExpression> exprRight =
filter.GetGeometry();<br>
FdoGeometryValue* gvRight =
(FdoGeometryValue*)(exprRight.p);<br>
<br>
FdoPtr<FdoByteArray> baRight =
gvRight->GetGeometry();<br>
<br>
FdoPtr<FdoFgfGeometryFactory> gf =
FdoFgfGeometryFactory::GetInstance();<br>
FdoPtr<FdoIGeometry> geomRight =
gf->CreateGeometryFromFgf(baRight);<br>
FdoPtr<FdoIGeometry> geomLeft =
gf->CreateGeometryFromFgf(fgf, fgfLen);<br>
<br>
//call on the geometry utility to evaluate the spatial
operation<br>
bool ret = FdoSpatialUtility::Evaluate(geomLeft,
filter.GetOperation(), geomRight);<br>
<br>
Does that still look plausible? <br>
If so, I'll try to patch the provider once I get a VS 2005 machine up.<o:p></o:p></span></p>
<pre><span lang=EN-US>Regards, Kenneth Skovhede, GEOGRAF A/S<o:p></o:p></span></pre>
<p class=MsoNormal><span lang=EN-US><br>
<br>
Traian Stanev skrev: <o:p></o:p></span></p>
<pre><span lang=EN-US>It's not the provider, it's the GDAL dll. You can drop in a GDAL dll that is compiled with GEOS and it should then work. Another alternative is to make it use the FdoSpatialUtility implementation of Intersects, which presumably is always available when FDO is there.<o:p></o:p></span></pre><pre><span
lang=EN-US><o:p> </o:p></span></pre><pre><span lang=EN-US>Traian<o:p></o:p></span></pre><pre><span
lang=EN-US><o:p> </o:p></span></pre><pre><span lang=EN-US><o:p> </o:p></span></pre><pre><span
lang=EN-US><o:p> </o:p></span></pre><pre><span lang=EN-US> <o:p></o:p></span></pre>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre><span lang=EN-US>-----Original Message-----<o:p></o:p></span></pre><pre><span
lang=EN-US>From: <a href="mailto:fdo-internals-bounces@lists.osgeo.org">fdo-internals-bounces@lists.osgeo.org</a> [<a
href="mailto:fdo-internals">mailto:fdo-internals</a>-<o:p></o:p></span></pre><pre><span
lang=EN-US><a href="mailto:bounces@lists.osgeo.org">bounces@lists.osgeo.org</a>] On Behalf Of Kenneth Skovhede, GEOGRAF A/S<o:p></o:p></span></pre><pre><span
lang=EN-US>Sent: Monday, May 12, 2008 6:21 AM<o:p></o:p></span></pre><pre><span
lang=EN-US>To: FDO Internals Mail List<o:p></o:p></span></pre><pre><span
lang=EN-US>Subject: [fdo-internals] OGR provider and intersection<o:p></o:p></span></pre><pre><span
lang=EN-US><o:p> </o:p></span></pre><pre><span lang=EN-US>I have used the 3.3.1 release of the SDK (from April).<o:p></o:p></span></pre><pre><span
lang=EN-US>It seems the OGR provider is back to using Envelope intersection tests,<o:p></o:p></span></pre><pre><span
lang=EN-US>when "INTERSECTS" is used.<o:p></o:p></span></pre><pre><span
lang=EN-US>Is the provider compiled without GEOS support?<o:p></o:p></span></pre><pre><span
lang=EN-US>If so, are there plans to change the build procedure to include GEOS<o:p></o:p></span></pre><pre><span
lang=EN-US>support?<o:p></o:p></span></pre><pre><span lang=EN-US><o:p> </o:p></span></pre><pre><span
lang=EN-US>--<o:p></o:p></span></pre><pre><span lang=EN-US>Regards, Kenneth Skovhede, GEOGRAF A/S<o:p></o:p></span></pre><pre><span
lang=EN-US><o:p> </o:p></span></pre><pre><span lang=EN-US><o:p> </o:p></span></pre><pre><span
lang=EN-US>_______________________________________________<o:p></o:p></span></pre><pre><span
lang=EN-US>fdo-internals mailing list<o:p></o:p></span></pre><pre><span
lang=EN-US><a href="mailto:fdo-internals@lists.osgeo.org">fdo-internals@lists.osgeo.org</a><o:p></o:p></span></pre><pre><span
lang=EN-US><a href="http://lists.osgeo.org/mailman/listinfo/fdo-internals">http://lists.osgeo.org/mailman/listinfo/fdo-internals</a><o:p></o:p></span></pre><pre><span
lang=EN-US> <o:p></o:p></span></pre></blockquote>
<pre><span lang=EN-US>_______________________________________________<o:p></o:p></span></pre><pre><span
lang=EN-US>fdo-internals mailing list<o:p></o:p></span></pre><pre><span
lang=EN-US><a href="mailto:fdo-internals@lists.osgeo.org">fdo-internals@lists.osgeo.org</a><o:p></o:p></span></pre><pre><span
lang=EN-US><a href="http://lists.osgeo.org/mailman/listinfo/fdo-internals">http://lists.osgeo.org/mailman/listinfo/fdo-internals</a><o:p></o:p></span></pre><pre><span
lang=EN-US> <o:p></o:p></span></pre></div>
</div>
</body>
</html>