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

Jorrit Goddijn Jorrit.Goddijn at meteogroup.com
Wed Jun 4 03:08:40 PDT 2014


Hi Jörg, Hi Stephen, 

Instead of showing the grayscaled pixels of the RASTER image, I would like to show the actual value.

I have my data only in GRIB format available, so creating a point layers  and using the FEATURE attribute is not possible as I would need the data as a shapefile for that, I am right? 

Is there anyway to accomplish this? 

Thanks for your time,

Jorrit

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jörg Thomsen
Sent: dinsdag 3 juni 2014 14:17
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] How to use ANNOTATION layer in combination with RASTER data?

Hi Jorrit,

you want to label you raster dataset with what?

Regards, Jörg

Am 03.06.2014 14:01, schrieb Jorrit Goddijn:
> 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
> 

_______________________________________________
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