MySQL 大圆路口(两条路交叉吗?)
MySQL OpenGIS CROSSES 似乎对我不起作用:
SET @ls = 'LineString(1 1, 2 2, 3 3)';
SET @xx = 'LineString(0 2, 10 2)';
# SELECT AsText(EndPoint(GeomFromText(@ls)));
select crosses(GeomFromText(@ls), GeomFromText(@xx))
返回 0 - 预期 1
我如何将其重写为 MySQL 函数?
使用纬度、经度和球面投影(也许还有大圆)的奖励积分。
PS 我无法创建标签,并且我丢失了我的旧登录名:有用的标签是:MySQL OpenGIS CROSSES Greatcircle lat lon - :)
MySQL OpenGIS CROSSES doesn't seem to work for me:
SET @ls = 'LineString(1 1, 2 2, 3 3)';
SET @xx = 'LineString(0 2, 10 2)';
# SELECT AsText(EndPoint(GeomFromText(@ls)));
select crosses(GeomFromText(@ls), GeomFromText(@xx))
returns 0 - expected 1
How would I rewrite this as a MySQL function?
Bonus points for using lat, lon and spherical projection (and maybe the Great Circle.)
PS I can't create tags and I have lost my old login: Useful tags would be: MySQL OpenGIS CROSSES greatcircle lat lon - :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需使用INTERSECTS(line1,line2)
Just use INTERSECTS(line1,line2)
好的,最后我刚刚实现了这个: http://local.wasp .uwa.edu.au/~pbourke/geometry/lineline2d/
OK, in the end I just implemented this: http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/