thanks for those comments, I am storing the route and information
points as a geometry collection, that in itself is quite challenging.
Originally I was going to use conventional fields but after studying
the documentation decided to use the spatial extensions to avoid
having several linked tables. Examples that show how to use geometry
are not easy to find so the project has made very slow progress
especially as I am new to javascript. I should not really say I wasted
effort getting the rounding working, I learned a lot about objects and
the google maps api and am still learning even more about mysql.

On Jan 2, 7:31 am, "Björn Brala" <[email protected]> wrote:
> Thing about MySQL is that the rounding is done when selected i think. So a
> float isn't stored 10, 6 but only SELECTED 10,6.
>
> I'd say create a trigger ;)
>
> create trigger round_latlng before insert on markers STATEMENT.
>
> Triggers are fun ;)
>
> 2009/1/2 Barry Hunter <[email protected]>
>
>
>
>
>
> > Depends on how you are storing them in mysql, if you are using a pair
> > of decimal(10,6) columns, then the rounding will happen anyway.
>
> > But you mention 'geometry' which suggests you are looking at the
> > spatial extensions, which may well use a different system.
>
> > But either way roudning to 6dp isnt really going to hurt - unless you
> > working to cm accuracy! - and doing the rounding will save you a bit
> > of bandwidth over the wire anyway.
>
> > 2009/1/1 Alan C <[email protected]>:
>
> > > I am working on a project to store routes and associated information
> > > points. This is going onto a linux, apache, mysql, php equipped
> > > server.
>
> > > Using the examples I now have my input system working so routes and
> > > points can be converted into a series of coordinates. I noted that
> > > advice about storing points in mysql as 10,6 and so have gone to a lot
> > > of trouble to round all my points to 6 places in the clientside
> > > javascript before passing them to the server. My intention was to save
> > > space and processing time
>
> > > but . . .  the mysql geometry documentation says coordinates are
> > > stored as double precision numbers
>
> > > so, my question is . . . have I wasted all that effort because mysql
> > > is going to store my rounded numbers as double precision anyway?
>
> > --
> > Barry
>
> > -www.nearby.org.uk-www.geograph.org.uk-
>
> --
> Bjorn Brala
> ----------------
> GeoStart.nl- Google maps - Swis Webdesign
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to