guys Please suggest me a mysql function to calculate distance between a point and a polygon.

I need a inbuilt mysql function for this issue

有帮助吗?

解决方案

You are probably looking for 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.

From the manual:

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top