计算2个点之间距离是
SELECT ST_DistanceSphere(
st_point(116.4677961543,39.9486461337),
st_point(116.4680989087,39.9486998528)
);
如果是多个点如何计算呢?
CREATE TABLE tt (
"longitude" numeric(24,16) NOT NULL DEFAULT 0,
"latitude" numeric(24,16) NOT NULL DEFAULT 0
);
INSERT INTO tt VALUES(116.4677961543, 39.9486461337);
INSERT INTO tt VALUES(116.4680989087 ,39.9486998528);
INSERT INTO tt VALUES(116.4690989087 ,39.9493998528);