<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    Brent,<br>
    <br>
    &nbsp; I did something similar a while ago.&nbsp; I connected to an aspatial
    SQL Server instance using an OGR VRT definition pointing to an ODBC
    datasource:<br>
    <br>
    <br>
    &nbsp;&nbsp;&nbsp; TYPE POINT<br>
    &nbsp;&nbsp;&nbsp; CONNECTIONTYPE OGR<br>
    &nbsp;&nbsp;&nbsp; CONNECTION "&lt;OGRVRTDataSource&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;OGRVRTLayer name='mypoints'&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;SrcDataSource&gt;ODBC:myuser/mypass@MyODBC,view_of_points&lt;/SrcDataSource&gt;<br>
    &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;SrcSQL&gt;<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SELECT * FROM&nbsp; view_of_points<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; WHERE&nbsp; StatusID=%StatusID%<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/SrcSQL&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;FID&gt;PointID&lt;/FID&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;GeometryType&gt;wkbPoint&lt;/GeometryType&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;GeometryField encoding='PointFromColumns'
    y='MyLatitude'&nbsp; x='MyLongitude'/&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;LayerSRS&gt;NAD83&lt;/LayerSRS&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/OGRVRTLayer&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/OGRVRTDataSource&gt;"<br>
    <br>
    &nbsp;&nbsp;&nbsp; PROCESSING "CLOSE_CONNECTION=DEFER"<br>
    <br>
    &nbsp;&nbsp;&nbsp; DATA "view_of_points"<br>
    <br>
    &nbsp;&nbsp;&nbsp; PROJECTION<br>
    &nbsp;&nbsp;&nbsp; 'proj=longlat'<br>
    &nbsp;&nbsp;&nbsp; 'ellps=GRS80'<br>
    &nbsp;&nbsp;&nbsp; 'datum=NAD83'<br>
    &nbsp;&nbsp;&nbsp; 'no_defs'<br>
    &nbsp;&nbsp;&nbsp; END<br>
    <br>
    Note that StatusId was passed as a CGI variable.<br>
    <br>
    <pre class="moz-signature" cols="72">Best Regards,
Brent Fraser</pre>
    <br>
    On 2/15/2011 4:36 PM, <a class="moz-txt-link-abbreviated" href="mailto:pcreso@pcreso.com">pcreso@pcreso.com</a> wrote:
    <blockquote cite="mid:123542.78049.qm@web33202.mail.mud.yahoo.com"
      type="cite">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody>
          <tr>
            <td style="font: inherit;" valign="top">Hi,<br>
              <br>
              I'm looking to set up a mapfile with an inline ovf data
              source as described in part 2 of section 5 at <span
                style="color: rgb(0, 0, 255);"><a class="moz-txt-link-freetext" href="http://mapserver.org/input/vector/VirtualSpatialData.html">http://mapserver.org/input/vector/VirtualSpatialData.html</a></span><br>
              <span style="text-decoration: underline;"></span><br>
              I'm also looking to embed an SQL in the ovf with a where
              clause, using runtime variable substitution as described
              at <span style="color: rgb(0, 0, 255);"><a class="moz-txt-link-freetext" href="http://mapserver.org/cgi/runsub.html?highlight=variable">http://mapserver.org/cgi/runsub.html?highlight=variable</a></span><br>
              <br>
              The latter says that such runtime substitution is
              supported in the CONNECTION &amp; DATA fields within the
              LAYER object.<br>
              <br>
              I'm unclear as to how a where clause can be inserted in
              the ovf definition, and am hoping that this will be in the
              CONNECTION or DATA fields, and is amenable to runtime
              variable substitution.<br>
              <br>
              Basically with the URL
              including:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              &amp;job_id=23<br>
              have an ovf where clause specified like: &nbsp;&nbsp;&nbsp;&nbsp;
              ...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where job=%job_id%<br>
              <br>
              &nbsp;thus from this<br>
              <br>
              have an ovf ODBC connection pass a where clause like: &nbsp;
              and job_id=23 ..." <br>
              <br>
              This is connecting to an aspatial Oracle database
              returning up to 100 point features from a table with X Y
              columns..<br>
              <br>
              Can anyone provide some hints on:<br>
              <br>
              1. Is this possible?<br>
              2. How best to implement it?<br>
              <br>
              <br>
              Thanks,<br>
              <br>
              &nbsp;&nbsp; Brent Wood<br>
              <br>
              <br>
            </td>
          </tr>
        </tbody>
      </table>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
    </blockquote>
  </body>
</html>