官方详细文档 https://www.mysqlzh.com/doc/175.html
踩过的坑
1) 8.0 在使用 ST_GeomFromText()
时,默认的坐标顺序是 (latitude, longitude),而非常规的(longitude,latitude)
官方详细文档 https://dev.mysql.com/doc/refman/8.0/en/gis-wkt-functions.html#function_st-geomfromtext
Unless otherwise specified, functions in this section handle their geometry arguments as follows:
-
If any geometry argument is
NULL
or is not a syntactically well-formed geometry, or if the SRID argument isNULL
, the return value isNULL
. -
By default, geographic coordinates (latitude, longitude) are interp