mysql - mysql中多边形和点之间的距离

标签 mysql function polygon distance point

请大家推荐一个mysql函数来计算点和多边形之间的距离。

我需要一个内置的 mysql 函数来解决这个问题

最佳答案

您可能正在寻找Functions for Testing Spatial Relations Between Geometric Objects

The functions described in these sections take two geometries as input parameters and return a qualitative or quantitative relation between them.

来自手册:

Note MySQL 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()

关于mysql - mysql中多边形和点之间的距离,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22979344/

相关文章:

mysql - 如何在 MySQL 中同时使用 MAX 和 LIMIT

MySQL函数仅在未使用传递的参数时才起作用?

c++ - While 循环和 If 语句和函数

c++ - 如何传递二维结构数组给函数?

c++ - 在索引处 boost 几何多边形插入点

algorithm - 如何有效地确定多边形是凸面、非凸面还是复杂面?

javascript - 将负多边形转换为正坐标 - Javascript

当 shell 变量包含 & 符号时 MySql 查询失败

php - 根据用户 ID 保存个人资料数据

mysql - 简单的mysql函数语法错误1064