[mapserver-users] Displaying repeated values in label

Toni Martínez tmartinh at gmail.com
Mon Sep 26 12:02:45 EDT 2011


Thank you very much. You touched the right key.
Regards,

2011/9/26 thomas bonfort <thomas.bonfort at gmail.com>

> remove the MINDISTANCE keywords from your labels, they prevent
> duplicate labels from appearing closer than the specified distance
> (i.e. 600 in your case) which depending an your image size can mean
> that your 0.0 is only displayed once.
>
> --
> thomas
>
> On Mon, Sep 26, 2011 at 17:52, Toni Martínez <tmartinh at gmail.com> wrote:
> > Hi all,
> > I am using MapServer version 5.6.1 reading data from Postgis.
> > One of the layers I am working with makes use of labels displaying data
> from
> > a Postgis column over a marker on the map. Everything seems to be working
> > fine but some data to be displayed on labels is 0.0 In such case,
> mapserver
> > only displays one marker with its label.
> > Because I need all markers and labels to be represented on that layer
> even
> > if values are the same, I have been trying some options that I read in
> > mapserver official docs like MINDISTANCE or FORCE or PROCESSING
> > "LABEL_NO_CLIP=ON" with no results.
> > Please take a look at my layer's code.
> >
> > LAYER
> >     NAME pern_lectura
> >     GROUP overlays
> >     TYPE POINT
> >     STATUS OFF
> >     PROCESSING "CLOSE_CONNECTION=DEFER"
> >     CONNECTIONTYPE POSTGIS
> >     CONNECTION 'user=postgres password=xxxxxx dbname=UAS host=xxxxxxx
> > port=5432'
> >     DATA "the_geom from gis_schema.perno_estat_geom using SRID=23031
> using
> > unique id_perno"
> >     FILTER "nombre_anillo='A903'"
> >     OPACITY 100
> >     CLASS
> >       NAME 'Normalitat'
> >       EXPRESSION ([estat] = 0)
> >         STYLE
> >                 SYMBOL "quadrat"
> >                 SIZE 15
> >                 COLOR 45 181 45
> >                 OUTLINECOLOR 0 0 0
> >         END
> >         STYLE
> >                 SYMBOL "circle"
> >                 SIZE 11.25
> >                 COLOR 204 204 255
> >                 OUTLINECOLOR 0 0 0
> >         END
> >         STYLE
> >                 SYMBOL "creu"
> >                 SIZE 6
> >                 COLOR 0 0 0
> >         END
> >     LABEL
> >         MINFEATURESIZE      80
> >             TYPE              TRUETYPE
> >             FONT              "arial"
> >             SIZE              8
> >             ANGLE             FOLLOW
> >             COLOR             25 25 175
> >             OUTLINECOLOR      255 255 255
> >             MINDISTANCE       600
> >             PARTIALS          FALSE
> >       END
> >     END
> >     CLASS
> >       NAME 'Notificació'
> >       EXPRESSION ([estat] = 1)
> >       STYLE
> >                 SYMBOL "quadrat"
> >                 SIZE 15
> >                 COLOR 226 226 0
> >                 OUTLINECOLOR 0 0 0
> >         END
> >         STYLE
> >                 SYMBOL "circle"
> >                 SIZE 11.25
> >                 COLOR 204 204 255
> >                 OUTLINECOLOR 0 0 0
> >         END
> >         STYLE
> >                 SYMBOL "creu"
> >                 SIZE 6
> >                 COLOR 0 0 0
> >         END
> >      LABEL
> >         MINFEATURESIZE      80
> >             TYPE              TRUETYPE
> >             FONT              "arial"
> >             SIZE              8
> >             ANGLE             FOLLOW
> >             COLOR             25 25 175
> >             OUTLINECOLOR      255 255 255
> >             MINDISTANCE       600
> >             PARTIALS          FALSE
> >       END
> >     END
> >     CLASS
> >       NAME 'Preavís'
> >       EXPRESSION ([estat] = 2)
> >       STYLE
> >                 SYMBOL "quadrat"
> >                 SIZE 15
> >                 COLOR 255 130 0
> >                 OUTLINECOLOR 0 0 0
> >         END
> >         STYLE
> >                 SYMBOL "circle"
> >                 SIZE 11.25
> >                 COLOR 204 204 255
> >                 OUTLINECOLOR 0 0 0
> >         END
> >         STYLE
> >                 SYMBOL "creu"
> >                 SIZE 6
> >                 COLOR 0 0 0
> >         END
> >       LABEL
> >         MINFEATURESIZE      80
> >             TYPE              TRUETYPE
> >             FONT              "arial"
> >             SIZE              8
> >             ANGLE             FOLLOW
> >             COLOR             25 25 175
> >             OUTLINECOLOR      255 255 255
> >             MINDISTANCE       600
> >             PARTIALS          FALSE
> >       END
> >     END
> >     CLASS
> >       NAME 'Atenció'
> >       EXPRESSION ([estat] = 3)
> >       STYLE
> >                 SYMBOL "quadrat"
> >                 SIZE 15
> >                 COLOR 212 0 0
> >                 OUTLINECOLOR 0 0 0
> >         END
> >         STYLE
> >                 SYMBOL "circle"
> >                 SIZE 11.25
> >                 COLOR 204 204 255
> >                 OUTLINECOLOR 0 0 0
> >         END
> >         STYLE
> >                 SYMBOL "creu"
> >                 SIZE 6
> >                 COLOR 0 0 0
> >         END
> >       LABEL
> >         MINFEATURESIZE      80
> >             TYPE              TRUETYPE
> >             FONT              "arial"
> >             SIZE              8
> >             ANGLE             FOLLOW
> >             COLOR             25 25 175
> >             OUTLINECOLOR      255 255 255
> >             MINDISTANCE       600
> >             PARTIALS          FALSE
> >       END
> >     END
> >     PROJECTION
> >       "init=epsg:23031"
> >     END
> >     METADATA
> >         "wms_srs" "EPSG:23031"
> >         "wms_title" "Perns lectura"
> >         "wms_include_items" "id"
> >     END
> >     TEMPLATE "templates/template.php"
> >     TOLERANCE 1
> >     PROCESSING "LABEL_NO_CLIP=ON"
> >     TYPE ANNOTATION
> >      LABELITEM lectura_dif
> >       CLASS
> >         LABEL
> >             COLOR 0 0 0
> >             TYPE TRUETYPE
> >             FONT arial
> >             SIZE 10
> >             ANTIALIAS TRUE
> >             POSITION AUTO
> >             FORCE TRUE
> >             PARTIALS FALSE
> >             MINDISTANCE 3000
> >             BUFFER 4
> >             PARTIALS FALSE
> >         END
> >       END
> >   END
> >
> > Any help will be greatly appreciated.
> > Regards,
> > Toni M.
> >
> >
> >
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110926/6c5e5f9a/attachment.html


More information about the mapserver-users mailing list