问题描述
我有2张桌子。
- 一个表包含点数
- 第二张表包含多边形
我想获取多边形与点之间所有小于300m的距离。
select f.id,st_distance_shpere(first.geo,second.geo) as distance
from f as first,s as second
where st_distance_shpere(first.geo,second.geo) < 100
这里的代码“ st_distance_shpere(first.geo,second.geo)
”被计算两次
如果我尝试将其更改为:
select first.id,second.geo) as distance
from f as first,s as second
where distance < 100
我遇到错误:column distance does no exists
但是我想在选择字段中显示距离而不计算两次距离。 有可能吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)