NOT labelling certain features

Mike Saunt mikesaunt at GMAIL.COM
Fri Jan 19 08:21:37 EST 2007


Thanks Stephen

For anyones reference the complete Layer Definition would now be:

    LAYER
        NAME MinorRoads
        TYPE LINE
        STATUS DEFAULT
        CONNECTIONTYPE OGR
        CONNECTION "astun\MINORROADS.TAB"
        MAXSCALE 60000
        MINSCALE 10000
        LABELMAXSCALE 50000
        LABELITEM "DESCRIPTION"
        TRANSPARENCY ALPHA    # anti aliasing lines
        CLASSITEM "DESCRIPTION"
        CLASS
            NAME "StreetLabels"
                    EXPRESSION /^(REAR OF|ACCESS)/
            STYLE
                COLOR 192 192 192
                SYMBOL 'continue'
                SIZE 5
                ANTIALIAS TRUE
            END
            STYLE
                COLOR 255 255 255
                SYMBOL 'continue'
                SIZE 3
                ANTIALIAS TRUE
            END
        END
        CLASS
            NAME "StreetLabels"
            STYLE
                COLOR 192 192 192
                SYMBOL 'continue'
                SIZE 5
                ANTIALIAS TRUE
            END
            STYLE
                COLOR 255 255 255
                SYMBOL 'continue'
                SIZE 3
                ANTIALIAS TRUE
            END
            LABEL
                FONT "arial"
                TYPE TRUETYPE
                ANTIALIAS TRUE
                COLOR 40 40 40
                OUTLINECOLOR 255 255 255
                SIZE 7
                POSITION AUTO
                PARTIALS FALSE
                BUFFER 4
                ANGLE AUTO
            END
        END
    END



On 19/01/07, Stephen Woodbridge <woodbri at swoodbridge.com> wrote:
>
> One more thing if you want to draw the objects but not label them then
> add the STYLE sections to the new CLASS but don't add the LABEL sections.
>
> -Steve W.
>
> Stephen Woodbridge wrote:
> > Mike,
> >
> > Try adding the following to your mapfile. You may have to tweak the
> > regex a little.
> >
> > -Steve W.
> >
> > Mike Saunt wrote:
> >> Hi All
> >>
> >> I've got a layer of roads where the description of various roads
> >> starts "REAR OF" or "ACCESS TO".   I want to be able to label all
> >> roads that DON'T start with these terms as these are insignificant
> >> roads to label.  I'm a bit unsure of the Filter / Expression to
> >> achieve this.
> >> Any help appreciated!
> >>
> >>     LAYER
> >>         NAME MinorRoads
> >>         TYPE LINE
> >>         STATUS DEFAULT
> >>         CONNECTIONTYPE OGR
> >>         CONNECTION "astun\MINORROADS.TAB"
> >>         MAXSCALE 60000
> >>         MINSCALE 10000
> >>         LABELMAXSCALE 50000
> >>         LABELITEM "DESCRIPTION"
> >>         TRANSPARENCY ALPHA    # so anti aliasing lines works
> >>         CLASSITEM "DESCRIPTION"
> >           CLASS
> >               NAME "Noop"
> >               EXPRESSION /^(REAR OF|ACCESS TO)/
> >               # catch them here and do nothing with them
> >           END
> >>         CLASS
> >>             NAME "Streets"
> >>             STYLE
> >>                 COLOR 192 192 192
> >>                 SYMBOL 'continue'
> >>                 SIZE 5
> >>                 ANTIALIAS TRUE
> >>             END
> >>             STYLE
> >>                 COLOR 255 255 255
> >>                 SYMBOL 'continue'
> >>                 SIZE 3
> >>                 ANTIALIAS TRUE
> >>             END
> >>             LABEL
> >>                 FONT "arial"
> >>                 TYPE TRUETYPE
> >>                 ANTIALIAS TRUE
> >>                 COLOR 40 40 40
> >>                 OUTLINECOLOR 255 255 255
> >>                 SIZE 7
> >>                 POSITION AUTO
> >>                 PARTIALS FALSE
> >>                 BUFFER 4
> >>                 ANGLE AUTO
> >>             END
> >>         END
> >>     END
> >>
> >> Cheers
> >> Mike
> >>
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070119/9857917d/attachment.html


More information about the mapserver-users mailing list