Spatial Index in MySQL - ERROR - Cannot get geometry object from data you send to the GEOMETRY field

前端 未结 2 1220
庸人自扰
庸人自扰 2021-01-01 23:07

I am new to the whole \'spatial index\' thing, but it seems to be the best solution for filtering based on latitude/longitude. So I added a column to my table:

So I

2条回答
  •  借酒劲吻你
    2021-01-01 23:29

    OK I found the solution: Can't create a spatial index if some of the column fields contain no data. After running

      UPDATE `addresses` SET `point` = POINT( lng, lat )
    

    Everything worked fine.

提交回复
热议问题