如何输入“空"字样?将POINT()几何值转换为POINT类型的MySQL字段? [英] How do I enter an "empty" POINT() geometry value into a MySQL field of type POINT?
本文介绍了如何输入“空"字样?将POINT()几何值转换为POINT类型的MySQL字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有POINT
几何字段的表.我这样输入纬度/经度点:
I have a table with a POINT
geometry field. I enter latitude/longitude points into it like this:
INSERT INTO table( point )
VALUES( POINT( lon_value, lat_value );
有时我没有可输入的经/纬度值.我无法输入空白,NULL或空的POINT()...,因为POINT(0,0)实际上是地球上的某个位置,因此也不起作用.
Sometimes I do not have lat/lon values to enter. I am unable to enter a blank, a NULL, or an empty POINT() ... since POINT(0,0) is actually a location on the globe, that won't work either.
这里的解决方案是什么?
What is the solution here?
推荐答案
我会使用北极的坐标
INSERT INTO table( point )
VALUES( POINT(0.0000,90.0000);
如果极点的实际坐标可能是个问题,我将lon值从0.0000更改.
If the actual coordinates of the pole may be an issue i would change the lon value from 0.0000.
这篇关于如何输入“空"字样?将POINT()几何值转换为POINT类型的MySQL字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文