[mapserver-users] Defining Classes/Labels for contours

Michael Soracco Michael.Soracco at noaa.gov
Thu Oct 31 08:25:21 PST 2002


Yup,  it was the syntax.  For the archive's sake, it should look like:


     EXPRESSION (  ( [CONTOUR] >= 0 ) AND ( [CONTOUR] <5)  )

Thanks again.
-m

Puneet Kishor wrote:

> No, you don't need to create a new shapefile. As I said, the logic of what
> you are doing is correct... there must be something wrong with your
> expressions... make sure the field name (Contour) is correct, make it caps
> (I think selection might be case-sensitive...) you might have to enclose it
> in square brackets/and or quotes... I am talking from the top of my head...
> checks the docs or the wiki. There are specific examples.
>
> Your logic is correct. Most likely your expression is wrong.
>
> Puneet.
>
> PS. Please reply to the entire list so others may help|behelped. Thanks.
>
> > -----Original Message-----
> > From: Michael Soracco [mailto:Michael.Soracco at noaa.gov]
> > Sent: Thursday, October 31, 2002 7:13 AM
> > To: Puneet Kishor
> > Subject: Re: [mapserver-users] Defining Classes/Labels for contours
> >
> >
> > Although there is no mechanism for creating graduated colors,
> > should I be able
> > to display the "0-5" contour line as RED and the "5-10" as
> > GREEN ?  The code
> > below results in NO contours being displayed, but just Legend
> > entries.  Is this
> > what you mean by no mechanism?  I.e. I need to create new
> > shapefiles for each
> > contour value.
> >
> > thanks.
> >
> > Puneet Kishor wrote:
> >
> > > there is no mechanism for creating graduated colors for a
> > feature based on
> > > class ranges. What you have done is correct.
> > >
> > > If you don't want the legends to be created, just take out
> > the NAME line
> > > from within the CLASS definitions.
> > >
> > > Hth.
> > >
> > > Pk/
> > >
> > > -----Original Message-----
> > > From: Michael Soracco [mailto:Michael.Soracco at noaa.gov]
> > > Sent: Wednesday, October 30, 2002 2:17 PM
> > > To: mapserver
> > > Subject: [mapserver-users] Defining Classes/Labels for contours
> > >
> > > I've checked the archives and didn't see anything on what I
> > need to do.
> > > It's probably straightforward, but I haven't been able to
> > figure it out...
> > > I have a Polyline shapefile where each polyline has a
> > classified value (i.e.
> > > Contour 1,2,3,4,5,6,7,8,9,10).  I've tried the following to draw the
> > > contours in different colors but have only succeeded in
> > creating a Legend
> > > Class for each level.  Is it possible to have graduated
> > colors for the lines
> > > within the same Layer Object?
> > > LAYER
> > >     NAME BATHY
> > >     TYPE LINE
> > >     STATUS OFF
> > >     DATA bathy
> > >     CLASSITEM "Contour"
> > >     MAXSCALE 500000
> > >     CLASS
> > >         NAME "0 - 5"
> > >         EXPRESSION "(Contour >= 0 AND Contour <=5)"
> > >         COLOR 200 0 0
> > >     END
> > >     CLASS
> > >         NAME "5 - 10"
> > >         EXPRESSION "(Contour > 5 AND Contour <=10)"
> > >         COLOR 0 200 0
> > >     END
> > > END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20021031/b3c5ce55/attachment.htm>


More information about the MapServer-users mailing list