Help with Transitioning to Spatial Columns -
01-02-2007
, 11:37 PM
I have a pretty large table -- about 2 million records -- that so
contains latitude and longitude points as separate columns. I'm
interested in experimenting with the spatial extensions in MySQL 5.
With a basic test, though I ran into a problem.
I added a 'POINT' column to my table:
ALTER TABLE map_points ADD `PT` POINT
I experimented with the syntax of the extensions with this query:
select Point(`long`,`lat`) from map_points
.... Where the 'lat' and 'long' columns are DOUBLE(13,10)
The results look like a blob, which is what I would expect. But when I
try to update the 'PT' column:
update map_points set PT = Point(`long`,`lat`)
I get an error: Cannot get geometry object from data you send to the
GEOMETRY field
ANY HELP??
Thanks!! |