从几何类型表中检索坐标

时间:2012-10-25 21:28:19

标签: mysql geometry geospatial

我用来插入坐标的查询:

INSERT INTO `area` VALUES (PolygonFromText('POLYGON((".$polygon."))'))")

我用来获取坐标的查询:

SELECT CAST(AsText(polygon) AS char) AS p from `area`

我得到的是: POLYGON((40.6524347950336 22.9509570396729,40.6304214047297 22.9454638756104,40.6123102760868 22.9640033043213,40.6113980749889 22.9895808494873,40.6524347950336 22.9509570396729))

是否有更好的方式或其他方式,可能会改变我的查询以仅获取坐标?

0 个答案:

没有答案