I am doing normalisation of two fields on GeoServer.


Now I want to round the result of Division to n decimal places.


To simply format it you can use the numberFormat function. This allows you to specify how many digits you want after the decimal point.

Here is an example from MASS-GIS:

          <Function name="numberFormat">
            <PropertyName xmlns="http://www.opengis.net/ogc">CONTOUR_FT</PropertyName>

If you also want to round the result there is a round function which while return the nearest integer value.

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.