<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px">
<DIV>Is it possible to send a value for the where condition to Mapserver via a variable added to the end of a WMS call? Mapserver would then put this variable value into the FILTER statement for the OGR connection.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Many thanks,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert Sanson</DIV>
<DIV>&nbsp;</DIV>
<DIV>Robert Sanson, BVSc, MACVSc, PhD<BR>Geospatial Services<BR>AsureQuality Limited<BR>PO Box 585, Palmerston North<BR>NEW ZEALAND<BR><BR>Phone: +64 6 351-7990<BR>Fax: +64 6 351-7919<BR>Mobile: 021 448-472<BR>E-mail: sansonr@asurequality.com<BR><BR>&gt;&gt;&gt; Frank Warmerdam &lt;warmerdam@pobox.com&gt; 29/05/2008 10:55 p.m. &gt;&gt;&gt;<BR>Gabriela Messner wrote:<BR>&gt; Hi all,<BR>&gt; <BR>&gt; I?m do not how to use de SQL SELECT statement to select several values <BR>&gt; in a OGR connection to a DGN file with a layer named 'level'. For this <BR>&gt; layer, i?d like to select the values '1,3,5'. The object LAYER is posted <BR>&gt; below.<BR>&gt; <BR>&gt; Thanks in advanced.<BR>&gt; <BR>&gt; LAYER<BR>&gt; NAME sheet5000<BR>&gt; STATUS ON<BR>&gt; TYPE line<BR>&gt; CONNECTIONTYPE OGR<BR>&gt; CONNECTION "D:\sheet5000.DGN"<BR>&gt; #how do i use the SQL SELECT statement?<BR>&gt; DATA "level=1,5,7"<BR><BR>Gabriela,<BR><BR>I would suggest trying:<BR><BR>CONNECTIONTYPE OGR<BR>CONNECTION "D:\sheet5000.DGN"<BR>DATA "elements"<BR>FILTER "WHERE level in (1,5,7)"<BR><BR>With CONNECTIONTYPE OGR you can prefix your FILTER with the keyword<BR>WHERE and the rest will be passed through to OGR as an SQL style<BR>attribute filter.<BR><BR>In DGN files there is only one layer, named elements, so we provide that<BR>in the DATA statement.<BR><BR>Best regards,<BR>-- <BR>---------------------------------------+--------------------------------------<BR>I set the clouds in motion - turn up&nbsp;&nbsp; | Frank Warmerdam, warmerdam@pobox.com<BR>light and sound - activate the windows | <A href="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam</A><BR>and watch the world go round - Rush&nbsp;&nbsp;&nbsp; | President OSGeo, <A href="http://osgeo.org">http://osgeo.org</A><BR><BR>_______________________________________________<BR>mapserver-users mailing list<BR>mapserver-users@lists.osgeo.org<BR><A href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</A>-users<BR><BR></DIV><br><br><table bgcolor=white style="color:black"><tr><td><br>------------------------------------------------------------------<br>
The&nbsp;contents&nbsp;of&nbsp;this&nbsp;email&nbsp;are&nbsp;confidential&nbsp;to&nbsp;AsureQuality.&nbsp;If&nbsp;you&nbsp;have&nbsp;received&nbsp;this&nbsp;communication&nbsp;in&nbsp;error&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;immediately&nbsp;and&nbsp;delete&nbsp;the&nbsp;message&nbsp;and&nbsp;any&nbsp;attachments.&nbsp;The&nbsp;opinions&nbsp;expressed&nbsp;in&nbsp;this&nbsp;email&nbsp;are&nbsp;not&nbsp;necessarily&nbsp;those&nbsp;of&nbsp;AsureQuality.&nbsp;This&nbsp;message&nbsp;has&nbsp;been&nbsp;scanned&nbsp;for&nbsp;known&nbsp;viruses&nbsp;before&nbsp;delivery.&nbsp;AsureQuality&nbsp;supports&nbsp;the&nbsp;Unsolicited&nbsp;Electronic&nbsp;Messages&nbsp;Act&nbsp;2007.&nbsp;If&nbsp;you&nbsp;do&nbsp;not&nbsp;wish&nbsp;to&nbsp;receive&nbsp;similar&nbsp;communications&nbsp;in&nbsp;future,&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender&nbsp;of&nbsp;this&nbsp;message.<br>
------------------------------------------------------------------</td></tr></table><br><br>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff">This message has been scanned for malware by SurfControl plc.  </FONT><A href="http://www.surfcontrol.com/"><FONT style="BACKGROUND-COLOR: #ffffff" color=#000000>www.surfcontrol.com</FONT></A></P>
</body></HTML>