我有经度和纬度的城市的maxmind数据库。我希望距离我目前的位置50公里,100公里和200公里的城市。
这是数据库结构:
CREATE TABLE IF NOT EXISTS `maxmind_location_city` (
`Feature_int_id` int(11) NOT NULL DEFAULT '0',
`Admin1_str_code` varchar(5) NOT NULL DEFAULT '',
`Country_str_code` varchar(2) NOT NULL DEFAULT '',
`Feature_str_name` varchar(120) NOT NULL DEFAULT '',
`Feature_dec_lat` double NOT NULL DEFAULT '0',
`Feature_dec_lon` double NOT NULL DEFAULT '0',
PRIMARY KEY (`Feature_int_id`),
KEY `Admin1_str_code` (`Admin1_str_code`),
KEY `Feature_str_name` (`Feature_str_name`),
KEY `Country_str_code` (`Country_str_code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SAMLE DATA:
INSERT INTO `maxmind_location_city` (`Feature_int_id`, `Admin1_str_code`, `Country_str_code`, `Feature_str_name`, `Feature_dec_lat`, `Feature_dec_lon`) VALUES
(146765, 'AD02', 'AD', 'Canillo', 42.567, 1.6),
(211022, 'AD02', 'AD', 'El Tarter', 42.583, 1.65),
(230839, 'AD02', 'AD', 'Meritxell', 42.55, 1.6);