<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Comic Sans MS";
panose-1:3 15 7 2 3 3 2 2 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Trebuchet MS";
panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
p
{margin-right:0cm;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{font-family:Arial;
color:navy;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I received this note from the list
recently, regarding updates to the OGR/VRT drivers. I was asking about ways to
query the OGR layer other than the dynamic SLD I’m using now, to reduce
database overhead.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'>“I know Frank added
this capability very recently for the VRT driver, so it probably depends on
which version of GDAL/OGR you use (you need 1.3 probably). This is the bug
report:</span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> </span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'><a
href="http://bugzilla.remotesensing.org/show_bug.cgi?id=900">http://bugzilla.remotesensing.org/show_bug.cgi?id=900</a></span></font></p>
<p class=MsoNormal style='text-autospace:none'><font size=2 face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New"'> </span></font></p>
<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>I use WFS on MySQL Virtual Spatial Data, and
Mapserver sets a FILTER on the OGR VRT LAYER, and OGR adds that to the WHERE
CLAUSE which it sends to the database. You could use the same approach, setting
a dynamic FILTER.”</span></font></p>
<div>
<p><font size=3 color=navy face="Comic Sans MS"><span style='font-size:12.0pt;
font-family:"Comic Sans MS";color:navy'>Timothy Pascoe</span></font><font
color=navy><span style='color:navy'> <br>
<br>
</span></font><font size=2 color=purple face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:purple'>Environment </span></font><font
size=2 color=purple face=Verdana><span style='font-size:10.0pt;font-family:
Verdana;color:purple'>Canada</span></font><font size=2 color=purple
face=Verdana><span style='font-size:10.0pt;font-family:Verdana;color:purple'> /
Environnement </span></font><font size=2 color=purple face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:purple'>Canada</span></font><font
size=2 color=purple face=Verdana><span style='font-size:10.0pt;font-family:
Verdana;color:purple'><br>
</span></font><font size=2 color=purple face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:purple'>Canada</span></font><font size=2
color=purple face=Verdana><span style='font-size:10.0pt;font-family:Verdana;
color:purple'> Centre for Inland Waters / Centre Canadien des Eaux Intérieures<br>
</span></font><font size=2 color=purple face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:purple'>867 Lakeshore Road</span></font><font
size=2 color=purple face=Verdana><span style='font-size:10.0pt;font-family:
Verdana;color:purple'> / 867, chemin Lakeshore<br>
</span></font><font size=2 color=purple face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:purple'>Burlington</span></font><font
size=2 color=purple face=Verdana><span style='font-size:10.0pt;font-family:
Verdana;color:purple'>, </span></font><font size=2 color=purple face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:purple'>Ontario</span></font><font
size=2 color=purple face=Verdana><span style='font-size:10.0pt;font-family:
Verdana;color:purple'> / </span></font><font size=2 color=purple face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:purple'>Burlington</span></font><font
size=2 color=purple face=Verdana><span style='font-size:10.0pt;font-family:
Verdana;color:purple'> (</span></font><font size=2 color=purple face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:purple'>Ontario</span></font><font
size=2 color=purple face=Verdana><span style='font-size:10.0pt;font-family:
Verdana;color:purple'>)</span></font><font color=navy><span style='color:navy'>
<br>
</span></font><font size=2 color=purple face=Verdana><span style='font-size:
10.0pt;font-family:Verdana;color:purple'>L7R 4A6<br>
<br>
</span></font><font size=2 color=green face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS";color:green'>Tel/Tél: (905)
336-6239<br>
Fax/</span></font><font size=2 color=green face="Trebuchet MS"><span
lang=EN-CA style='font-size:10.0pt;font-family:"Trebuchet MS";color:green'>Téléc</span></font><font
size=2 color=green face="Trebuchet MS"><span style='font-size:10.0pt;
font-family:"Trebuchet MS";color:green'>: (905) 336-4699<br>
E-mail/C. élec: </span></font><font color=navy><span style='color:navy'><a
href="mailto:tim.pascoe@ec.gc.ca"><font size=2 face="Trebuchet MS"><span
style='font-size:10.0pt;font-family:"Trebuchet MS"'>tim.pascoe@ec.gc.ca</span></font></a><br>
</span></font><font size=2 color=navy face=Tahoma><span lang=EN-CA
style='font-size:10.0pt;font-family:Tahoma;color:navy'>Government of
Canada/Gouvernement du Canada</span></font><font color=navy><span
style='color:navy'> <br>
</span></font><i><font size=1 color=gray face="Comic Sans MS"><span
style='font-size:7.5pt;font-family:"Comic Sans MS";color:gray;font-style:italic'>This
e-mail represents the opinions and views solely held by its author and in no
manner may be considered as representing those of his/her employer.</span></font></i></p>
</div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> UMN MapServer Users List
[mailto:MAPSERVER-USERS@LISTS.UMN.EDU] <b><span style='font-weight:bold'>On
Behalf Of </span></b>Matthew Edmondson<br>
<b><span style='font-weight:bold'>Sent:</span></b> October 12, 2005 11:20 AM<br>
<b><span style='font-weight:bold'>To:</span></b> MAPSERVER-USERS@LISTS.UMN.EDU<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [UMN_MAPSERVER-USERS]
Query attribute</span></font></p>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>When using a OGR
Virtual File (often extension .ovf) file to connect to a database, you can
insert a SQL query and only pull certain data. I'm currently using a
similar set up using a MySQL database.</span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> OGR Virtual
Files are documented at:<br>
<a href="http://www.gdal.org/ogr/drv_vrt.html" target="_blank"
onclick="return top.js.OpenExtLink(window,event,this)">http://www.gdal.org/ogr/drv_vrt.html</a></span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Good Luck,</span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Matt<br>
<br>
<br>
</span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span class=gmailquote><font
size=3 face="Times New Roman"><span style='font-size:12.0pt'>On 10/12/05, <b><span
style='font-weight:bold'>Johan Hallgren</span></b> <<a
href="mailto:johan.e.hallgren@wmdata.se">johan.e.hallgren@wmdata.se</a>>
wrote:</span></font></span> </p>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Hello<br>
<br>
I have tried to find a way to query attribute in mapserver/mapscript. I<br>
have found the function queryByAttributes(). I miss some functions here. <br>
<br>
Is there ways to do regular "SELECT fld FROM tbl WHERE id = xy" with<br>
MapServer?<br>
Similar question, is queries with LIKE and IN is supported?<br>
I have found out that it's possible to use regular expression but only on <br>
shapefiles. What is possible if data is stored in a database?<br>
Is there some documentation that I have missed, where can it be found?<br>
<br>
Any assistance is welcome.<br>
<br>
Regards<br>
Johan</span></font></p>
</div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>
</div>
</body>
</html>