[Featureserver] Json: unrounding of coordinates
josh at umbrellaconsulting.com
Wed Jan 20 11:59:59 EST 2010
Workaround for simplejson:
http://code.google.com/p/simplejson/issues/detail?id=34 (near the end)
Or, if using py26's json:
On Wed, Jan 20, 2010 at 8:43 AM, Peter Robins <fs at peterrobins.co.uk> wrote:
> 2010/1/20 Christopher Schmidt <crschmidt at metacarta.com>:
> > 43.12, or some other number? for example, 43.125 would work, because
> > it is a power-of-two in binary.
> yes, it works for 43.125. Ok, so floating-point arithmetic problem,
> but that doesn't explain why it works on some servers but not on
> http://maps.peterrobins.co.uk/cgi-bin/test.cgi is a simple script that
> print "Content-Type: text/plain\n\n"
> import sys
> print "version", sys.version
> import simplejson
> print simplejson.dumps(43.12)
> this prints 43.12. On the same server,
> http://maps.peterrobins.co.uk/cgi-bin/fs/details/1 is a real
> linestring where the output is fine. Somewhat older version of python
> (2.4), but otherwise the software is identical.
> Featureserver mailing list
> Featureserver at openlayers.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Featureserver