如何修复错误: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 (将#修改为@)