dbTalk Databases Forums  

Help with Transitioning to Spatial Columns

comp.databases.mysql comp.databases.mysql


Discuss Help with Transitioning to Spatial Columns in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ryan H
 
Posts: n/a

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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.