mysql gis 多边形插入失败
我是巴西人,有一个使用 Google Maps API + GWT + MySQL 的项目,但是我有问题,我无法在 BD 中创建小数点后三位以上的多边形几何图形。
如果我运行查询:
INSERT INTO monografia.locais (nome,descricao,tags, geo)
VALUES ('test','this is a polygon','dfaf asdf asdf',
GeomFromText(
'POLYGON((-19.863924936000608 -43.887290954589844,
-19.84810225157064 -43.97758483886719,
-19.893951403349405 -44.011573791503906,
-19.92945922975802 -44.01466369628906,
-25.065697185535864 -40.62744140625,
-19.863924936000608 -43.887290954589844))
'))
向我返回 null,但如果我四舍五入到小数点后两位,则可以工作:
INSERT INTO monografia.locais (nome,descricao,tags, geo)
VALUES ('doidera','é um poligono doidera','dfaf asdf asdf',
GeomFromText(
'POLYGON((-19.86 -43.88,
-19.84 -43.97,
-19.89 -44.01,
-19.92 -44.01,
-25.06 -40.62,
-19.86 -43.88))
'))
但我需要更好的精度,超过小数点后两位。 有人可以帮助我吗?
i'm a brazilian, and have a project that I using Google Maps API + GWT + MySQL but, i've problem, i can't create a polygon geometry in BD with more then 3 decimal places.
If I run the query:
INSERT INTO monografia.locais (nome,descricao,tags, geo)
VALUES ('test','this is a polygon','dfaf asdf asdf',
GeomFromText(
'POLYGON((-19.863924936000608 -43.887290954589844,
-19.84810225157064 -43.97758483886719,
-19.893951403349405 -44.011573791503906,
-19.92945922975802 -44.01466369628906,
-25.065697185535864 -40.62744140625,
-19.863924936000608 -43.887290954589844))
'))
return null to me, but if I rounding to 2 decimal places it's work:
INSERT INTO monografia.locais (nome,descricao,tags, geo)
VALUES ('doidera','é um poligono doidera','dfaf asdf asdf',
GeomFromText(
'POLYGON((-19.86 -43.88,
-19.84 -43.97,
-19.89 -44.01,
-19.92 -44.01,
-25.06 -40.62,
-19.86 -43.88))
'))
But I need a better precision, more then 2 decimal places.
Someone can help me ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论