[mapserver-users] How to use ANNOTATION layer in combination with RASTER data?

Stephen Woodbridge woodbri at swoodbridge.com
Tue Jun 3 05:58:51 PDT 2014


Jorrit,

The ANNOTATION layer is deprecated and might event be remove in 
mapserver 6.4

Anyway if you just want to put an arbitrary label on an image You can 
create a point layer and use FEATURE to define where you want the label 
and use TEXT to define the text of the label.

-Steve W

On 6/3/2014 8:01 AM, Jorrit Goddijn wrote:
> Hi all,
>
> I try draw an ANNOTATION type layer based on RASTER type layer.  When
> doing this based on a shape file I would set the LABEL item on the
> ANNOTATION layer to be attribute used in the shapefile.
>
> What LABELITEM should I use when using RASTER data?
>
> I posted the Mapfile I have so far hereunder.
>
> Thank you for your help.
>
> Bye
>
> Jorrit
>
> #----------------------------------------------------------------------------
>
> #grib wave direction layer example
>
> #----------------------------------------------------------------------------
>
>      LAYER
>
>          NAME "grib_data"
>
>          TYPE RASTER
>
>          DATA
> "/var/www/mapserver/data/grib/routeguard/4nwcurpol99_2013110412.grb2"
> #Current direction @ Mean sea level
>
>          PROCESSING "BANDS=1"
>
>          PROCESSING "SCALE=0,360" #scale all degrees
>
>          PROJECTION
>
>              "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +pm=-360"
>
>          END
>
>      END
>
> #---------------------------------------------------------------------------
>
> # the annotation layer
>
> #---------------------------------------------------------------------------
>
>    LAYER
>
>      NAME        "grib_label"
>
>      DATA        "grib_data"
>
>      STATUS      OFF
>
>      TYPE        ANNOTATION
>
>      CLASSITEM   "CLASS" # do I need it?
>
>      LABELITEM   "VAR_10-1-0_L101" #what variable name to use?
>
>      CLASS
>
>        EXPRESSION [VAR_10-1-0_L101] #gives parse error
>
>        STYLE
>
>          COLOR      -1 -1 -1
>
>        END
>
>        LABEL
>
>          COLOR 132 31 31
>
>          TYPE TRUETYPE
>
>          FONT arial-bold
>
>          SIZE 12
>
>          ANTIALIAS TRUE
>
>          POSITION CL
>
>          PARTIALS FALSE
>
>          MINDISTANCE 300
>
>          BUFFER 4
>
>        END # end of label
>
>      END # end of class
>
>    END # annotation layer
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



More information about the mapserver-users mailing list