Unix Technical Forum

Help with Transitioning to Spatial Columns

This is a discussion on Help with Transitioning to Spatial Columns within the MySQL forums, part of the Database Server Software category; --> I have a pretty large table -- about 2 million records -- that so contains latitude and longitude points ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 08:52 AM
Ryan H
 
Posts: n/a
Default Help with Transitioning to Spatial Columns

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:12 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com