Here's the table:
CREATE TABLE `lsd` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`latitude` decimal(10,8) NOT NULL,
`longitude` decimal(12,8) NOT NULL,
`coordinates` point NOT NULL,
PRIMARY KEY (`id`),
SPATIAL KEY `latlng` (`coordinates`(32))
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
AUTO_INCREMENT=100534 ;
I have been able to find any substantive articles on spatial
SELECTs. Basically, I want to select the records with the
coordinates (which are latitude/longitude points) closest to a given
latitude/longitude. Simple, right? But I'm stuck here... None of the
examples in the MySQL docs seem to do this precisely. Any ideas? (One
lister showed me how to perform a SELECT on the latitude, longitude
columns, but with hundreds of thousands of rows, the query takes
several seconds. I figure with a spatial index on that coordinates
POINT column, it could be much faster.)
...Rene
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]