[mapserver-users] [Fwd: Simple question]
Richard Greenwood
Rich at GreenwoodMap.com
Mon Jan 7 15:00:22 PST 2002
I have pasted a simple thematic layer definition below. You define the
colors or patterns for the thematic map in the MAP file. The "Zoning" field
in my table has a two character field that I want to thematically map (the
CLASSITEM). Then I define a class for each zone. The important thing in
each class is the EXPRESSION. You only need to give a class a NAME if you
want it to have a legend.
Rich
LAYER
NAME "Zoning_Thematic"
DATA Zoning
TYPE POLYGON
CLASSITEM Zoning
CLASS NAME "AC - Auto-Urban Commercial"
EXPRESSION 'AC' COLOR 255 144 200 END
CLASS NAME "BC - Business Conservation"
EXPRESSION 'BC' COLOR 255 0 0 END
CLASS NAME "BP - Business Park"
EXPRESSION 'BP' COLOR 224 0 224 END
CLASS NAME "MH - NC, Mobile Home Park"
EXPRESSION 'MH' COLOR 255 192 0 END
CLASS NAME "OP - Office Professional"
EXPRESSION 'OP' COLOR 255 255 0 END
CLASS NAME "PA - Park"
EXPRESSION 'PA' COLOR 0 176 88 END
CLASS NAME "PD - NC, PUD"
EXPRESSION 'PD' COLOR 255 208 255 END
CLASS NAME "PR - PUD for Planned Resort"
EXPRESSION 'PR' COLOR 255 208 160 END
CLASS NAME "RU - Rural"
EXPRESSION 'RU' COLOR 160 255 160 END
CLASS NAME "SF - NC, Single Family"
EXPRESSION 'SF' COLOR 176 229 255 END
CLASS NAME "SP - Public / Semi-Public"
EXPRESSION 'SP' COLOR 0 160 160 END
CLASS NAME "SU - Suburban"
EXPRESSION 'SU' COLOR 255 160 128 END
END # end of "Zoning_Thematic" layer object
At 04:20 PM 1/7/2002 -0500, you wrote:
> Received: from xcalibur.dmsolutions.ca (www2.dmsolutions.on.ca
> [209.217.116.146])
> by in2.magma.ca (Magma's Mail Server) with ESMTP id g07GjvfR017227;
> Mon, 7 Jan 2002 11:45:57 -0500 (EST)
>Received: from gnome04.sovam.com (gnome04.sovam.com [194.67.1.185])
> by xcalibur.dmsolutions.ca (8.11.2/8.11.2) with ESMTP id g07GcnP11915
> for <dev at dmsolutions.ca>; Mon, 7 Jan 2002 11:38:49 -0500
>Received: from ts3-a63.Voronezh.dial.sovam.com ([194.186.96.191]:15878 "EHLO
> 194.186.96.191" ident: "NO-IDENT-SERVICE[2]" whoson: "voischev"
> smtp-auth: <none> TLS-CIPHER: <none> TLS-PEER: <none>)
> by gnome04.sovam.com with ESMTP id <S1121188AbSAGQpi>;
> Mon, 7 Jan 2002 19:45:38 +0300
>Date: Mon, 7 Jan 2002 19:44:41 +0300
>From: Voischev Alexander <voischev at online.ru>
>X-Mailer: The Bat! (v1.53d)
>Reply-To: Voischev Alexander <voischev at online.ru>
>X-Priority: 3 (Normal)
>Message-ID: <5319692035.20020107194441 at online.ru>
>To: dev at dmsolutions.ca
>Subject: Simple question
>MIME-Version: 1.0
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>X-Mozilla-Status2: 00000000
>
>Hello.
>
>I have a one simple question. I want to create a thematic map,
>but I don't know how I may set the custom color to one shape object by
>the php-script. My aim is assignment the calculated colors to the shapes
>in some layers. How I can do that ?
>
>Thanx.
>
>--
>Best regards,
> Voischev Alexander mailto:voischev at online.ru
Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich at GreenwoodMap.com
(307) 733-0203
http://www.GreenwoodMap.com
More information about the MapServer-users
mailing list