[mapserver-users] How can I avoid long notation of double values in label or info template for shapes?

Lars Lingner gislars+list at googlemail.com
Fri Nov 23 01:39:14 PST 2012


On 23.11.2012 10:12, Astrid Emde wrote:
> Hello,
> 
> I have a shapefile with a column of type double that contains values
> like 2.54 or -2.03.
> 
> When I label the geometrie with this column or display this column in
> my infotemplate I get the following notation of the values: 
> 2.54000000000e+000 -2.03000000000e+000
> 
> If there a way to tell MapServer to display the "normal" notation of
> the value? Or do I have to change the shape?
> 

You can define your own format by using

...
CLASS
  ...
  TEXT (round[numbercolumn], 2)
  ...
  LABEL
    ...
  END
END
...

In RFC 64 [1] you'll find some informations.

I'm pretty sure I used it for myself. But grepping through my current
mapfiles say otherwise. So I can't give an working example.


Lars


[1] http://mapserver.org/development/rfc/ms-rfc-64.html




More information about the MapServer-users mailing list