This GetFeatureInfo query will give you this result:

Evaporation = 1.0149659 mm

The template that produces the result is this:

<!-- mapserver template -->
[metadata_variable_name] = [value_0] [metadata_unit]<br>

How can I have it round the output to one decimal point? I.e. I want it to produce this instead:

Evaporation = 1.0 mm
  • 1
    Have you tried item formatting as in MapServer documentation [item name="area" precision="2" commify="2" format="Area is $value"]
    – user30184
    Apr 20, 2015 at 10:04

1 Answer 1


This is the solution:

<!-- mapserver template -->
[metadata_variable_name] = [item name="value_0" precision="1"] [metadata_unit]<br>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.