请大家推荐一个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/