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. <<a href="mailto:pianosnake@gmail.com">pianosnake@gmail.com</a>>:<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. You can see<br>
what it is by selecting this sql in pgadmin: "select srid(the_geom)<br>
from cities) . Use the number you get here in the mapserver layer<br>
definition and in the projection definition as well. If you loaded<br>
the cities with shp2pgsql then you should automatically have a gid<br>
field on the cities table. And your cities table should have a<br>
population field the type of which should be some kind of number.<br>
<br>
<br>
LAYER<br>
METADATA<br>
"wms_title" "Cities layer"<br>
END<br>
NAME "cities"<br>
TRANSPARENCY 100<br>
CONNECTIONTYPE postgis<br>
CONNECTION "host=??? user=??? dbname=??? password='???'"<br>
DATA "the_geom from cities using srid=??? USING UNIQUE gid"<br>
TYPE POLYGON<br>
<br>
CLASS<br>
NAME "Small cities"<br>
EXPRESSION ( [population] <50000)<br>
COLOR 0 255 0<br>
END<br>
<br>
CLASS<br>
NAME "Medium cities"<br>
EXPRESSION ([population] >50000 AND [population] <1500000 )<br>
COLOR 255 255 0<br>
END<br>
<br>
CLASS<br>
NAME "Big cities"<br>
EXPRESSION ([population] > 1500000 )<br>
COLOR 255 0 0<br>
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