[OSM-dev] Re: [OSM-talk] SVG output
Ben Gimpert
ben at somethingmodern.com
Tue May 30 17:18:03 BST 2006
I feel dirty:
class Float; def to_s; sprintf("%0.16f", self); end; end
(Must be at the kernel level.)
On Tue, 30 May 06 @04:09pm, Erik Johansson wrote:
> On 5/30/06, Tom Carden <tom at tom-carden.co.uk> wrote:
> >On 30/05/06, David Sheldon <dave at earth.li> wrote:
> >> On Sat, May 27, 2006 at 01:19:22AM +0100, Etienne wrote:
> >> > >> <node id='646217' lat='51.4337983632484' lon='9.48436500038951E-4'
> >/>
> >> >
> >> > Is it a bug or is this intentional? I can't see any good reason to
> >> > use exponential format here but maybe it's difficult not to.
> >>
> >> It is a bug, either in the API code or the schema. The schema
> >> (utils/schema/osm.xsd)
> >
> >The schema was never officially implemented. Matt wrote it to learn
> >schemas, but it was reverse engineered from Steve's implementation.
>
> Ruby expert needed, or ugly hack. The error is this line in ox.rb:
> el1['lat'] = node.latitude.to_s
>
> So anyone who knows ruby good enough to make float.to_s to output
> numbers in a non exponent way?
>
> echo 'a=0.0000001;puts a.to_s; printf("%0.16f\n",a);'|ruby
> 1.0e-07
> 0.0000001000000000
>
> --
> /Erik
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
More information about the dev
mailing list