[OSM-dev] Re: [OSM-talk] SVG output

Erik Johansson erjohan at gmail.com
Tue May 30 15:09:47 BST 2006


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




More information about the dev mailing list