<!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>
I did something similar a while ago. I connected to an aspatial
SQL Server instance using an OGR VRT definition pointing to an ODBC
datasource:<br>
<br>
<br>
TYPE POINT<br>
CONNECTIONTYPE OGR<br>
CONNECTION "<OGRVRTDataSource><br>
<OGRVRTLayer name='mypoints'><br>
<SrcDataSource>ODBC:myuser/mypass@MyODBC,view_of_points</SrcDataSource><br>
<SrcSQL><br>
SELECT * FROM view_of_points<br>
WHERE StatusID=%StatusID%<br>
</SrcSQL><br>
<FID>PointID</FID><br>
<GeometryType>wkbPoint</GeometryType><br>
<GeometryField encoding='PointFromColumns'
y='MyLatitude' x='MyLongitude'/><br>
<LayerSRS>NAD83</LayerSRS><br>
</OGRVRTLayer><br>
</OGRVRTDataSource>"<br>
<br>
PROCESSING "CLOSE_CONNECTION=DEFER"<br>
<br>
DATA "view_of_points"<br>
<br>
PROJECTION<br>
'proj=longlat'<br>
'ellps=GRS80'<br>
'datum=NAD83'<br>
'no_defs'<br>
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 & 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:
&job_id=23<br>
have an ovf where clause specified like:
... where job=%job_id%<br>
<br>
thus from this<br>
<br>
have an ovf ODBC connection pass a where clause like:
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>
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>