[Geomoose-users] Expressions

Jay Kapalczynski jkapalczynski at ci.maple-grove.mn.us
Wed Aug 20 10:23:57 EDT 2008


OK I got it to work....well got it label a specific value in the DIAMETER field.

Now is there is a way that I can write 2 EXPRESSIONS that will say don't label 6 and the second say label everything else?



From: Jay Kapalczynski
Sent: Wednesday, August 20, 2008 9:17 AM
To: 'Dan Little'; Fischer, Brian; geomoose-users at lists.sourceforge.net; geomoose-developers at lists.sourceforge.net
Subject: RE: [Geomoose-users] Expressions

I get this to work:
But I get the errors when I try to create the expressions to limit what is labeled...(see former email below)

First off I am just trying to get the EXPRESSION to work for the labels.
Second I am trying to avoid writing 15 different expressions
That's why I was trying create an EXPRESSION that said label everything except values = 6

                LAYER # Watermain_Pipe
                     #NAME Watermain_Pipe
                     DATA './watermain_pipes.shp'
                     STATUS DEFAULT
                     TYPE annotation
                    MAXSCALE 4000
                    MINSCALE 100
                    LABELITEM 'DIAMETER'
                    LABELCACHE ON

                CLASS
                       LABEL
                                TYPE TRUETYPE
                                FONT vera_sans
                                ANGLE FOLLOW
                                POSITION AUTO
                                MAXSIZE 7
                                SIZE 7
                                MINSIZE 7
                                ANTIALIAS TRUE
                                COLOR 0 0 0
                                BUFFER 2
                       END
                     END
                END

From: Dan Little [mailto:danlittle at yahoo.com]
Sent: Wednesday, August 20, 2008 7:55 AM
To: Fischer, Brian; Jay Kapalczynski; geomoose-users at lists.sourceforge.net; geomoose-developers at lists.sourceforge.net
Subject: Re: [Geomoose-users] Expressions

Actually, that will exclude anything with a 6 in it.

An easier way to go...

LAYER
    CLASS
       EXPRESSION '6'
        # Leave this blank
    END
    CLASS
           .... everything else ....
    END
END

----- Original Message ----
From: "Fischer, Brian" <bfischer at houstonengineeringinc.com>
To: Jay Kapalczynski <jkapalczynski at ci.maple-grove.mn.us>; geomoose-users at lists.sourceforge.net; geomoose-developers at lists.sourceforge.net
Sent: Tuesday, August 19, 2008 4:41:09 PM
Subject: Re: [Geomoose-users] Expressions
I think that should do it.

Brian Fischer
Houston Engineering, Inc.
Maple Grove, MN
(763) 493-4522


________________________________
From: Jay Kapalczynski [mailto:jkapalczynski at ci.maple-grove.mn.us]
Sent: Tuesday, August 19, 2008 4:39 PM
To: Fischer, Brian; geomoose-users at lists.sourceforge.net; geomoose-developers at lists.sourceforge.net
Subject: RE: [Geomoose-users] Expressions
Like this?

                LAYER # Watermain_Pipe
                      #NAME Watermain_Pipe
                      DATA './watermain_pipes.shp'
                      STATUS DEFAULT
                      TYPE annotation
                    MAXSCALE 4000
                    MINSCALE 100
                    #LABELITEM 'DIAMETER'
                    LABELCACHE ON

                                 CLASSITEM "DIAMETER"
                                                CLASS
                                                                 LABEL
                                                                                EXPRESSION /[^6]/
                                                                                TYPE TRUETYPE
                                                                                FONT vera_sans
                                                                                ANGLE FOLLOW
                                                                                POSITION AUTO
                                                                                MAXSIZE 7
                                                                                SIZE 7
                                                                                MINSIZE 7
                                                                                ANTIALIAS TRUE
                                                                                COLOR 0 0 0
                                                                                #OUTLINECOLOR 255 255 192
                                                                                BUFFER 2
                                                END
                     END

From: Fischer, Brian [mailto:bfischer at houstonengineeringinc.com]
Sent: Tuesday, August 19, 2008 4:13 PM
To: Jay Kapalczynski; geomoose-users at lists.sourceforge.net; geomoose-developers at lists.sourceforge.net
Subject: RE: [Geomoose-users] Expressions

Yep, you just use a regular expression: /[^6]/

This is a mapserver syntax.

Brian Fischer
Houston Engineering, Inc.
Maple Grove, MN
(763) 493-4522


________________________________
From: geomoose-users-bounces at lists.sourceforge.net [mailto:geomoose-users-bounces at lists.sourceforge.net] On Behalf Of Jay Kapalczynski
Sent: Tuesday, August 19, 2008 4:08 PM
To: 'geomoose-users at lists.sourceforge.net'; 'geomoose-developers at lists.sourceforge.net'
Subject: [Geomoose-users] Expressions
Is there a way to form a NOT statement in the expression...

To say for instance...show me all but EXPRESSION "6"

Instead of having to write each one out that you want....say I have pipe sizes 1-30 but 90% are 6 inches....jsut show the ones that are not 6 iches...
This should decrease the amount of labeling I have to do


                     CLASS
                                 LABEL
                                        EXPRESSION "12"
                                                                TYPE TRUETYPE
                                                                FONT vera_sans
                                                                ANGLE FOLLOW
                                                                POSITION AUTO
                                                                MAXSIZE 7
                                                                SIZE 7
                                                                MINSIZE 7
                                                                ANTIALIAS TRUE
                                                                COLOR 0 0 0
                                                                #OUTLINECOLOR 255 255 192
                                                                BUFFER 2
                                END
                     END

                     CLASS
                                LABEL
                                        EXPRESSION "16"
                                                                TYPE TRUETYPE
                                                                FONT vera_sans
                                                                ANGLE FOLLOW
                                                                POSITION AUTO
                                                                MAXSIZE 7
                                                                SIZE 7
                                                                MINSIZE 7
                                                                ANTIALIAS TRUE
                                                                COLOR 0 0 0
                                                                #OUTLINECOLOR 255 255 192
                                                                BUFFER 2
                                END
                     END





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20080820/5b8d5e24/attachment.html


More information about the Geomoose-users mailing list