MySQL5.6将对空间字段geometry运算全面支持_MySQL

WBOY
发布: 2016-06-01 13:48:55
原创
1022 人浏览过

bitsCN.com

还是做数据库迁移。

还是从MSSQL迁移到MySQL,数据迁移过去了,最大的问题就在于MySQL不支持空间运算。最初我的打算是用MySQL连接C,然后用C去连接Postgres,然后由Postgres的Postgis插件运算后,返回结果。纠结了两天,堆了一天代码失败,返回始终为NULL,万般无奈下,翻看MySQL文档,查到在5.6中即将支持精确的空间运算,十分高兴,立马下载其测试版,试用,果然好用。纠结结束,分享链接:

http://dev.mysql.com/doc/refman/5.6/en/functions-for-testing-spatial-relations-between-geometric-objects.html

注意其中的NOTE,亮点在于:

NoteMySQL originally implemented these functions such that they used object bounding rectangles and returned the same result as the corresponding MBR-based functions. As of MySQL 5.6.1, corresponding versions are available that use precise object shapes. These versions are named with an ST_ prefix. For example, Contains() uses object bounding rectangles, whereas ST_Contains() uses object shapes.As of MySQL 5.6.1, there are also ST_ aliases for existing spatial functions that were already exact. For example,ST_IsEmpty() is an alias for IsEmpty()  bitsCN.com
相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!