[英]MYSQL Invalid GIS data provided to function st_geomfromtext for a POINT not a Polygon
UPDATE
`points`
SET
`latitude` = "25.326649141869",
`longitude` = "49.551773071289",
`geometry` =(
ST_GEOMFROMTEXT(
'POINT((25.326649141869,49.551773071289))'
)
),
`points`.`updated_at` = "2022-01-17 11 :44 :23"
WHERE
`id` = "7017ef8a4f2df74705338316"
In the query above I am trying to update this record but I received MYSQL error Invalid GIS data provided to function st_geomfromtext在上面的查询中,我尝试更新此记录,但收到 MYSQL 错误 Invalid GIS data provided to function st_geomfromtext
Note: however the same values for the st_geomfromtext fun works fine when inserting the record before.注意:但是 st_geomfromtext 乐趣的相同值在之前插入记录时可以正常工作。
See WKT description for the expected format: https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry有关预期格式,请参阅 WKT 描述: https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry
In particular, for Points, you only need one set of parenthesis.特别是,对于 Points,您只需要一组括号。 The longitude and latitude are separated by space, not comma.经度和纬度用空格隔开,不是逗号。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.