On May 7, 8:44 am, HK <[email protected]> wrote:
> Hello,
>
> I want to start coding an application with php & mysql. Since mysql
> now supports spatial fields like points, which is the best field type
> to store locations?
>
> The application involves storing markers, and polylines connecting
> this markers.
>
> Is POINT a type worth trying or should I fall back to float or decimal
> (5,3)?

It depends how you're going to use the data. If you intend using the
spatial capabilities of MySQL (which aren't as good as other spatially-
aware DBMSs) then it makes sense to use point. If all you are doing is
storing numbers which get output to your page, it's easier to store
numbers.

It's possible to do "spatial" things with number fields and some
server-side code, and it's possible to output numbers from spatial
fields.

However I would suggest that decimal(5,3) is not sufficent:
decimal(9,6) would be better as that will cope with longitudes of
greater magnitude than 99 degrees and provide sufficient precision in
the decimal portion of the number.

-- 
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