<!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.0.6618.4">
<TITLE>Strange OGR VRT Issue</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">I'm experimenting with placing my OVF file in line, in order to pass in some variables for a custom WHERE Statement. The first step I took was changing my OVF file to use the scrSQL tag with a very simple SQL statement, instead of the srcLayer tag. Both OVF files point to the same view, in the same database.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">New File:</FONT>

<BR><FONT SIZE=2 FACE="Arial">&lt;OGRVRTDataSource&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; &lt;OGRVRTLayer name=&quot;CABINPoints&quot;&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;SrcDataSource&gt;ODBC:****/****@CABIN&lt;/SrcDataSource&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;SrcSQL&gt;SELECT * FROM OGRPoints&lt;/SrcSQL&gt;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">&nbsp; &lt;FID&gt;sitedetailsid&lt;/FID&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;GeometryType&gt;wkbPoint&lt;/GeometryType&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;LayerSRS&gt;WGS84&lt;/LayerSRS&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; &lt;GeometryField encoding=&quot;PointFromColumns&quot; x=&quot;longitude&quot; y=&quot;latitude&quot;/&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; &lt;/OGRVRTLayer&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&lt;/OGRVRTDataSource&gt;</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Old FIle:</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&lt;OGRVRTDataSource&gt;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; &lt;OGRVRTLayer name=&quot;CABINPoints&quot;&gt;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;SrcDataSource&gt;ODBC:****/****@CABIN,OGRPoints&lt;/SrcDataSource&gt;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;SrcLayer&gt;OGRPoints&lt;/SrcLayer&gt;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">&nbsp; &lt;FID&gt;sitedetailsid&lt;/FID&gt;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;GeometryType&gt;wkbPoint&lt;/GeometryType&gt;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;LayerSRS&gt;WGS84&lt;/LayerSRS&gt;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; &lt;GeometryField encoding=&quot;PointFromColumns&quot; x=&quot;longitude&quot; y=&quot;latitude&quot;/&gt;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; &lt;/OGRVRTLayer&gt;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&lt;/OGRVRTDataSource&gt;</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">The problem is, the old OVF returns a proper image, while the new one returns a blank image. I ran the new file through OGRInfo and shp2ogr, and both behave properly.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">So&#8230;&#8230;..why am I getting a blank image with the scrSQL tag? I'm using the latest version of the MS4W file set, but running on IIS on Windows 2000. Any suggestions would be great - it's probably somthing very simple I'm missing :)</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Tim Pascoe</FONT>
</P>

</BODY>
</HTML>