[MapServer-users] Format of numeric query results in GML

TC Haddad tchaddad at gmail.com
Fri Dec 16 14:12:03 PST 2022


Hi all,

I have a MapServer WMS that is returning GML query results, and all works
well except that non-integer numeric fields are returning in scientific
notation, eg.:

<USER>4.86010000000e+02</USER>
<USAGE>1100</USAGE>
<LATITUDE>3.58893542070e+01</LATITUDE>
<LONGITUDE>-1.20962789560e+02</LONGITUDE>
<SIZE>7.50000000000e-01</SIZE>

I see there is a metadata setting "*gml_[item name]_precision*" [1] that
should allow specifying precision of these fields, but it seems it is not
intended for GML output. Is this correct?

For example I tried setting this for the SIZE field:

'gml_SIZE_type' 'Real'
'gml_SIZE_precision' '2'

but this had no effect on the GML output:

<SIZE>7.50000000000e-01</SIZE>

Is there another way that I can accomplish better output from this service?
The source data format is a shapefile, and unlikely to change in this case.

thanks for any suggestions,

Tanya

[1] https://mapserver.org/ogc/wfs_server.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20221216/ad364374/attachment.htm>


More information about the MapServer-users mailing list