create table GDATA ( x DOUBLE not null, y DOUBLE not null, pt POINT DEFAULT NULL ) ENGINE=MyISAM DEFAULT charset=utf8;
update GDATA set pt = PointFromText( concat( ‘POINT(’,x,' ',y,')' ) ); create table GDATA2 ( x DOUBLE not null, y DOUBLE not null, SPATIAL KEY `sp_index` (`pt`) ) ENGINE=MyISAM DEFAULT charset=utf8;
insert into GDATA2(x,y,pt) select x,y,pt from GDATA;
本サイトは金子邦彦研究室のWebページです.サイトマップは,サイトマップのページをご覧下さい. 本サイト内の検索は,サイト内検索のページをご利用下さい.
問い合わせ先: 金子邦彦(かねこ くにひこ) ![]()