Mysql空间扩展ST_GeomFromText() 经纬度顺序异常说明

在MySQL 8.0中,使用ST_GeomFromText创建空间对象时,默认坐标顺序为(latitude, longitude),与常见顺序相反。解决方法是提供额外的axis_order参数指定(longitude, latitude)顺序。如果坐标超出范围,如经度不在(-180, 180]或纬度不在[-90, 90],将导致错误。要确保正常顺序,需在函数调用中添加'AXIS_ORDER(longitude,latitude)'。" 103964189,8623293,大数据环境下NameNode宕机原因与解决方案,"['大数据开发', 'Hadoop', '运维', '性能优化', '故障排查']
摘要由CSDN通过智能技术生成

官方详细文档 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 is NULL, the return value is NULL.

  • By default, geographic coordinates (latitude, longitude) are interp

  • 4
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值