如何解决如何修复错误:line_locate_point:第二个arg不是一点?
我在postgresql中创建了一个函数,该函数应该找到一个点到段上的投影,然后找到从投影到某个点的距离。我有两个数组:第一个数组是具有线段的数组(LineString3D),第二个数组是具有要插值的点的数组(Point3D)。我的代码:
public List<String> getTestContent() {
DistinctIterable<String> distinctIterable = mongoTemplate.getCollection("test-doc").distinct("testcontent",String.class);
return StreamSupport.stream(distinctIterable.spliterator(),false).collect(Collectors.toList());
}
但是postgres给我看这个按摩:foreach i in array(first_array)
loop
foreach j in array(second_array)
loop
select ST_LineInterpolatePoint(ST_LineMerge(i::geometry),ST_LineLocatePoint(ST_LineMerge(i::geometry),j::geometry)) into interpolate_geom;
select st_length(st_makeline(j::geometry,interpolate_geom::geometry)) into length_geom;
end loop;
end loop;
。
如果您知道如何解决此错误,请解释。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。