Hi Tonton and Carlos,

You can use an OGR connection to remove decimal points for labelling. I think 
you need GDAL 1.6 or later.

For example with a shapefile called test.shp with a field, testfld1, you can do 
the following

LAYER
   ..
   CONNECTIONTYPE OGR
   CONNECTION "test.shp"
   DATA "select CAST(testfld1 AS INTEGER (4)) from test"
   ..
   CLASS
       ...
       TEXT ([testfld1)]
       LABEL
        ..
       END
   END
END

Regards,

Kathleen

________________________________
From: [email protected] 
[mailto:[email protected]] On Behalf Of Carlos Ruiz
Sent: Saturday, 5 June 2010 1:05 AM
To: Tonton; [email protected]
Subject: Re: [mapserver-users] numeric label without decimal ?

Tonton,

This is because de data domain, there's no way to apply a format with the LABEL 
tag, you have to change the
data domain from the data source directly

IC Carlos Ruiz

________________________________
From: Tonton <[email protected]>
To: [email protected]
Sent: Fri, June 4, 2010 8:05:30 AM
Subject: [mapserver-users] numeric label without decimal ?

hello

i use shapefile  to render a map in wms layer.
it is working good but ...

the  column i use TXT  have number  ( 12 30 255 etc...)

so i see with 10 digits after the point ( 12.00000000  30.000000000 
255.000000000 etc...)

if anybody know how to set that my label was text or integer and not decimal ? 
i haven't found it in mapserver documentation

Tonton

next the layer

LAYER
        NAME "LabelParcelle.shp"
        DATA "LabelParcelle.shp"
        TYPE POINT
        DEBUG 5
        DUMP TRUE
        LABELCACHE ON
        METADATA
        WMS_TITLE "LabelParcelle.shp"
        "WMS_SRS" "EPSG:27572"

        WFS_TITLE "LabelParcelle.shp"
        "WFS_SRS" "EPSG:27572"
        END
        LABELITEM TXT
CLASS
NAME "LabelParcelle.shp"
        STYLE
        SYMBOL 7
        SIZE 2
        OUTLINECOLOR 0 0 0
        COLOR 0 0 0
        END
        LABEL
        TYPE BITMAP
        POSITION AUTO
        SIZE MEDIUM
        COLOR 0 0 0
        End #LABEL
        END
END #Layer


_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to