Thank you very much Florin!<br><br>This code is very useful, is not exactly what I needs but gives me orientation about how to implement my mapfile.<br><br><br><br><div class="gmail_quote">2008/5/14 Florin A. &lt;<a href="mailto:pianosnake@gmail.com">pianosnake@gmail.com</a>&gt;:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
In your mapfile you define the layers and the colors. See example below.<br>
<br>
If you have an SRID (projection) for the layer use it. &nbsp;You can see<br>
what it is by &nbsp;selecting this sql &nbsp;in pgadmin: &nbsp;&quot;select srid(the_geom)<br>
from cities) &nbsp; . &nbsp;Use the number you get here in the mapserver layer<br>
definition and in the projection definition as well. &nbsp;If you loaded<br>
the cities with shp2pgsql then you should automatically have a gid<br>
field on the cities table. &nbsp; And &nbsp;your cities table should have a<br>
population field the type of which &nbsp;should be some kind of number.<br>
<br>
<br>
LAYER<br>
 &nbsp; &nbsp; &nbsp; &nbsp;METADATA<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;wms_title&quot; &nbsp;&quot;Cities layer&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;END<br>
 &nbsp; &nbsp; &nbsp; &nbsp;NAME &quot;cities&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;TRANSPARENCY 100<br>
 &nbsp; &nbsp; &nbsp; &nbsp;CONNECTIONTYPE postgis<br>
 &nbsp; &nbsp; &nbsp; &nbsp;CONNECTION &quot;host=??? user=??? &nbsp;dbname=??? &nbsp;password=&#39;???&#39;&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;DATA &quot;the_geom from cities using srid=??? &nbsp;USING UNIQUE gid&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;TYPE POLYGON<br>
<br>
 &nbsp; &nbsp; &nbsp; CLASS<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NAME &quot;Small cities&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EXPRESSION ( [population] &lt;50000)<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COLOR 0 255 0<br>
 &nbsp; &nbsp; &nbsp; &nbsp;END<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;CLASS<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NAME &quot;Medium cities&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EXPRESSION ([population] &gt;50000 AND [population] &lt;1500000 )<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COLOR 255 255 0<br>
 &nbsp; &nbsp; &nbsp; &nbsp;END<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;CLASS<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NAME &quot;Big cities&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;EXPRESSION ([population] &gt; 1500000 )<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;COLOR 255 0 0<br>
 &nbsp; &nbsp; &nbsp; &nbsp;END<br>
<br>
<br>
END<br>
<br>
Hope this helps,<br>
<font color="#888888">Florin<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Emilio