From: Pete Lancashire
update fooloc set location = geomfromtext('point(lat lon)');
I have no experience with spatial tables, but from the manual I conclude
that either of these should do the job:
UPDATE `fooloc` SET `location` = GeoFromWKB(point(`lat`, `lon`));
or
UPDATE `fooloc`
I have an existing MyISAM table that I want to add a spatial column
to. It originally had two integer columns, lat and lon, and I've
added a new column location point NOT NULL default ''
Example data:
select lat, lon, astext(location) from fooloc;
+--+--+--+
| lat