If you want to implement the functions from MySQL you need to store them in
a geometry column. To make sure its fast create an index on that column;

ALTER TABLE markers ADD SPATIAL INDEX(geo_field);

This will make it a lot faster.

When cerating Polygons or lines, be sure the decimal character is a point. I
use for polyline;

LINESTRING(52.4 4.6, 53.3 4.5) etc.

And polygon;

POLYGON((52.6 4.7, 43.3 4.6, 50.7 4.8))

Double the (()) because polygon can consist of inner and outer.

Hopefully this helps.


2009/4/10 px <[email protected]>

>
> hi,
>
> i am working on a loc based concept. stuck on a few issues.
>
> how do we store the lat/lng decimals (google map api) to a "point"
> datatype in mysql.
>
> example for paris
> lat - 48.8372
> lng - 2.33
>
> do we store it as GEOMFROMTEXT('POINT(48.8372 2.33234)') or do
> i need to convert to any specific format.
>
> storing it as float column will not suffice as all the spatial quering
> fu
>
> dont i do need to store them as point/linestring/polygon to use data
> query functions like glenght/exteriorring ?
>
> eg given "n" mile radius from a base point finding matching locations
>
>
> thanks,
> px
>
> >
>


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