mysql 插入 查询 空间数据

 

 

 

select st_astext(line) from geotest;

INSERT INTO geotest (line) VALUES(GeomFromText('LINESTRING(0 0,1 1,2 2,3 3)'));


SET @g2 = 'POLYGON((0 0,3 0,3 3,0 3,0 0),(1 1,2 0,2 2,0 2,1 1))';
INSERT INTO geotest (polygon)  VALUES( GeomFromText(@g2));

  

 

posted @ 2020-04-28 18:15  leechg  阅读(499)  评论(0编辑  收藏  举报