[Mapserver-users] Line/Polygon Rendering

Dean Gadoury gadoury at dmsolutions.ca
Fri Aug 8 11:05:18 EDT 2003


This is a multi-part message in MIME format.
--------------090809090700020606080309
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

You can use classes and expressions in your mapfile to achieve this. 
Here is a simple example. Note that there are different kinds of 
expressions you can use and they are documented in the mapfile reference.

LAYER
  NAME "Lakes"
  DATA "lakes"
  TYPE POLYGON
  STATUS ON
  CLASSITEM "DEPTH"
  CLASS
     NAME "Deep Lakes"
     EXPRESSION ([DEPTH] > 100)
     STYLE    
        COLOR 182 226 243
     END
   END
  CLASS
     NAME "Shallow Lakes"
     EXPRESSION ([DEPTH] < 100)
     STYLE    
        COLOR 192 236 253
     END
   END  
END

Kevin Ravno wrote:

>
>
> Hi everyone
>
> I am sure this must be possible but havent found how to do it.
> I am trying to render lines/polygons based on a field criteria (for 
> example--if I have a shapefile of lakes with an attribute field of 
> 'depth', I am trying to get deeper lakes to display in darker blue.)
>
> I have looked at the layer definitions in 
> http://mapserver.gis.umn.edu/doc36/mapfile-reference.html but havent 
> found how to render a layer.
>
> have I missed it or is this something that I need to do with 
> Perl/mapscript or something.
>
> Regards
> Kevin
>
>
>
>
>

-- 
___________________________

Dean Gadoury

DM Solutions Group
72 Chamberlain Ave. Third Floor
Ottawa, Ontario. K1S 1V9
613 565-5056 ext. 24

gadoury at dmsolutions.ca
www.dmsolutions.ca


--------------090809090700020606080309
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
You can use classes and expressions in your mapfile to achieve this.
Here is a simple example. Note that there are different kinds of
expressions you can use and they are documented in the mapfile
reference.<br>
<br>
LAYER<br>
&nbsp; NAME "Lakes"<br>
&nbsp; DATA "lakes"<br>
&nbsp; TYPE POLYGON<br>
&nbsp; STATUS ON<br>
&nbsp; CLASSITEM "DEPTH"<br>
&nbsp; CLASS<br>
&nbsp;&nbsp; &nbsp; NAME "Deep Lakes"<br>
&nbsp; &nbsp;&nbsp; EXPRESSION ([DEPTH] &gt; 100)<br>
&nbsp;&nbsp; &nbsp; STYLE &nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; COLOR 182 226 243<br>
&nbsp;&nbsp; &nbsp; END<br>
&nbsp;&nbsp; END<br>
&nbsp; CLASS<br>
&nbsp;&nbsp; &nbsp; NAME "Shallow Lakes"<br>
&nbsp; &nbsp;&nbsp; EXPRESSION ([DEPTH] &lt; 100)<br>
&nbsp;&nbsp; &nbsp; STYLE &nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; COLOR 192 236 253<br>
&nbsp;&nbsp; &nbsp; END<br>
&nbsp;&nbsp; END&nbsp;&nbsp; <br>
END<br>
<br>
Kevin Ravno wrote:<br>
<blockquote type="cite"
 cite="mid081722EBADADD5118F9000D0B7B6A3E765C6D8 at mail.gims.com">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator"
 content="MS Exchange Server version 5.5.2653.12">
  <title>Line/Polygon Rendering</title>
  <br>
  <br>
  <p><font size="2" face="Arial">Hi everyone</font>
  </p>
  <p><font size="2" face="Arial">I am sure this must be possible but
havent found how to do it. </font>
  <br>
  <font size="2" face="Arial">I am trying to render lines/polygons
based on a field criteria (for example--if I have a shapefile of lakes
with an attribute field of 'depth', I am trying to get deeper lakes to
display in darker blue.) </font></p>
  <p><font size="2" face="Arial">I have looked at the layer definitions
in <a href="http://mapserver.gis.umn.edu/doc36/mapfile-reference.html"
 target="_blank">http://mapserver.gis.umn.edu/doc36/mapfile-reference.html</a>
but havent found how to render a layer.</font></p>
  <p><font size="2" face="Arial">have I missed it or is this something
that I need to do with Perl/mapscript or something.</font>
  </p>
  <p><font size="2" face="Arial">Regards</font>
  <br>
  <font size="2" face="Arial">Kevin</font>
  </p>
  <br>
  <br>
  <br>
  <br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
___________________________

Dean Gadoury

DM Solutions Group
72 Chamberlain Ave. Third Floor
Ottawa, Ontario. K1S 1V9
613 565-5056 ext. 24

<a class="moz-txt-link-abbreviated" href="mailto:gadoury at dmsolutions.ca">gadoury at dmsolutions.ca</a>
<a class="moz-txt-link-abbreviated" href="http://www.dmsolutions.ca">www.dmsolutions.ca</a></pre>
</body>
</html>

--------------090809090700020606080309--





More information about the mapserver-users mailing list