<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>

<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>[UMN_MAPSERVER-USERS] Mutiple &quot;DATA&quot; lines in a single layer?</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText69176 dir=ltr>
<DIV dir=ltr><FONT face=Verdana color=#000000 size=2>as Stephen said, there is 
only ONE data statement per layer. But, if you use mapscript, you can change it 
dynamically depending on the scale for example</FONT></DIV>
<DIV dir=ltr><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Verdana color=#000000 size=2></FONT>&nbsp;</DIV></DIV>
<DIV id=idSignature60065 dir=ltr>
<DIV><FONT face=Arial color=#000000 
size=2>---------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2>Guillaume SUEUR</FONT></DIV>
<DIV><FONT face=Arial size=2>Géosignal - Groupe BVA</FONT></DIV>
<DIV><FONT face=Arial size=2>25bis Avenue Marcel Dassault</FONT></DIV>
<DIV><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">BP 
95836</SPAN></DIV>
<DIV><FONT face=Arial size=2>31505 Toulouse CEDEX 05</FONT></DIV>
<DIV><FONT face=Arial size=2>Tél : 05 61 17 47 17</FONT></DIV>
<DIV><FONT face=Arial 
size=2>---------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>De:</B> UMN MapServer Users List de la part de Jeff 
Dege<BR><B>Date:</B> ven. 18/05/2007 20:32<BR><B>À:</B> 
MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Objet :</B> [UMN_MAPSERVER-USERS] Mutiple 
"DATA" lines in a single layer?<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>I'm starting to play around with using MapServer to serve maps 
from a<BR>PostGIS database.<BR><BR>One of the features that MapServer has is 
that you can define multiple<BR>classes within a single layer, so you can change 
the way that the map<BR>looks when drawn at different 
scales/resolutions.<BR><BR>Is there some way to define multiple data sources 
within a single layer,<BR>so that I can change how that data is obtained at 
different layers?<BR><BR>In particular, I'm wondering how to best take advantage 
of PostGIS's<BR>simplify() function - which can be used to reduce the number of 
points<BR>included in a geometry based on resolution.&nbsp; If I'm drawing a map 
at a<BR>resolution where one pixel equals 2000 meters on the ground, there is 
no<BR>advantage to sending the viewer a geometry defined with 
points<BR>twenty-five meters apart.<BR><BR>The obvious way is to define multiple 
layers, each enabled at certain<BR>scales, and to include the resulution 
appropriate for those scales in<BR>the DATA keyword's sql statement.&nbsp; But 
this requires that the layer be<BR>duplicated for each scale range.&nbsp; Is 
there a way to enable different<BR>DATA sql statements at different 
scales/resolutions in a single layer<BR>definition?<BR><BR>I don't see the DATA 
keyword in the documentation for the CLASS section.<BR>Which is where I'd expect 
it to be if I could do what I want.<BR><BR>Is there a way of including a value 
calculated from the scale in the SQL<BR>statement within the LAYER 
section?<BR><BR>&nbsp;&nbsp; DATA "simplify(the_geom, 1.0/&lt;scale&gt;) from 
streets"<BR><BR>Or am I stuck with using multiple 
layers?<BR><BR></FONT></P></DIV>

</BODY>
</HTML>