!!!!!! 取得点为 多边形的最小矩形里面的点。加入java进行第二次判断。
建表:
CREATE TABLE `test` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pnt` point DEFAULT NULL,
`pgn` polygon DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
插入数据:
INSERT INTO `test` VALUES ('12', GeomFromText('POINT(1 1)'), null);
INSERT INTO `test` VALUES ('11', GeomFromText('POINT(1 1)'), null);
INSERT INTO `test` VALUES ('1', GeomFromText('POINT(1 1)'), null);
INSERT INTO `test` VALUES ('2', GeomFromText('POINT(1 5)'), null);
INSERT INTO `test` VALUES ('3', GeomFromText('POINT(2 2)'), null);
INSERT INTO `test` VALUES ('4', GeomFromText('POINT(2 3)