Converting values returned my mapserver

Steve Lime Steve.Lime at DNR.STATE.MN.US
Wed Nov 29 01:18:53 EST 2006


I'm sorry but what you're trying to do isn't possible with MapServer as
it sits. You
have to pre-compute the km/hr values in another column.

Steve

>>> Adrian Versteegen <A.Versteegen at BOM.GOV.AU> 11/28/06 5:08 PM >>>
Apologies if this is a duplicate message, the original seemed to be 
rejected by the listserv server..

We have weather observations with the wind speed values in the shapefile
in knots. Our customer wants the values displayed in km/h.

I am using a cgi/wms arrangement and have tried various combinations of
LABELITEM, EXPRESSION and TEXT to multiply the [Max_Wnd_Gus] attribute
by the conversion constant, so the following options in the map file
tried individually or collectively give the results shown:

LAYER
  LABELITEM ("Max_Wnd_Gus" * 1.85) -  gives an error,
  ...

  CLASS
    EXPRESSION ([Max_Wnd_Gus] * 1.85) - returns true, the values are
displayed,
    TEXT ('[Max_Wnd_Gus] * 1.85' km/h) - displays '<value> * 1.85' km/h

Any ideas?

Thanks,
Adrian



More information about the mapserver-users mailing list