MapServer / MapServer-import

3 stars 2 forks source link

Accuracy of scientific notation #1361

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: pierrick.brihaye@culture.gouv.fr Date: 2005/05/24 - 12:28

This is the BoundingBox element as generated by a WMS server :

<BoundingBox SRS="EPSG:27582" minx="47493" miny="2.26732e+006" maxx="349900"
maxy="2.44917e+006"/>

the miny/maxy are 12 characters long.

If no scientific notation were used, we would have "2267320" and "2449170", i.e.
7 characters.

Cheers,

p.b.
tbonfort commented 12 years ago

Author: dmorissette Date: 2005/05/24 - 15:41

Um... maybe a ows_coord_precision metadata could be added to control the
precision of numbers output for a given layer by WFS/GML responses? Steve,
Assefa, what do you think?
tbonfort commented 12 years ago

Author: assefa Date: 2005/05/24 - 16:05

Daniel,

 Is this metadata to be used for all wms/wfs/wcs numbers ? Not sure why you 
specfied wfs/gml since the bug was related to wms bbox.
tbonfort commented 12 years ago

Author: pierrick.brihaye@culture.gouv.fr Date: 2005/05/24 - 16:49

Hi,

1) Yes, this issue is related to the WFS Server (GetCapabilities) but could also
be related to the WMSServer (Bugzilla limitation, one component at a time).
2) An ows_coord_precision metadata could be acceptable.

Cheers,

p.b.
tbonfort commented 12 years ago

Author: dmorissette Date: 2005/05/24 - 17:00

Assefa, yes, I meant that this should work for all OWS services, I forgot to
mention WMS and WCS.
tbonfort commented 12 years ago

Author: sdlime Date: 2005/05/24 - 19:58

I wouldn't call this trivial, there's a ton of code to modify- everywhere a 
double is output would need a new format string generated.

Do we really need metadata or can we be smarter at how we output doubles via 
printf. I remember this coming up with WCS and I believe it was Dan who 
switched all the coordinate output for that interface from %g to %.15g. It's 
still %g in all the others...

Steve
tbonfort commented 12 years ago

Author: dmorissette Date: 2005/05/24 - 20:14

Agreed it's not trivial. Using format %.15g everywhere could do the trick, but
could be an overkill for lots of datasets that don't need that much precision,
that's why I suggested a layer-configurable parameter.

Either way that's too much work for this release, so I'm changing the target to
FUTURE.