Mysql地理点

时间:2018-03-05 16:13:02

标签: php mysql sql geolocation geo

我正在使用phpmyadmin和MySql。我试图插入一个点,这个点是地球上经纬度的一个点。我尝试过的所有例子都没有。我想知道是否有人可以提供一个例子。

这些是我尝试过的例子。

INSERT INTO postTest VALUES ("TEST","TEST", geography::point(46.7864642,-96.81803599999999,4326));
INSERT INTO postTest VALUES ("TEST","TEST", geography::point(46.7864642,-96.81803599999999,4326));
INSERT INTO postTest VALUES ("TEST","TEST", geography::point(46.7864642,-96.81803599999999,4326));
INSERT INTO postTest VALUES ("TEST","TEST", geography::STGeomFromText('POINT(46.7864642,-96.81803599999999)',4326));
INSERT INTO postTest VALUES ("TEST","TEST". (geography::point(46.7864642,-96.81803599999999,4326));
INSERT INTO postTest VALUES ("TEST","TEST", (STGeomFromText('POINT(46.7864642,-96.81803599999999)',4326));
INSERT INTO postTest VALUES ("TEST","TEST", STGeomFromText('POINT(46.7864642,-96.81803599999999)',4326);
INSERT INTO postTest VALUES ("TEST","TEST", ST_GeomFromText('POINT(46.7864642,-96.81803599999999)',4326); 

这就是我的表格。

enter image description here

任何建议和帮助将不胜感激。此外,我还没有得到这一点,但如果有人知道如何返回x和x距离之间的点;任何这方面的例子都将非常受欢迎。

谢谢, 杰克

0 个答案:

没有答案